[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [FR] Archive subtree with parent structure
From: |
Ken Mankoff |
Subject: |
Re: [O] [FR] Archive subtree with parent structure |
Date: |
Wed, 28 May 2014 15:49:01 -0400 |
User-agent: |
mu4e 0.9.9.6pre3; emacs 24.3.1 |
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.