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
Message #14 received at 60467 <at> debbugs.gnu.org (full text, mbox):
>
> If it's an Emacs bug, which is possible, it's in combine-change-calls.
>
A few more details on the bug. It's still unclear to me whether the bug
is in Org or in Emacs.
When the file is opened we start with buffer-undo-list = nil.
The (org-with-limited-levels (org-map-tree 'org-promote)) body in
org-promote-subtree, called inside a combine-change-calls, adds four
entries to buffer-undo-list:
("** " . 6) <timestamp> (9 . 11) <timestamp>
which means that three characters have been removed and two have been
added in the buffer, which seems correct, although the (9 . 11) entry
looks a bit suspicious. Perhaps (6 . 8) would have been expected there?
However, this change does not happen outside the region on which
combine-change-calls is called, which is 6-11.
Upon returning from combine-change-calls, buffer-undo-list contains four
elements, when a single element would have been expected, if I understand
its docstring correctly:
(apply 1 6 10 #'undo--wrap-and-run-primitive-undo 6 10 (("** " . 6))) <timestamp> (9 . 11) <timestamp>
This bug report was last modified 1 year and 334 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.