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)
            (progn
              (setq l (if (match-end 3)



Reply via email to