From 1d66a58a222612973e3b73acdb0464aa459f526a Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Fri, 25 Sep 2020 03:42:57 -0400 Subject: [PATCH] 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. --- lisp/org-capture.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index a6e95f24e..67c58ffdd 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -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)