Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Undo/Redo

0 views
Skip to first unread message

edit...@cca.uucp

unread,
Jun 3, 1983, 4:37:55 AM6/3/83
to
>From Laws@SRI-AI Fri Jun 3 04:37:48 1983
I am as fallible as anyone, and I have been known to make mode
errors. This is true even in EMACS, where I habitually forget to
escape from incremental search mode after finding my target.

If one types control sequences while in text mode, there is currently
little that can be done except to erase and start over. Someday
editors will allow you to execute commands directly from the text
buffer, thus letting you recover with minimal trouble. (I think the
Mainsail editor may have this capability.) Even simpler for the user
would be a command that parses back through the current insertion to
find the intended command, erases it from the text, and executes it.
Surely this isn't too difficult.

If one types text while in control mode, all hell can break loose.
EMACS makes this almost impossible because one wouldn't type text
while holding control keys. VI also protects the user since the text
has no effect until a return is entered, at which time very few text
strings can be parsed as valid commands. Any garbage which happens
to be executable can be undone with a single "u" command. (A stack
of killed text segments is also kept, but it is almost never needed
for recovery from mode errors.)

This undo command is exceedingly useful. I could not be happy in any
editor that lacked it. This is one of my chief gripes about EMACS,
although I don't think it has come up in this discussion before.
EMACS keeps most deleted text around, but you cannot recover single
characters that you have deleted and you cannot recover from
arbitrary text transformations (e.g., accidentally invoking region
fill). My (nonmode) errors in EMACS tend to be very serious, forcing
me to save my work often so that I can recover by restoring the
entire file. I do not have this problem in VI, and I feel more free
to experiment with commands that might have unknown effects. In
anthropomorphic terms, I feel that EMACS is just waiting to trap me,
whereas VI is doing its best to be helpful.

One more point on the subject of redo/undo: VI offers the "."
command for "redo the previous command". This is one
of my most used editing commands. (It is in addition to macro
definition, which is helpful but much less necessary in VI than
in EMACS.) I sorely miss a redo command in EMACS, and suggest that
one be added. On the other side, VI could use a "real-time"
macro definition facility such as the EMACS keyboard macro.

-- Ken Laws
-------

0 new messages