diff options
author | Max Mikhanosha <max@openchat.com> | 2011-07-06 20:05:06 -0400 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-07-27 14:59:13 +0200 |
commit | 0cd6d82d39c65315b353a55f797aa044e05cb4ba (patch) | |
tree | f617731d58e2541ded4d123c313ea00d8265dac8 | |
parent | 76297448c9ebbf3d4a487b52b34e5435652fcd64 (diff) | |
download | org-mode-0cd6d82d39c65315b353a55f797aa044e05cb4ba.tar.gz |
Fix error with %e agenda prefix format when there is no effort set
-rw-r--r-- | lisp/org-agenda.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index ba62a3d..27e7329 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5524,7 +5524,9 @@ Any match of REMOVE-RE will be removed from TXT." (error nil))) (when 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 (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)) (setq category (substring category 0 (1- org-prefix-category-max-length))))) ;; Evaluate the compiled format + (assert effort) (setq rtn (concat (eval org-prefix-format-compiled) txt)) ;; And finally add the text properties |