Skip to content

Commit 1d66a58

Browse files
progfoliokyleam
authored andcommitted
capture: Fix bare link "Args out of range"
* lisp/org-capture.el (org-capture-fill-template): Guard against empty annotation string when handling the recently added %L placeholder.
1 parent 8c44f2e commit 1d66a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lisp/org-capture.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ The template may still contain \"%?\" for cursor positioning."
15951595
(v-l (if (and v-a (string-match l-re v-a))
15961596
(replace-match "[[\\1]]" nil nil v-a)
15971597
v-a))
1598-
(v-L (if (or v-a (string-match l-re v-a))
1598+
(v-L (if (and v-a (string-match l-re v-a))
15991599
(replace-match "\\1" nil nil v-a)
16001600
v-a))
16011601
(v-n user-full-name)

0 commit comments

Comments
 (0)