Variable: org-refile-targets

org-refile-targets is a customizable variable defined in org-refile.el.gz.

Value

nil

Documentation

Targets for refiling entries with M-x org-refile (org-refile).

This is a list of cons cells. Each cell contains:
- a specification of the files to be considered, either a list of files,
  or a symbol whose function or variable value will be used to retrieve
  a file name or a list of file names. If you use org-agenda-files(var)/org-agenda-files(fun) for
  that, all agenda files will be scanned for targets. Nil means consider
  headings in the current buffer.
- A specification of how to find candidate refile targets. This may be
  any of:
  - a cons cell (:tag . "TAG") to identify refile targets by a tag.
    This tag has to be present in all target headlines, inheritance will
    not be considered.
  - a cons cell (:todo . "KEYWORD") to identify refile targets by
    todo keyword.
  - a cons cell (:regexp . "REGEXP") with a regular expression matching
    headlines that are refiling targets.
  - a cons cell (:level . N). Any headline of level N is considered a target.
    Note that, when org-odd-levels-only is set, level corresponds to
    order in hierarchy, not to the number of stars.
  - a cons cell (:maxlevel . N). Any headline with level <= N is a target.
    Note that, when org-odd-levels-only is set, level corresponds to
    order in hierarchy, not to the number of stars.

Each element of this list generates a set of possible targets. The union of these sets is presented (with completion) to the user by org-refile.

You can set the variable org-refile-target-verify-function to a function to verify each headline found by the simple criteria above.

When this variable is nil, all top-level headlines in the current buffer are used, equivalent to the value ((nil . (:level . 1))).

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-refile.el.gz
(defcustom org-refile-targets nil
  "Targets for refiling entries with `\\[org-refile]'.
This is a list of cons cells.  Each cell contains:
- a specification of the files to be considered, either a list of files,
  or a symbol whose function or variable value will be used to retrieve
  a file name or a list of file names.  If you use `org-agenda-files' for
  that, all agenda files will be scanned for targets.  Nil means consider
  headings in the current buffer.
- A specification of how to find candidate refile targets.  This may be
  any of:
  - a cons cell (:tag . \"TAG\") to identify refile targets by a tag.
    This tag has to be present in all target headlines, inheritance will
    not be considered.
  - a cons cell (:todo . \"KEYWORD\") to identify refile targets by
    todo keyword.
  - a cons cell (:regexp . \"REGEXP\") with a regular expression matching
    headlines that are refiling targets.
  - a cons cell (:level . N).  Any headline of level N is considered a target.
    Note that, when `org-odd-levels-only' is set, level corresponds to
    order in hierarchy, not to the number of stars.
  - a cons cell (:maxlevel . N).  Any headline with level <= N is a target.
    Note that, when `org-odd-levels-only' is set, level corresponds to
    order in hierarchy, not to the number of stars.

Each element of this list generates a set of possible targets.
The union of these sets is presented (with completion) to
the user by `org-refile'.

You can set the variable `org-refile-target-verify-function' to a function
to verify each headline found by the simple criteria above.

When this variable is nil, all top-level headlines in the current buffer
are used, equivalent to the value `((nil . (:level . 1)))'."
  :group 'org-refile
  :type '(repeat
	  (cons
	   (choice :value org-agenda-files
		   (const :tag "All agenda files" org-agenda-files)
		   (const :tag "Current buffer" nil)
		   (function) (variable) (file))
	   (choice :tag "Identify target headline by"
		   (cons :tag "Specific tag" (const :value :tag) (string))
		   (cons :tag "TODO keyword" (const :value :todo) (string))
		   (cons :tag "Regular expression" (const :value :regexp) (regexp))
		   (cons :tag "Level number" (const :value :level) (integer))
		   (cons :tag "Max Level number" (const :value :maxlevel) (integer))))))