all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: undo an undo
Date: Mon, 24 May 2004 11:24:03 -0700	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBEEPACEAA.drew.adams@oracle.com> (raw)
In-Reply-To: <vpdrlljh3gg7.fsf@lemming.engeast.baynetworks.com>

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: help-gnu-emacs-bounces+drew.adams=oracle.com@gnu.org
[mailto:help-gnu-emacs-bounces+drew.adams=oracle.com@gnu.org]On Behalf
Of Paul D. Smith
Sent: Monday, May 24, 2004 10:04 AM
To: help-gnu-emacs@gnu.org
Subject: Re: undo an undo


%% David Kastrup <dak@gnu.org> writes:

  dk> Joel Smith <Joelvsmith@earthlink.net> 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.

  parent reply	other threads:[~2004-05-24 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-24 16:23 undo an undo Joel Smith
2004-05-24 16:48 ` David Kastrup
2004-05-24 17:03   ` Paul D. Smith
2004-05-24 18:04     ` Peter Gjefle
2004-05-24 18:24     ` Drew Adams [this message]
2004-05-24 20:21 ` Micha Feigin
     [not found] ` <mailman.7135.1085440202.1061.help-gnu-emacs@gnu.org>
2004-05-26 18:21   ` Stefan Monnier
     [not found] <mailman.7092.1085432180.1061.help-gnu-emacs@gnu.org>
2004-05-25  9:58 ` Mathias Dahl
2004-05-26 18:26 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FDELKNEBLPKKDCEBEJCBEEPACEAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.