From 127f86bdc5f1f42622c458b8b196759b74dae75b Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Sat, 28 May 2016 11:35:37 +0200 Subject: [PATCH] org: Fix interactive headline edit * lisp/org.el (org-edit-headline): Save match-data before calling read-string. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d615de233..d7e84493e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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)))