[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reverting but keeping undo
From: |
Óscar Fuentes |
Subject: |
Re: Reverting but keeping undo |
Date: |
Thu, 30 May 2013 21:19:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
>> FWIW, I just installed a patch in Emacs's trunk which makes that
>> revert-buffer doesn't discard undo history any more.
>
> I wonder how that works. Generally, the undo history belongs to a
> buffer content different from the content after reverting. Does your
> patch prevent surprises like "undoing" changes that were never made to
> the newly read-in buffer content?
I have not tried the change introduced by Stefan, so my comments below
are just hypothetical.
Keeping undo history makes a lot of sense on this scenario:
1 Visit file
2 Edit
3 Save
3 Edit
4 Revert
It is obvious that the undo history created by step 3 is unusable, but
the part created by step 2 is useful. Until now, Emacs discardeded all
undo history.
What happens when the file is modified outside of Emacs? You migth end
with elements in the undo history which are out of sync with the file
contents. I don't know how Emacs behaves on those situations.
- RE: Reverting but keeping undo, (continued)
- Message not available
- Re: Reverting but keeping undo, Dan Espen, 2013/05/29
- Re: Reverting but keeping undo, Stefan Monnier, 2013/05/29
- Message not available
- Re: Reverting but keeping undo, Dan Espen, 2013/05/29
- RE: Reverting but keeping undo, Drew Adams, 2013/05/29
- Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/30
Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/30
- Re: Reverting but keeping undo,
Óscar Fuentes <=
- Re: Reverting but keeping undo, Stefan Monnier, 2013/05/30
- Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/30
- Message not available
- Re: Reverting but keeping undo, Dan Espen, 2013/05/30
- Re: Reverting but keeping undo, Stefan Monnier, 2013/05/30
- Message not available
- Re: Reverting but keeping undo, Dan Espen, 2013/05/30
- RE: Reverting but keeping undo, Drew Adams, 2013/05/30
Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/31
Re: Reverting but keeping undo, Óscar Fuentes, 2013/05/31
Message not availableRe: Reverting but keeping undo, Dan Espen, 2013/05/31
Re: Reverting but keeping undo, Barry Margolin, 2013/05/31