Browse Source

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 3 months ago
parent
commit
f5d27e046a
1 changed files with 3 additions and 2 deletions
  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