GNU bug report logs -
#23785
Emacs 25: "Undo" overdoes things.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Fri, 17 Jun 2016 15:03:01 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Sat, June 18, 2016 8:52 pm, Stefan Monnier wrote:
>> My concern is not with the behavior the proposed change intends to get
>> us, the concern is with the unintended consequences of the change. At
>> this late stage, I'd like to keep the risk of unintended consequences to
>> the minimum, unless we want this change so badly we agree to extend the
>> pretesting by another month or two.
>
> Yes, that's the other side of the coin, indeed.
Attached are another two patches which also solve the issue.
One adds an undo boundary specifically in revert-buffer. Works but is
questionable in that revert-buffer is pluggable -- it can call any
function, other than the default.
The other fiddles with insert-file-contents and adds an undo. It is this
function that has specialized handling for the undo list that is causing
the problem. My patch in this case is questionable in that I have randomly
pushed a call to undo-boundary near the end. It should probably be
somewere better.
Another possibility would be to have insert-file-contents call
"undo-auto--undoable-change" -- this is the root cause of the problem.
Changes are happening.
Also attached is a test case which demonstrates the problem.
So many possibilities!
[0001-Fix-missing-undo-boundary-after-revert-buffer.patch (text/x-patch, attachment)]
[0001-Fix-missing-undo-boundary-on-revert.patch (text/x-patch, attachment)]
[revert-buffer-tests.el (text/x-emacs-lisp, attachment)]
[simple-file.txt (text/plain, attachment)]
This bug report was last modified 4 years and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.