summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-21 11:25:46 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-21 11:25:46 +0200
commitc75c574d580ca751e28881fcb6acc8a250adec88 (patch)
treeebf191935d3b087e8d11c7cd1078f528bb99c74a
parent5792f0687174a23bd5d5b2ab9013ca68520e0457 (diff)
downloadorg-mode-c75c574d580ca751e28881fcb6acc8a250adec88.tar.gz
org-capture: Fix error when clipboard is empty
* lisp/org-capture.el (org-capture-fill-template): Fix "%x" placeholder when clipboard is empty. Reported-by: Brady Trainor <mail@bradyt.com> <http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00328.html>
-rw-r--r--lisp/org-capture.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 37d1b3b..e5a1597 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1607,7 +1607,8 @@ The template may still contain \"%?\" for cursor positioning."
(v-c (and kill-ring (current-kill 0)))
(v-x (or (org-get-x-clipboard 'PRIMARY)
(org-get-x-clipboard 'CLIPBOARD)
- (org-get-x-clipboard 'SECONDARY)))
+ (org-get-x-clipboard 'SECONDARY)
+ "")) ;ensure it is a string
;; `initial' and `annotation' might have been passed. But if
;; the property list has them, we prefer those values.
(v-i (or (plist-get org-store-link-plist :initial)