summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2019-07-27 21:57:21 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2019-07-27 21:57:21 +0200
commite413e7695c4872ff4eca12d4ce2ef367d4284530 (patch)
tree58bdc4e62cb86ff6abe985466a19d16bdf835989
parente059c1c1da326b6a64f372db8093b9828e3b39a0 (diff)
downloadorg-mode-e413e7695c4872ff4eca12d4ce2ef367d4284530.tar.gz
Keep brackets around capture link annotation, to protect spaces
2019-07-27 Carsten Dominik <carsten.dominik@gmail.com> * lisp/org-capture.el (org-capture-fill-template): Keep [[]] around the %l link annotation. When capture is called from a buffer and the template includes a %l annotation, then this link needs to be enclosed in [[ ... ]]. The default link is a search link that searches for the line at point - and when the link contains whitespace, it needs to be part of the link.
-rw-r--r--lisp/org-capture.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 965ccc3..1b785bb 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1571,7 +1571,7 @@ The template may still contain \"%?\" for cursor positioning."
(replace-match "[[\\1][%^{Link description}]]" nil nil v-a)
v-a))
(v-l (if (and v-a (string-match l-re v-a))
- (replace-match "\\1" nil nil v-a)
+ (replace-match "[[\\1]]" nil nil v-a)
v-a))
(v-n user-full-name)
(v-k (if (marker-buffer org-clock-marker)