org-archive-location
org-archive-location is a variable defined in `
org.el
'.
Its value is
"%s_archive::"
Documentation:
The location where subtrees should be archived.
The value of this variable is a string, consisting of two parts,
separated by a double-colon. The first part is a filename and
the second part is a headline.
When the filename is omitted, archiving happens in the same file.
%s in the filename will be replaced by the current file
name (without the directory part). Archiving to a different file
is useful to keep archived entries from contributing to the
Org-mode Agenda.
The archived entries will be filed as subtrees of the specified
headline. When the headline is omitted, the subtrees are simply
filed away at the end of the file, as top-level entries. Also in
the heading you can use %s to represent the file name, this can be
useful when using the same archive for a number of different files.
Here are a few examples:
"%s_archive::"
If the current file is Projects.org, archive in file
Projects.org_archive, as top-level trees. This is the default.
"::* Archived Tasks"
Archive in the current file, under the top-level headline
"* Archived Tasks".
"~/org/archive.org::"
Archive in file ~/org/archive.org (absolute path), as top-level trees.
"~/org/archive.org::* From %s"
Archive in file ~/org/archive.org (absolute path), under headlines
"From FILENAME" where file name is the current file name.
"~/org/datetree.org::datetree/* Finished Tasks"
The "datetree/" string is special, signifying to archive
items to the datetree. Items are placed in either the CLOSED
date of the item, or the current date if there is no CLOSED date.
The heading will be a subentry to the current date. There doesn't
need to be a heading, but there always needs to be a slash after
datetree. For example, to store archived items directly in the
datetree, use "~/org/datetree.org::datetree/".
"basement::** Finished Tasks"
Archive in file ./basement (relative path), as level 3 trees
below the level 2 heading "** Finished Tasks".
You may set this option on a per-file basis by adding to the buffer a
line like
#+ARCHIVE: basement::** Finished Tasks
You may also define it locally for a subtree by setting an ARCHIVE property
in the entry. If such a property is found in an entry, or anywhere up
the hierarchy, it will be used.
You can customize this variable.