* org-capture.el (org-capture): Check if `org-capture-link-is-already-stored' is bound before evaluating.
If `org-protocol-capture' is the first function that calls `org-capture', this variable is locally bound while it is globally unbound. I.e. org-capture.el was not loaded before, the defvar not evaluated. If `org-protocol-capture' exits, Emacs restores the global value, which is void. --- lisp/org-capture.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 2b02b77..9ba02e2 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -372,7 +372,8 @@ bypassed." (t ;; FIXME: Are these needed? (let* ((orig-buf (current-buffer)) - (annotation (if org-capture-link-is-already-stored + (annotation (if (and (boundp 'org-capture-link-is-already-stored) + org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (org-store-link nil))) (initial (and (org-region-active-p) -- 1.7.1 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode