0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

org: Fix interactive headline edit

* lisp/org.el (org-edit-headline): Save match-data before calling
  read-string.
This commit is contained in:
Marco Wahl 2016-05-28 11:35:37 +02:00
parent f2c421d3c0
commit 127f86bdc5

View file

@ -8003,7 +8003,7 @@ Set it to HEADING when provided."
(org-back-to-heading t)
(when (looking-at org-complex-heading-regexp)
(let* ((old (match-string-no-properties 4))
(new (org-trim (or heading (read-string "Edit: " old)))))
(new (org-trim (or heading (save-match-data (read-string "Edit: " old))))))
(unless (equal old new)
(if old (replace-match new t t nil 4)
(goto-char (or (match-end 3) (match-end 2) (match-end 1)))