org-capture: Remove forbidden value type from "file" templates
* lisp/org-capture.el (org-capture-expand-file): Remove plain S-exps from allowed values.
This commit is contained in:
parent
8860c92f62
commit
5485170263
|
@ -1002,16 +1002,13 @@ Store them in the capture property list."
|
||||||
|
|
||||||
(defun org-capture-expand-file (file)
|
(defun org-capture-expand-file (file)
|
||||||
"Expand functions and symbols for FILE.
|
"Expand functions and symbols for FILE.
|
||||||
When FILE is a function, call it. When it is a form, evaluate
|
When FILE is a function, call it. When it is a variable,
|
||||||
it. When it is a variable, retrieve the value. When it is
|
retrieve its value. When it is the empty string, return
|
||||||
a string, return it. However, if it is the empty string, return
|
`org-default-notes-file'. In any other case, return FILE as-is."
|
||||||
`org-default-notes-file' instead."
|
|
||||||
(cond
|
(cond
|
||||||
((equal file "") org-default-notes-file)
|
((equal file "") org-default-notes-file)
|
||||||
((org-string-nw-p file) file)
|
|
||||||
((functionp file) (funcall file))
|
((functionp file) (funcall file))
|
||||||
((and (symbolp file) (boundp file)) (symbol-value file))
|
((and (symbolp file) (boundp file)) (symbol-value file))
|
||||||
((consp file) (eval file))
|
|
||||||
(t file)))
|
(t file)))
|
||||||
|
|
||||||
(defun org-capture-target-buffer (file)
|
(defun org-capture-target-buffer (file)
|
||||||
|
|
Loading…
Reference in New Issue