diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-30 13:27:38 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-30 13:27:38 +0200 |
commit | 04403b446a1dcb3b783a38fb5109b4acdb9ff672 (patch) | |
tree | e14a44a9e0c3ccfb589a06e7356d423587f86f2a | |
parent | f409c13be16697a0ebda5d350a68e6351f5b6642 (diff) | |
download | org-mode-04403b446a1dcb3b783a38fb5109b4acdb9ff672.tar.gz |
org-capture: Fix regression in item templates
* lisp/org-capture.el (org-capture-place-item):
Fix regression introduced in d6f096546.
Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00591.html>
Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00606.html>
-rw-r--r-- | lisp/org-capture.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 63e23cc..03e94fb 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 "")))) |