emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] bugfix in org-agenda-fix-displayed-tags
@ 2010-01-11 16:34 Stephan Schmitt
  0 siblings, 0 replies; only message in thread
From: Stephan Schmitt @ 2010-01-11 16:34 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-11 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-11 16:34 [PATCH] bugfix in org-agenda-fix-displayed-tags Stephan Schmitt

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