emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] initialize level in org-agenda-format-item
@ 2012-09-26  9:14 Daniel Clemente
  2012-09-26  9:36 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Clemente @ 2012-09-26  9:14 UTC (permalink / raw)
  To: emacs-orgmode


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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] initialize level in org-agenda-format-item
  2012-09-26  9:14 [PATCH] initialize level in org-agenda-format-item Daniel Clemente
@ 2012-09-26  9:36 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-09-26  9:36 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: emacs-orgmode

Hi Daniel,

Daniel Clemente <n142857@gmail.com> writes:

> 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 "".

Fixed in master.  Thanks for reporting this,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-26  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26  9:14 [PATCH] initialize level in org-agenda-format-item Daniel Clemente
2012-09-26  9:36 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).