From 3a959f9d30250005c65e28292bc619b5488c4e3d Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 4 Mar 2009 09:11:39 +0100 Subject: [PATCH] Agenda: Fix bug with tag inheritance Jeff Mickey writes: > Hey all, > > To reproduce: > > * TODO Make Bicycle :project:workshop: > ** TODO Buy stuff > ** TODO Build stuff > ** TODO Test stuff > > (setq org-use-tag-inheritance t) > (setq org-tags-exclude-from-inheritance '("project")) > > to type in a match string to search, I type in "project" > > I expected to see: > TODO Make Bicycle > > I saw: > TODO Make Bicycle > .TODO Buy stuff > .TODO Build stuff > .TODO Test stuff > > I assume this isn't what is supposed to happen. I'm currently at work > so I can't investigate and provide a diff, but it seems like there > needs to be a check in org.el:10144:org-get-tags-at to remove tags > that are explicitly excluded from inheritance. This commit fixes the bug. --- lisp/ChangeLog | 4 ++++ lisp/org.el | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ebbd6720..747e710f8 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-03-04 Carsten Dominik + + * org.el (org-scan-tags): Improve tag inheritance. + 2009-03-03 Carsten Dominik * org.el (org-add-planning-info): Fix bug with looking for keyword diff --git a/lisp/org.el b/lisp/org.el index 88174f308..abdd77474 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9822,6 +9822,8 @@ only lines with a TODO keyword are included in the output." (apply 'append (mapcar 'cdr (reverse tags-alist))) tags)) (when org-use-tag-inheritance + (setcdr (car tags-alist) + (org-remove-uniherited-tags (cdar tags-alist))) (setcdr (car tags-alist) (mapcar (lambda (x) (setq x (copy-sequence x))