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

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

RE: undo an undo


From: Drew Adams
Subject: RE: undo an undo
Date: Mon, 24 May 2004 11:24:03 -0700

It might be better to point out that the undo history is not a stack; it is
never popped. The user variable undo-limit is the maximum length of the undo
history.

What happens when you execute any command besides undo is that undo is
exited; that's all. If you then reexecute undo, the actions just undone are
themselves undone.

But, and this is where this explanation differs from those already given,
all that is really happening is that these undo-of-the-undo actions are
themselves being *added* to the undo history. Nothing is removed from the
undo history; instead, actions that undo stuff (that you undid, perhaps) are
added to the history.

This means that you can undo undo, undo undo undo, etc. as much as you like
(up to the undo-limit). You can play back and rewind the film as much as you
like - the undo history keeps recording, however: all your playback and
rewind actions are added to the history.

 - Drew

-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Paul D. Smith
Sent: Monday, May 24, 2004 10:04 AM
To: address@hidden
Subject: Re: undo an undo


%% David Kastrup <address@hidden> writes:

  dk> Joel Smith <address@hidden> writes:
  >> how do i restore what i've accidently undone?  i.e.  i hit C-x u and
then
  >> realize that i really wanted it?  what do i do to restore it?

  dk> Move the cursor and press C-x u again.

You can use any command that "breaks" the undo sequence; then it will go
back to the beginning again (and the first thing on the undo list now
will be the change the last undo made).  I personally prefer to use C-g;
it seems to fit in this context and it's something my "muscle memory"
knows how to type very quickly.  I do the same with yank.





reply via email to

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