[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#77580: [PATCH] New command ediff-undo
From: |
Sean Whitton |
Subject: |
bug#77580: [PATCH] New command ediff-undo |
Date: |
Sun, 13 Apr 2025 11:13:57 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hello,
On Sat 12 Apr 2025 at 11:15pm +02, Paul D. Nelson wrote:
> Thanks so much for taking the time to think and offer feedback.
>
>>> often that the last undo step is not what you think would be, and you
>>> don't know how far you must look back
>
>> We don't keep a count of buffer changes in our heads so that we could
>> know how many changes back we need to go to get a diff that will
>> contain the information we want.
>
> The proposed commands can be useful when the number of undo steps is 1,
> 2 or infinity. Examples:
>
> 1. After a buffer reverts because a file changes.
>
> 2. When you need to revert, perhaps just in a region, across file-save
> boundaries without suitable VC or backup endpoints available, or (Juri's
> example) across file and VC boundaries within a session. (Good reason
> to add the "minus prefix" option -- thanks Juri.)
>
> 3. After any complicated Emacs command. Suppose you've just done a
> query-replace-regexp with "!" that had unexpected effects. As an
> alternative to undoing and redoing the query-replace-regexp more
> carefully, you can ediff-undo. This is really a family of examples, one
> for each complicated Emacs command.
>
> In these cases, the ergonomics seem good to me.
I'm afraid I can't agree. I'm glad they work out for you, but I'm not
sure they will for others. For example, if a complicated command or
external process has made large edits to the buffer you might make
further, small edits yourself before even realising that large edits had
been made. And then you're into counting undo operations again.
--
Sean Whitton
- bug#77580: [PATCH] New command ediff-undo, (continued)
- bug#77580: [PATCH] New command ediff-undo, Michael Heerdegen, 2025/04/09
- bug#77580: [PATCH] New command ediff-undo, Sean Whitton, 2025/04/09
- bug#77580: [PATCH] New command ediff-undo, Paul D. Nelson, 2025/04/09
- bug#77580: [PATCH] New command ediff-undo, Sean Whitton, 2025/04/09
- bug#77580: [PATCH] New command ediff-undo, Paul D. Nelson, 2025/04/10
- bug#77580: [PATCH] New command ediff-undo, Sean Whitton, 2025/04/10
- bug#77580: [PATCH] New command ediff-undo, Michael Heerdegen, 2025/04/10
- bug#77580: [PATCH] New command ediff-undo, Sean Whitton, 2025/04/11
- bug#77580: [PATCH] New command ediff-undo, Paul D. Nelson, 2025/04/12
- bug#77580: [PATCH] New command ediff-undo,
Sean Whitton <=
- bug#77580: [PATCH] New command ediff-undo, Eli Zaretskii, 2025/04/10
bug#77580: [PATCH] New command ediff-undo, Michael Heerdegen, 2025/04/09