emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] initialize level in org-agenda-format-item
Date: Wed, 26 Sep 2012 11:14:40 +0200	[thread overview]
Message-ID: <87pq59tabj.wl%n142857@gmail.com> (raw)


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	other threads:[~2012-09-26  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26  9:14 Daniel Clemente [this message]
2012-09-26  9:36 ` [PATCH] initialize level in org-agenda-format-item Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq59tabj.wl%n142857@gmail.com \
    --to=n142857@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).