emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stephan Schmitt <drmabuse@cs.tu-berlin.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] bugfix in org-agenda-fix-displayed-tags
Date: Mon, 11 Jan 2010 17:34:34 +0100	[thread overview]
Message-ID: <1263227674-7958-1-git-send-email-drmabuse@cs.tu-berlin.de> (raw)

An error was thrown when all tags of a headline are hidden by
org-agenda-hide-tags-regexp (in this case the function get-text-property
got nil as third argument)
---
 lisp/org-agenda.el |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index e8e9e93..771617e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4762,16 +4762,16 @@ The modified list may contain inherited tags, and tags matched by
   (when (or add-inherited hide-re)
     (if (string-match (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$") txt)
 	(setq txt (substring txt 0 (match-beginning 0))))
+    (setq tags
+	  (delq nil
+		(mapcar (lambda (tg)
+			  (if (or (and hide-re (string-match hide-re tg))
+				  (and (not add-inherited)
+				       (get-text-property 0 'inherited tg)))
+			      nil
+			    tg))
+			tags)))
     (when tags
-      (setq tags
-	    (delq nil
-		  (mapcar (lambda (tg)
-			    (if (or (and hide-re (string-match hide-re tg))
-				    (and (not add-inherited)
-					 (get-text-property 0 'inherited tg)))
-				nil
-			      tg))
-			  tags)))
       (let ((have-i (get-text-property 0 'inherited (car tags)))
 	    i)
 	(setq txt (concat txt " :"
-- 
1.6.4.4

                 reply	other threads:[~2010-01-11 16:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1263227674-7958-1-git-send-email-drmabuse@cs.tu-berlin.de \
    --to=drmabuse@cs.tu-berlin.de \
    --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).