emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs undo behavior frustrating for new users.


From: Karl Fogel
Subject: Re: Emacs undo behavior frustrating for new users.
Date: Sun, 14 Oct 2018 23:59:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:
>> Here is an answer from my friend Noel, who was recently a new user of Emacs.
>> (He still uses Emacs, he's just no longer a new user.)  When I saw your
>> question above, I remembered Noel's frustration with Emacs's default undo
>> behavior when he was learning Emacs, and I asked him if he'd be willing to
>> write it up.
>
>BTW, Emacs does provide the "usual" undo command under the name
>`undo-only` (it only affects the way Emacs traverses the undo history,
>not the way the undo history is built, so it can be mixed with Emacs's
>traditional `undo` just fine).
>We could also provide a corresponding `undo-redo` command, which
>similarly only performs redo actions.

Thanks, Stefan.  I've added Noel Taylor back to CC here, so he sees this too.  
(He's not subscribed to this list.)

I didn't know about that command.  I had searched for a variable that would 
control undo behavior -- I wasn't imaginative enough to guess that it might 
simply be a separate command, rather than a variable that changes the behavior 
of the familiar command.

Noel, want to try binding `undo-only' to replace your normal `undo` keybindings 
and see if that provides a behavior that seems more natural to you?

(And see how much you miss not having `undo-redo'... That probably wouldn't be 
very hard to implement, but I'm conspicuously not volunteering until we have a 
sense of how badly it would be missed by someone who is accustomed to having 
it.)

>>> The other behavior that can be confusing to new users of emacs is
>>> that if the user is in the process of "undoing" to an earlier point
>>> in the action history, the act of moving the cursor (for example,
>>> with the arrow keys) will interrupt the undo sequence even though no
>>> change has been made to the contents of the buffer.
>
>I've been using here a patch which makes `undo` query the user when this
>happens.  More specifically, if you call `undo` when the last buffer
>modification was itself an undo but the last command was not an undo, it
>prompts the user asking where they want to continue undoing.

Interesting!  Is that patch posted (or are you planning to post it after all 
the kinks get worked out)?

Best regards,
-Karl



reply via email to

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