Function: org-capture-expand-headline
org-capture-expand-headline is a byte-compiled function defined in
org-capture.el.gz.
Signature
(org-capture-expand-headline HEADLINE)
Documentation
Expand functions, symbols and headline names for HEADLINE.
When HEADLINE is a function, call it. When it is a variable, return its value. When it is a string, return it. In any other case, signal an error.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defun org-capture-expand-headline (headline)
"Expand functions, symbols and headline names for HEADLINE.
When HEADLINE is a function, call it. When it is a variable, return
its value. When it is a string, return it. In any other case, signal
an error."
(let* ((final-headline (cond ((stringp headline) headline)
((functionp headline) (funcall headline))
((and (symbolp headline) (boundp headline))
(symbol-value headline))
(t nil))))
(or final-headline
(error "org-capture: Invalid headline target: %S" headline))))