From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: org-archive-subtree keeping inherited tags Date: Tue, 1 Feb 2011 12:20:39 +0100 Message-ID: References: <8762t49f7l.fsf@gnu.org> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=40700 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkEHs-0003GO-8a for emacs-orgmode@gnu.org; Tue, 01 Feb 2011 06:20:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkEHr-00027a-4C for emacs-orgmode@gnu.org; Tue, 01 Feb 2011 06:20:44 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:64567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkEHq-00027W-Uh for emacs-orgmode@gnu.org; Tue, 01 Feb 2011 06:20:43 -0500 Received: by fxm12 with SMTP id 12so7609865fxm.0 for ; Tue, 01 Feb 2011 03:20:42 -0800 (PST) In-Reply-To: <8762t49f7l.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Osamu OKANO On Feb 1, 2011, at 12:17 PM, Bastien wrote: > Osamu OKANO writes: > >>> I'd like to org-archive-subtree keeping inherited tags. >>> Can I do like blow? >> I have found the solution by defadvice. >> (defadvice org-archive-subtree >> (before add-inherited-tags-before-org-archive-subtree activate) >> "add inherited tags before org-archive-subtree" >> (org-set-tags-to (org-get-tags-at))) > > Thanks for this hack, I added it to Worg/org-hacks.org > > http://orgmode.org/worg/org-hacks.html It might be useful to consider making this as part of the normal archiving procedure, when archiving to a different file. Maybe subject to a variable - but I do like the idea to be able to look at archived entries with all tags in place. Since in the Archive, entries are usually all siblings, there is no useful inheritance. Explicitly copying the tags into each archived entry is a good way to go to retain searchability of tags... Cheers - Carsten