help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Visual Feedback in Undo/Redo


From: Xah Lee
Subject: Re: Visual Feedback in Undo/Redo
Date: Thu, 18 Dec 2008 13:37:40 -0800 (PST)
User-agent: G2/1.0

On Dec 17, 11:26 am, "Samuel Wales" <samolog...@gmail.com> wrote:
> To me, the lack of an ordinary redo command 
> (seehttp://www.emacswiki.org/emacs/CategoryUndo#toc9-- redo.el corrupts
> the buffer) is the biggest user need.
>
> I am very surprised at the lack of a redo in emacs, actually.
>
> I don't mind if there are fancy geeky features also tucked away,
> however, as long as they don't cause bugs or get in the way of the
> basic functionality.

i concur.

I used emacs daily for more than 8 hours a day since 1998.  In my now
one decade of using emacs, i don't recall i ever needed undo of
undos.  To achieve redo, i do “type something and undo”. But once this
is done, any undo history before that point are effectively useless to
me, because the roller-coasting undo history is too convoluted for the
mind to keep up.

I started to use “redo.el” in about 2006 with Carbon emacs on the Mac.
Supposedly, it solves the problem. However, i've also noticed that
sometimes it does weird things not expectated. Also, it does not seems
to actually make emacs's undo system into just undo and redos. The
emacs's “undo of undos” seems still available...

Even having lived in emacs for 10 years, first 5 years being purely in
a text terminal, and having programed elisp weekly since 2006, i've
never taken the time to investigate what exactly “redo.el” is doing...
(a look at emacs wiki indicates that there are few others too)

They say linux is a black hole of your time. Emacs geeks might say you
should read the doc, and that your confusing is caused by your
ignorance, etc. When one post this in so much as a complaint to emacs
forums, then emacs geeks insist in some chastising tone that you
should either read the fucking manual to clear your confusion, or
(further) take your time to report the bug. If one is to spend time on
all these little details, one wouldn't go anywhere in life.

Many emacs geekers may feel that the above sentiment is just mine, not
shared by many. The fact is, the defensive view of emacs's ways is
some 0.01% of professional programers. Emacs geeks are just a tight
clique among themselves. In a similar way, Apple computer users is
some ~5% in the past 10 years, and linux/unix some less, and lesser is
Common Lisp or Scheme Lisp programers among programers. Some issues
comes up frequently in online forums of these communities, and in the
ensuing defensive discussion, any outsider can see how bizarre and
silly these geekers have become, but not by themselves. Although many
aspects of Mac and Lisp are simply superior, but not necessarily
immune to the fast changing computing world, especially in the last 10
years. The tech geekers, have ceased to be capable to see things
outside their world.

In 2006, i selected some 5 items that i consider emacs should change.
These items are selected roughly by their ratio of “impact”/“ease of
fix”.

• The Modernization of Emacs
  http://xahlee.org/emacs/modernization.html

2 of the items, are now fixed in the upcoming emacs 23, namely:
highlighting text selection and cursor moving by visual line.

Having a simple undo/redo is one of them.

Here's a excerpt on the undo/redo issue:

Q: Emacs's undo is superior, because the prevalent Undo/Redo system
actually lose info.

A: Emac's undo is very confusing and does not have a Redo command. To
redo after a undo, people are told to type something then do a undo.
Long time emacs user argue that it is technically superior because it
lets user to revert to any possible state of the past.

A practical problem with the way of emacs undo is that it repeats the
states in the action record. In the prevalent undo model, the action
record is linear, and each entry is unique. A user can easily arrive
at a desired previous state using undo and redo. Think of it as a time-
line with a needle. “Undo” is like moving the needle backward, and
“redo” moves the needle forward. A user does a sequence of undos and
redos to move the needle to where he wants, then he starts there
fresh.

Emacs's undo is not based on simple time-line. In emacs, every undo
pushes a state to a stack. If we think in terms of a time-line of
unique states, then each emacs's “undo” may move the needle backward
or it may move it forward. If a user ever did a redo (by typing
something then undo), then a series of undos will traverse the time-
line back and forth. It is hard for a user to know when to do undo or
do “some random typing followed by undo” to get to the state he wants.
In particular, once a person did more than once of “some random typing
followed by undo”, the undo record becomes too convoluted for a person
to keep in mind and the benefit of undo facility is ruined at that
point.

If you take a survey among programers who use emacs for at least 1
year, perhaps more than 90% will report it confusing and not
productive. If you take a survey of software users other than emacs, i
do not think anyone will complain that they are unable undo their
undos.

It is reasonable to argue, that people work better with a simple undo/
redo model. Undo is practically used to erase a mistake or doing a
simple one-time revision. Once a user did a sequence of undos and
redos, we can assume that he arrived at a satisfactory point and
intends to start fresh from that point. If he needs extra revision
control, a more proper mechanism, one that people actually use, is to
revert to the saved version.

For some discussions, see: 
http://briancarper.net/2008/05/25/emacs-undo-is-horrible/,
http://www.reddit.com/r/programming/info/6kscz/comments/.

------------------------------

If you feel that emacs's undo is hard to use, perhaps it is welcome in
“Alt+x report-emacs-bug”.

Alternatively, use Aquamacs Emacs on the Mac, or send a mail to
Lennart Borgman (author of EmacsW32 for Windows). Maybe Lennart can
take the burden of modernization of emacs by broadening his EmacsW32's
Windows UI conformity.

  Xah
∑ http://xahlee.org/

reply via email to

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