[Top][All Lists]

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

bug#23785: Emacs 25: 'Undo' overdoes things.

From: Phillip Lord
Subject: bug#23785: Emacs 25: 'Undo' overdoes things.
Date: Sun, 19 Jun 2016 23:45:44 +0100
User-agent: SquirrelMail/1.5.2 [SVN]

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!

Attachment: 0001-Fix-missing-undo-boundary-after-revert-buffer.patch
Description: Text Data

Attachment: 0001-Fix-missing-undo-boundary-on-revert.patch
Description: Text Data

Attachment: revert-buffer-tests.el
Description: Text Data

Attachment: simple-file.txt
Description: Text document

reply via email to

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