summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-05-08 11:08:09 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-05-08 11:32:35 +0200
commitb27e630babc461ef22528c2dccf339f84d0a8476 (patch)
treef1e8d622bbd2d2785917fe1a9cb765efe20903f5
parent6ac8db9dbabd83152612c65a9cd505390a1915d1 (diff)
downloadorg-mode-b27e630babc461ef22528c2dccf339f84d0a8476.tar.gz
org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults to `org-default-notes-file'. * lisp/org.el (org-default-notes-file): Do not fallback on `remember-data-file' since "org-capture.el" is not based off "remember.el" anymore. Reported-by: Florian Lindner <mailinglists@xgm.de> <http://permalink.gmane.org/gmane.emacs.orgmode/97448>
-rw-r--r--lisp/org-capture.el7
-rwxr-xr-xlisp/org.el4
2 files changed, 6 insertions, 5 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 6de5f6b..eeb05ca 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -966,12 +966,15 @@ 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 form, evaluate
-it. When it is a variable, retrieve the value. Return whatever we get."
+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))
- ((and file (consp file)) (eval file))
+ ((consp file) (eval file))
(t file)))
(defun org-capture-target-buffer (file)
diff --git a/lisp/org.el b/lisp/org.el
index 7dc5f6d..6e4edd6 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -2315,9 +2315,7 @@ Used as a fall back file for org-capture.el, for templates that
do not specify a target file."
:group 'org-refile
:group 'org-capture
- :type '(choice
- (const :tag "Default from remember-data-file" nil)
- file))
+ :type 'file)
(defcustom org-goto-interface 'outline
"The default interface to be used for `org-goto'.