From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [PATCH] org-get-tags-at: exclude filetags when local is t Date: Sat, 30 Apr 2011 11:19:54 -0400 Message-ID: <87zkn792zq.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGC1k-0004xP-RI for emacs-orgmode@gnu.org; Sat, 30 Apr 2011 11:24:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGC1j-0007w8-HX for emacs-orgmode@gnu.org; Sat, 30 Apr 2011 11:24:12 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:40166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGC1j-0007w0-D4 for emacs-orgmode@gnu.org; Sat, 30 Apr 2011 11:24:11 -0400 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 96C6121C76 for ; Sat, 30 Apr 2011 11:24:10 -0400 (EDT) Received: from archdesk (67-197-161-170.dyn.comporium.net [67.197.161.170]) by mail.messagingengine.com (Postfix) with ESMTPSA id 43C5844B5EA for ; Sat, 30 Apr 2011 11:24:10 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode * 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. --- lisp/org.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 61668ce..afcd4cb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12798,7 +12798,9 @@ ignore inherited ones." (or (org-up-heading-safe) (error nil)) (setq parent t))) (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) (add-text-properties 0 (length s) '(inherited t) s) -- 1.7.5