forked from mirrors/org-mode
Check if `org-capture-link-is-already-stored' is bound before evaluating.
* 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.
This commit is contained in:
parent
fb29271143
commit
4c1b83e899
|
@ -374,7 +374,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)
|
||||
|
|
Loading…
Reference in New Issue