emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33341: closed (27.0.50; Undo log merging and change groups)


From: GNU bug Tracking System
Subject: bug#33341: closed (27.0.50; Undo log merging and change groups)
Date: Fri, 27 Nov 2020 17:44:02 +0000

Your message dated Fri, 27 Nov 2020 18:43:09 +0100
with message-id <87pn3ybsr6.fsf@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@gnu.org.)


-- 
33341: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33341
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 27.0.50; Undo log merging and change groups Date: Sun, 11 Nov 2018 08:50:43 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
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




--- End Message ---
--- Begin Message --- Subject: Re: bug#33341: 27.0.50; Undo log merging and change groups Date: Fri, 27 Nov 2020 18:43:09 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Stefan Monnier <monnier@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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]