From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: [FR] Archive subtree with parent structure Date: Wed, 28 May 2014 15:49:01 -0400 Message-ID: References: <87ha494rr4.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpjqX-00008R-Od for emacs-orgmode@gnu.org; Wed, 28 May 2014 15:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpjqR-0007Fz-QI for emacs-orgmode@gnu.org; Wed, 28 May 2014 15:49:09 -0400 In-reply-to: <87ha494rr4.fsf@bzg.ath.cx> 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: Bastien Cc: Florian Lindner , emacs-orgmode@gnu.org On 2014-05-28 at 15:39, Bastien wrote: >> If I also archive AB after that, it gets inserted in the structure which >> is now identical to the structure we started with. > > FR noted, thanks. I'm curious to see if people would really find this > a good option, as I like having my archives stored as flat entries. +1. I'd find this useful. I would like archives to exactly mimic source, and I also archive sub-tasks and items throughout a project, not just the entire project when I'm done with it. Currently my archive setup is: ;; http://orgmode.org/worg/org-hacks.html#sec-1-7-1 (setq org-archive-location (concat org-directory "/archive/%s_archive::* Archived Tasks")) ;; Archive to archive/foo.org_archive and then under the existing header (defadvice org-archive-subtree (around my-org-archive-subtree activate) (let ((org-archive-location (if (save-excursion (org-back-to-heading) (> (org-outline-level) 1)) (concat (car (split-string org-archive-location "::")) "::* " (car (org-get-outline-path))) org-archive-location))) ad-do-it)) -k.