Fix error with %e agenda prefix format when there is no effort set
This commit is contained in:
parent
76297448c9
commit
0cd6d82d39
|
@ -5524,7 +5524,9 @@ Any match of REMOVE-RE will be removed from TXT."
|
||||||
(error nil)))
|
(error nil)))
|
||||||
(when effort
|
(when effort
|
||||||
(setq neffort (org-duration-string-to-minutes effort)
|
(setq neffort (org-duration-string-to-minutes effort)
|
||||||
effort (setq effort (concat "[" effort "]" )))))
|
effort (setq effort (concat "[" effort "]")))))
|
||||||
|
;; prevent erroring out with %e format when there is no effort
|
||||||
|
(or effort (setq effort ""))
|
||||||
|
|
||||||
(when remove-re
|
(when remove-re
|
||||||
(while (string-match remove-re txt)
|
(while (string-match remove-re txt)
|
||||||
|
@ -5562,6 +5564,7 @@ Any match of REMOVE-RE will be removed from TXT."
|
||||||
(>= (length category) org-prefix-category-max-length))
|
(>= (length category) org-prefix-category-max-length))
|
||||||
(setq category (substring category 0 (1- org-prefix-category-max-length)))))
|
(setq category (substring category 0 (1- org-prefix-category-max-length)))))
|
||||||
;; Evaluate the compiled format
|
;; Evaluate the compiled format
|
||||||
|
(assert effort)
|
||||||
(setq rtn (concat (eval org-prefix-format-compiled) txt))
|
(setq rtn (concat (eval org-prefix-format-compiled) txt))
|
||||||
|
|
||||||
;; And finally add the text properties
|
;; And finally add the text properties
|
||||||
|
|
Loading…
Reference in New Issue