summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-04 17:30:12 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-04 17:30:12 +0100
commitc81f9fff3b111869acc6880cdd56920280494cfc (patch)
tree71e8f8362a4c9fafd0b27ec0837ff570f25d4ab6
parent1d0a27e227d41627793187d9bd25d62a05fdaf94 (diff)
downloadorg-mode-c81f9fff3b111869acc6880cdd56920280494cfc.tar.gz
Revert "org-capture: Remove forbidden value type from "file" templates"
This reverts commit 5485170263a46fa17db67b0324c4c4e48bcdfe49.
-rw-r--r--lisp/org-capture.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index ced8399..690d342 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1008,13 +1008,16 @@ Store them in the capture property list."
(defun org-capture-expand-file (file)
"Expand functions and symbols for FILE.
-When FILE is a function, call it. When it is a variable,
-retrieve its value. When it is the empty string, return
-`org-default-notes-file'. In any other case, return FILE as-is."
+When FILE is a function, call it. When it is a form, evaluate
+it. When it is a variable, retrieve the value. When it is
+a string, return it. However, if it is the empty string, return
+`org-default-notes-file' instead."
(cond
((equal file "") org-default-notes-file)
+ ((org-string-nw-p file) file)
((functionp file) (funcall file))
((and (symbolp file) (boundp file)) (symbol-value file))
+ ((consp file) (eval file))
(t file)))
(defun org-capture-target-buffer (file)