From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: [PATCH] bugfix in org-agenda-fix-displayed-tags Date: Mon, 11 Jan 2010 17:34:34 +0100 Message-ID: <1263227674-7958-1-git-send-email-drmabuse@cs.tu-berlin.de> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUNFG-0001B4-9d for emacs-orgmode@gnu.org; Mon, 11 Jan 2010 11:35:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUNFB-0001AW-EG for emacs-orgmode@gnu.org; Mon, 11 Jan 2010 11:35:57 -0500 Received: from [199.232.76.173] (port=45424 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUNFB-0001AR-Ai for emacs-orgmode@gnu.org; Mon, 11 Jan 2010 11:35:53 -0500 Received: from algieba.ni.cs.tu-berlin.de ([130.149.24.75]:53934) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUNFA-0004S0-TX for emacs-orgmode@gnu.org; Mon, 11 Jan 2010 11:35:53 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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