GNU bug report logs - #77580
[PATCH] New command ediff-undo

Previous Next

Package: emacs;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Sun, 6 Apr 2025 15:46:02 UTC

Severity: normal

Tags: patch

Full log


Message #77 received at 77580 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: michael_heerdegen <at> web.de, 77580 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#77580: [PATCH] New command ediff-undo
Date: Sun, 13 Apr 2025 11:13:57 +0800
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




This bug report was last modified 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.