From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel J. Sinder" Subject: Re: org-archive-done Date: Thu, 15 Jun 2006 16:18:31 -0700 Message-ID: <4491EAC7.7080304@gmail.com> References: <874pyomawm.fsf@ibbu.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fr16j-0000ds-3i for emacs-orgmode@gnu.org; Thu, 15 Jun 2006 19:18:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fr16g-0000Z0-ID for emacs-orgmode@gnu.org; Thu, 15 Jun 2006 19:18:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fr16g-0000Ys-CS for emacs-orgmode@gnu.org; Thu, 15 Jun 2006 19:18:34 -0400 Received: from [208.97.132.61] (helo=randymail-a9.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fr1GB-0007kI-4m for emacs-orgmode@gnu.org; Thu, 15 Jun 2006 19:28:23 -0400 In-Reply-To: <874pyomawm.fsf@ibbu.nl> 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: emacs-orgmode@gnu.org nielsgiesen@ibbu.nl wrote: > How about a function org-archive-done, that archives any tree in the > buffer labelled DONE? > > One might refine this to archive trees absolutely done, so that---even > when a heading is labelled DONE---it looks to its subtrees to check > whether they have no label which states the opposite. > > Also, I think it only nice/useful for top-level headings, not below. > I like the idea proposed by Niels, but I'd want to be able to call it for a tree too, not just the top-level of a whole file. In other words, I'd like to prune any chosen tree to archive DONE items under it. Perhaps an example is best... --- .org file before archiving --- * Tasks ** TODO Task 1 ** DONE Task 2 ** TODO Project A *** TODO Task A1 *** DONE Task A2 ** DONE Project B *** DONE Task B1 *** DONE Task B2 --- .org file after archive of top-level tree --- * Tasks ** TODO Task 1 ** TODO Project A *** TODO Task A1 *** DONE Task A2 --- _archive file after archive of top-level tree --- * Tasks ** DONE Task 2 ** DONE Project B *** DONE Task B1 *** DONE Task B2 Dan