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>
This commit is contained in:
Nicolas Goaziou 2015-05-08 11:08:09 +02:00
parent 6ac8db9dba
commit b27e630bab
2 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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'.