Previous: ARCHIVE tag, Up: Archiving


2.6.2 Moving subtrees

Once an entire project is finished, you may want to move it to a different location. Org can move it to an Archive Sibling in the same tree, to a different tree in the current file, or to a different file, the archive file.

C-c C-x A
Move the current entry to the Archive Sibling. This is a sibling of the entry with the heading `Archive' and the tag `ARCHIVE' (see ARCHIVE tag). The entry becomes a child of that sibling and in this way retains a lot of its original context, including inherited tags and approximate position in the outline.
C-c C-x C-s
Archive the subtree starting at the cursor position to the location given by org-archive-location. Context information that could be lost like the file name, the category, inherited tags, and the TODO state will be store as properties in the entry.
C-u C-c C-x C-s
Check if any direct children of the current headline could be moved to the archive. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to move it to the archive location. If the cursor is not on a headline when this command is invoked, the level 1 trees will be checked.

The default archive location is a file in the same directory as the current file, with the name derived by appending _archive to the current file name. For information and examples on how to change this, see the documentation string of the variable org-archive-location. There is also an in-buffer option for setting this variable, for example1:

     #+ARCHIVE: %s_done::

If you would like to have a special ARCHIVE location for a single entry or a (sub)tree, give the entry an :ARCHIVE: property with the location as the value (see Properties and Columns).

When a subtree is moved, it receives a number of special properties that record context information like the file from where the entry came, it's outline path the archiving time etc. Configure the variable org-archive-save-context-info to adjust the amount of information added.


Footnotes

[1] For backward compatibility, the following also works: If there are several such lines in a file, each specifies the archive location for the text below it. The first such line also applies to any text before its definition. However, using this method is strongly deprecated as it is incompatible with the outline structure of the document. The correct method for setting multiple archive locations in a buffer is using a property.