From mboxrd@z Thu Jan 1 00:00:00 1970 From: email@edgar-kalkowski.de Subject: Bug: org-archive-subtree-add-inherited-tags should use both local and inherited tags [9.1.12 (9.1.12-elpa @ ~/.emacs.d/elpa/org-9.1.12/)] Date: Fri, 4 May 2018 15:20:06 +0200 Message-ID: <4b268df4db51ce0e117974ae1597c0b4.squirrel@edgar-kalkowski.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEadC-00034c-GL for emacs-orgmode@gnu.org; Fri, 04 May 2018 09:20:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEad8-0000eG-EV for emacs-orgmode@gnu.org; Fri, 04 May 2018 09:20:14 -0400 Received: from xpeter.de ([85.214.74.222]:49766 helo=h1655322.stratoserver.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fEad8-0000Yk-6Q for emacs-orgmode@gnu.org; Fri, 04 May 2018 09:20:10 -0400 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" To: emacs-orgmode@gnu.org Greetings fellow org-mode enthusiasts, I discovered that in the latest org-mode setting (org-archive-subtree-add-inherited-tags t) only includes inherited tags but omits local tags. To remedy this I propose the following patch to org-archive.el: diff --git a/org-archive.el b/org-archive.el index e020ec2..0ac164d 100644 --- a/org-archive.el +++ b/org-archive.el @@ -361,7 +361,7 @@ direct children of this heading." (or (and (eq org-archive-subtree-add-inherited-tags 'infile) infile-p) (eq org-archive-subtree-add-inherited-tags t)) - (org-set-tags-to all-tags)) + (org-set-tags-to (delete-dups (append inherited-tags local-tags)))) ;; Mark the entry as done (when (and org-archive-mark-done (let ((case-fold-search nil)) However, I am not sure if this is enough or if something more fundamental is broken since all-tags only includes inherited tags and not actually all tags. Best regards, Edgar Kalkowski Emacs : GNU Emacs 25.3.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-09 Package: Org mode version 9.1.12 (9.1.12-elpa @ ~/.emacs.d/elpa/org-9.1.12/)