GNU bug report logs -
#60467
30.0.50; primitive-undo: Changes to be undone by function different from announced
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Sun, 1 Jan 2023 13:40:01 UTC
Severity: normal
Found in version 30.0.50
Done: Gregory Heytings <gregory <at> heytings.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>
> I am not sure if it is Emacs bug, but I have difficulty understanding
> the origin of the following error:
>
> 1. Create /tmp/bug.org with the following contents
>
> * h1
> ** h2
>
> 2. emacs -Q /tmp/bug.org
> 3. Move point to h2
> 4. M-x org-promote-subtree
> 5. M-x undo
> 6. Observe "Changes to be undone by function different from announced" error
>
The culprit is 85e0a69567 (in the Org repository), and the bug is fixed
by:
diff --git a/lisp/org.el b/lisp/org.el
index a98a7f5a0..becb302e1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6554,8 +6554,7 @@ See also `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
- (org-with-limited-levels (org-map-tree 'org-promote))))
+ (org-with-limited-levels (org-map-tree 'org-promote)))
(org-fix-position-after-promote))
(defun org-demote-subtree ()
@@ -6564,8 +6563,7 @@ See `org-demote' and `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
- (org-with-limited-levels (org-map-tree 'org-demote))))
+ (org-with-limited-levels (org-map-tree 'org-demote)))
(org-fix-position-after-promote))
(defun org-do-promote ()
Perhaps another better fix exists. If it's an Emacs bug, which is
possible, it's in combine-change-calls.
This bug report was last modified 1 year and 335 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.