소스 검색

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.
Carsten Dominik 5 년 전
부모
커밋
e413e7695c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lisp/org-capture.el

+ 1 - 1
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)