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.
This commit is contained in:
Nicholas Vollmer 2020-09-25 03:42:57 -04:00 committed by Kyle Meyer
parent 8c44f2e33f
commit 1d66a58a22
1 changed files with 1 additions and 1 deletions

View File

@ -1595,7 +1595,7 @@ The template may still contain \"%?\" for cursor positioning."
(v-l (if (and v-a (string-match l-re v-a))
(replace-match "[[\\1]]" nil nil v-a)
v-a))
(v-L (if (or v-a (string-match l-re v-a))
(v-L (if (and v-a (string-match l-re v-a))
(replace-match "\\1" nil nil v-a)
v-a))
(v-n user-full-name)