From b27e630babc461ef22528c2dccf339f84d0a8476 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 8 May 2015 11:08:09 +0200 Subject: [PATCH] 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 --- lisp/org-capture.el | 7 +++++-- lisp/org.el | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 6de5f6b33..eeb05ca98 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 7dc5f6d7c..6e4edd6cb 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'.