Bladeren bron

org-get-tags-at: exclude filetags when local is t

* lisp/org.el (org-get-tags-at): Don't include filetags if local is t.

The function org-get-tags-at and the functions that called it were
including inherited file tags even if the user requested only local
tags. This patch fixes the behavior.
Matt Lundin 14 jaren geleden
bovenliggende
commit
c6e97d88cf
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -12798,7 +12798,9 @@ ignore inherited ones."
 		      (or (org-up-heading-safe) (error nil))
 		      (or (org-up-heading-safe) (error nil))
 		      (setq parent t)))
 		      (setq parent t)))
 		(error nil)))))
 		(error nil)))))
-	(append (org-remove-uniherited-tags org-file-tags) tags)))))
+	(if local 
+	    tags
+	  (append (org-remove-uniherited-tags org-file-tags) tags))))))
 
 
 (defun org-add-prop-inherited (s)
 (defun org-add-prop-inherited (s)
   (add-text-properties 0 (length s) '(inherited t) s)
   (add-text-properties 0 (length s) '(inherited t) s)