Let me start out by saying I've seen various attempts to address questions similar to mine, but none of them handle the things I'm looking for. Here is an example of what I'm looking for:

Say I start with an org-file that looks like:

#+ARCHIVE: ::* Archived

* Foo
  * Tasks
    * Task1
  * Thoughts
    * Thought1
    * Thought2

* Archived

Now I put the point (i.e. cursor) on Thought1 and run org-super-archive (the magical command I'm hoping to find). The result should be:

#+ARCHIVE: ::* Archived

* Foo
  * Tasks
    * Task1
  * Thoughts
    * Thought2

* Archived
  * Foo
    * Thoughts
      * Thought1

Now I move the point to Thought2 and again run org-super-archive, which should give me:

#+ARCHIVE: ::* Archived

* Foo
  * Tasks
    * Task1
  * Thoughts

* Archived
  * Foo
    * Thoughts
      * Thought1
      * Thought2

So the basic operation I'm seeking is the ability to archive a subtree to whatever target location is specified with #+ARCHIVE (or org-archive-location) where (1) the full path of the archived subtree is mirrored beneath that target location, and (2) the subtree will be merged into an existing path under the target if an appropriate path already exists.

As an added bonus, it would be nice if it were possible to choose whether or not the "full path" of a subtree to be archived will include the org-file name as the root of the path. This would be useful in cases where you archive from multiple org-files to a single archive.org file.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.