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

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

why "undo the undo" is not equivalent to redo


From: Samuel Wales
Subject: why "undo the undo" is not equivalent to redo
Date: Fri, 20 Nov 2009 15:51:00 -0700

I have had this around for a while.  The usual advice from
undoers is that "undo the undo" is sufficient.  This offers
a different take, one that you might not have seen.  Now
seems a good time to post it.


There are several types of emacs users, including these:

  1) (UNDOERS) those for whom "undo the undo" works well
  2) (REDOERS) those who would prefer undo-redo

There are several types of undoers, including these:

  1) those who want to understand what the redoers are
     saying
  2) those who understand what the redoers are saying, but
     personally do not experience the problem
  3) those who are confident that they understand what the
     redoers are saying, but actually have no idea

The goal of this post is to turn type 1 into type 2.  None
other.

Here is what you can do.

At each place in the history, I want you to copy something,
then paste into another buffer.  In other words, your task
is to gather snippets from the undo history together into a
buffer.

Because undo is claimed to do everything that redo does, you
are not allowed to use an external package[1] or write
code to assist.  You must use your customary undo settings.

Whenever I say a number below, assume that the true number
is unknown.  Imagine a complicated set of edits.  You are
simulating a real-life scenario in which you do not know how
many undos are necessary to get to the place you need.  So
if I say "go back 50", you can't realistically do c-u 50
c-/.  To simulate accurately, undo repeatedly to get to
where you need to go.

Ready?

Go back 50 edits, copy, go back 5 more edits in the original
history from that point, copy, go forward 10 from that
point, copy, go forward 15, copy, go back 15 more, copy, go
back 15 more, copy.

I recommend that you try it in the spirit of empiricism
instead of guessing what will happen.[2] You might find
that undo-the-undo is cognitively burdensome, error prone,
and slow.  You might even find that redo could be useful,
even though it will not be useful for you.

Next, read [http://www.emacswiki.org/emacs/CategoryUndo#toc9]
and the intro to [http://www.emacswiki.org/emacs/RedoMode] .
Note that redo mode corrupts the buffer, so it is useless.

Sometimes a type 3 undoer will say things like the
following.  I think they are trying to help.  At least, I
hope so.

  1) "640k[3], I mean undo, is all any Emacs user will
     ever need"[4]
  2) "why not just use [let me do M-x apropos-variable redo
     RET on the assumption that suggesting something almost
     at random to you will solve the problem]
     undo-no-redo?".[5]
  3) "just use redo.el[6]"
  4) "you will lose undo history, and therefore, you need
     undo-the-undo."[7]

However, I have only aimed at converting type 1 undoers to
type 2.  So, although there will be criticism like this, I
think it's irrelevant.  I would, of course, be happy to be
proved wrong by a type 1.

Maybe that will help turn type 1 into type 2.

Hope it helps.


Footnotes:

[1] This is similar to red herring #2.

[2] If you desire to respond before trying it, there is
a chance that you are type 3.  If you tried it and found
undo-the-undo to be an ideal undo experience, tell me.

[3] I am aware that Gates might not have said that.

[4] Turing tar pit.

[5] Did you try it?  It is a curious phenomenon that
people confidently suggest random things anyway.  I wonder
what the psychology is.  Is it something like "it's not a
problem for me, therefore not a problem for you, therefore
any random suggestion will work for you"?  This extends far
beyond emacs and deserves study by experimental social
psychologists.  It deserves a name, like the Confident
Random Suggestion Error.

[6] It corrupts the buffer.

[7] Contrary to popular misconception, a redo mechanism
does not have to mean that you lose undo history if you
branch.  It is possible to have the entire tree of undos.
The concepts are orthogonal.  In fact, undo-the-undo
conflates undo, redo, and branching, while redo does not (it
separates redo from undo).  You simply have a command to
choose which branch to take.  You can put the branch number
in the mode line.  You can even draw a text diagram, much
like git's history diagrams.  This is not implemented in the
(buffer-corrupting) redo.el -- but some prefer redo.el
despite that.  I have run across detailed descriptions of
this, but it is not necessary to make the point.

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: You only think it's dark. [CDC has denied ME/CFS for 25 years]
=================================================================
Retrovirus: http://www.wpinstitute.org/xmrv/xmrv_qa.html




reply via email to

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