unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Noel Taylor <noeltaylo@gmail.com>, emacs-devel@gnu.org
Subject: Re: Emacs undo behavior frustrating for new users.
Date: Sun, 14 Oct 2018 23:59:12 -0500	[thread overview]
Message-ID: <874ldnajq7.fsf@red-bean.com> (raw)
In-Reply-To: <jwvlg702x5f.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Sun, 14 Oct 2018 14:42:26 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2018-10-15  4:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08  3:49 delete-selection-mode as default (WAS: Some developement questions) Bingo
2018-09-08  7:23 ` Eli Zaretskii
2018-09-08  8:33   ` Bingo
2018-09-08  9:26     ` Eli Zaretskii
2018-09-09 13:13       ` Alan Mackenzie
2018-09-09 14:53         ` Drew Adams
2018-09-09 15:12         ` Eli Zaretskii
2018-09-09 17:59         ` Ergus
2018-09-09 19:12           ` Alan Mackenzie
2018-09-09 22:33             ` Ergus
2018-09-09 23:34               ` Drew Adams
2018-09-11  4:22 ` Richard Stallman
2018-10-14 16:07   ` Emacs undo behavior frustrating for new users. (WAS: delete-selection-mode as default) Karl Fogel
2018-10-14 18:42     ` Emacs undo behavior frustrating for new users Stefan Monnier
2018-10-15  4:59       ` Karl Fogel [this message]
2018-10-15  6:11         ` Noel Taylor
2018-10-15  5:43     ` Emacs undo behavior frustrating for new users. (WAS: delete-selection-mode as default) Richard Stallman
2018-10-15  7:28       ` Van L
2018-10-16  6:44         ` Richard Stallman
2018-10-17 10:09           ` Nathan Moreau
2018-10-17 10:38             ` Emacs undo behavior frustrating for new users Andreas Schwab
2018-10-18  7:23               ` Richard Stallman
2018-10-17 12:00             ` Garreau, Alexandre
2018-10-17 14:05               ` Nathan Moreau
2018-10-17 14:20                 ` Garreau, Alexandre
2018-10-17 14:33               ` Yuri Khan
2018-10-17 16:06                 ` Eli Zaretskii
2018-10-18  7:23                 ` Richard Stallman
2018-10-15  8:26       ` Emacs undo behavior frustrating for new users. (WAS: delete-selection-mode as default) Yuri Khan
2018-10-16  6:44         ` Richard Stallman
2018-10-16  7:22           ` Yuri Khan
2018-10-17  7:05             ` Richard Stallman
2018-10-20  8:15           ` Marcin Borkowski
2018-10-20 18:33             ` Elias Mårtenson
2018-10-15  7:54     ` Joost Kremers
2018-10-15  9:27       ` Joost Kremers
2018-10-15 12:01       ` Emacs undo behavior frustrating for new users Óscar Fuentes
2018-10-15 13:28         ` Joost Kremers
2018-10-16 12:27           ` Stefan Monnier
2018-10-17  7:05             ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ldnajq7.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=noeltaylo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).