浏览代码

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"))
>
>  <C-a m> 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.
Carsten Dominik 16 年之前
父节点
当前提交
3a959f9d30
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 4 0
      lisp/ChangeLog
  2. 2 0
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -1,3 +1,7 @@
+2009-03-04  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-scan-tags): Improve tag inheritance.
+
 2009-03-03  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-add-planning-info): Fix bug with looking for keyword

+ 2 - 0
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))