GNU bug report logs -
#33341
27.0.50; Undo log merging and change groups
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Sun, 11 Nov 2018 07:52:01 UTC
Severity: normal
Found in version 27.0.50
Done: Michael Heerdegen <michael_heerdegen <at> web.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 27 Nov 2020 18:43:09 +0100
with message-id <87pn3ybsr6.fsf <at> web.de>
and subject line Re: bug#33341: 27.0.50; Undo log merging and change groups
has caused the debbugs.gnu.org bug report #33341,
regarding 27.0.50; Undo log merging and change groups
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
33341: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33341
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello,
I have been playing with the undo change group functions. I found
`cancel-change-group' does not always work as expected. For example, if
you define
(defun my-test-change-groups ()
(interactive)
(insert "0\n")
(let ((g (prepare-change-group)))
(activate-change-group g)
(insert "b\n")
(insert "c\n")
(cancel-change-group g)))
and call that command in some random buffer, the final
`cancel-change-group' has no effect (i.e. nothing is reverted). In
other, similar examples, `cancel-change-group' seems to revert more than
it should.
To cite (CC'd) Stefan's remark in emacs-help, "the undo entries for
(insert "0\n"), (insert "b\n"), and (insert "c\n") are merged into a
single entry in the undo log (as a form of optimization). The
change-group code should prevent such a merge, e.g. by adding some dummy
undo element which will work like a "fence"".
Thanks,
Michael.
In GNU Emacs 27.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
of 2018-11-11 built on drachen
Repository revision: c1095b03a933d55fe1cd357881f1ca6e16e06362
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid
[Message part 3 (message/rfc822, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> diff --git a/lisp/subr.el b/lisp/subr.el
> index e009dcc2b9..1cf3a49fe4 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> [...]
> + (undo-boundary)))))
Confirmed that it's fixed with that commit.
Thanks!
Michael.
This bug report was last modified 4 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.