org-capture.el: Fix handling of variable capture location
* lisp/org-capture.el (org-capture-expand-file): Fix handling of variable capture location.
This commit is contained in:
parent
ab79f112b4
commit
9e4a1704ab
|
@ -1060,7 +1060,7 @@ case, raise an error."
|
||||||
(let ((location (cond ((equal file "") org-default-notes-file)
|
(let ((location (cond ((equal file "") org-default-notes-file)
|
||||||
((stringp file) (expand-file-name file org-directory))
|
((stringp file) (expand-file-name file org-directory))
|
||||||
((functionp file) (funcall file))
|
((functionp file) (funcall file))
|
||||||
((and (symbolp file) (bound-and-true-p file)))
|
((and (symbolp file) (boundp file)) (symbol-value file))
|
||||||
(t nil))))
|
(t nil))))
|
||||||
(or (org-string-nw-p location)
|
(or (org-string-nw-p location)
|
||||||
(error "Invalid file location: %S" location))))
|
(error "Invalid file location: %S" location))))
|
||||||
|
|
Loading…
Reference in New Issue