[Top][All Lists]

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

Re: Emacs undo behavior frustrating for new users. (WAS: delete-selectio

From: Joost Kremers
Subject: Re: Emacs undo behavior frustrating for new users. (WAS: delete-selection-mode as default)
Date: Mon, 15 Oct 2018 09:54:03 +0200
User-agent: mu4e 1.1.0; emacs 26.1.50

On Sun, Oct 14 2018, Karl Fogel wrote:
Richard Stallman <address@hidden> writes:
 > 1. Emacs undo is frustrating for most new users.

If that is true, it is an important issue.
What evidence is there for that statement?
If so, do we know why it is so?

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.

Personally, I'm also not very fond of Emacs' standard undo system, even though I appreciate the fact that past states of the buffer don't get lost, unlike the more common MS-Word undo/redo system. It's a little surprising to me, though, that this discussion comes up, because I thought the difficulties of Emacs' undo system for new users are well-known, and moreover, the solution is already on GNU ELPA in the form of the `undo-tree' package:

In short, undo-tree gives Emacs the common undo/redo system, but with an Emacs twist: instead of a single, linear, history of changes, in which previously "undone" states are lost when you edit the text in any way, are not lost but stored as separate branches. So the history of changes is not a single, linear line, it's a tree. One path in this tree is current, meaning undo/redo will move over it, but you can switch branches to access states that would have been lost by MS Word.

The package comes with a visualiser that shows you the tree and that updates the buffer when you walk it, making it very easy to get back to any state of the buffer's edit history. It also has some other niceties, such as time stamps and diff display.

The beauty of the package is that a new user can simply use undo/redo in the way they[1] are familiar with, but the entire power of Emacs' undo system is there when needed.

IMvHO `undo-tree' should simply be made the default undo in Emacs.


[1] Sorry, Richard! :-)

Joost Kremers
Life has its moments

reply via email to

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