From 04403b446a1dcb3b783a38fb5109b4acdb9ff672 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 30 Jun 2017 13:27:38 +0200 Subject: [PATCH] org-capture: Fix regression in item templates * lisp/org-capture.el (org-capture-place-item): Fix regression introduced in d6f096546. Reported-by: Alan Schmitt Reported-by: Florian Lindner --- lisp/org-capture.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 63e23cc11..03e94fb92 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1143,10 +1143,9 @@ may have been stored before." (insert txt) (org-capture-empty-lines-after) (org-capture-position-for-last-stored beg) - (forward-char 1) (setq end (point)) - (org-capture-mark-kill-region beg (1- end)) - (org-capture-narrow beg (1- end)) + (org-capture-mark-kill-region beg end) + (org-capture-narrow beg end) (if (or (re-search-backward "%\\?" beg t) (re-search-forward "%\\?" end t)) (replace-match ""))))