소스 검색

Fix bug dealing with the width field of categories in agenda

lisp/org-agenda.el (org-compile-prefix-format): Fix bug dealing with
the width field of categories.  Fix by Héctor Enríquez Ramón.
Carsten Dominik 5 년 전
부모
커밋
f5d27e046a
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      lisp/org-agenda.el

+ 3 - 2
lisp/org-agenda.el

@@ -6739,8 +6739,9 @@ and stored in the variable `org-prefix-format-compiled'."
 	      (floor (abs (string-to-number (match-string 2 s)))))
 	(setq org-prefix-category-max-length
 	      (let ((x (match-string 2 s)))
-		(when (string-match-p "\\.[0-9]+" x)
-		  (string-to-number (substring (match-string 0 x) 1))))))
+		(save-match-data
+		  (and (string-match "\\.[0-9]+" x)
+		       (string-to-number (substring (match-string 0 x) 1)))))))
       (if (eq var 'eval)
 	  (setq varform `(format ,f (org-eval ,(read (match-string 4 s)))))
 	(if opt