[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] initialize level in org-agenda-format-item

From: Daniel Clemente
Subject: [O] [PATCH] initialize level in org-agenda-format-item
Date: Wed, 26 Sep 2012 11:14:40 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.2.50 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

When I used %l in org-agenda-prefix-format, my agenda failed with:

Debugger entered--Lisp error: (args-out-of-range 0 0)
  get-text-property(0 extra-space nil)
  (concat level "" (get-text-property 0 (quote extra-space) level))
  (if (equal level "") "" (concat level "" (get-text-property 0 (quote 
extra-space) level)))
  (format "%s" (if (equal level "") "" (concat level "" (get-text-property 0 
(quote extra-space) level))))

It was due to „level“ being nil. The (if (equal level "")) did not run because 
level was nil and not "".
So I set it to "" and it worked:

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9e2380b..a8b009c 100755
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6038,7 +6038,8 @@ Any match of REMOVE-RE will be removed from TXT."
                         (t ""))
              extra (or (and (not habitp) extra) "")
              category (if (symbolp category) (symbol-name category) category)
-             thecategory (copy-sequence category))
+             thecategory (copy-sequence category)
+             level "")
        (if (string-match org-bracket-link-regexp category)
              (setq l (if (match-end 3)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]