all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* undo an undo
@ 2004-05-24 16:23 Joel Smith
  2004-05-24 16:48 ` David Kastrup
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joel Smith @ 2004-05-24 16:23 UTC (permalink / raw)



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?  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
  2004-05-24 16:23 Joel Smith
@ 2004-05-24 16:48 ` David Kastrup
  2004-05-24 17:03   ` Paul D. Smith
  2004-05-24 20:21 ` Micha Feigin
       [not found] ` <mailman.7135.1085440202.1061.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 9+ messages in thread
From: David Kastrup @ 2004-05-24 16:48 UTC (permalink / raw)


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?

Move the cursor and press C-x u again.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Paul D. Smith @ 2004-05-24 17:03 UTC (permalink / raw)


%% 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.

Of course whatever works for you is best.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
  2004-05-24 17:03   ` Paul D. Smith
@ 2004-05-24 18:04     ` Peter Gjefle
  2004-05-24 18:24     ` Drew Adams
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Gjefle @ 2004-05-24 18:04 UTC (permalink / raw)



* Paul D. Smith (2004 May 24, 13 o'clock)
> Of course whatever works for you is best.

or search for previous posts on - redo.el -

 .peter

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: undo an undo
  2004-05-24 17:03   ` Paul D. Smith
  2004-05-24 18:04     ` Peter Gjefle
@ 2004-05-24 18:24     ` Drew Adams
  1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2004-05-24 18:24 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
  2004-05-24 16:23 Joel Smith
  2004-05-24 16:48 ` David Kastrup
@ 2004-05-24 20:21 ` Micha Feigin
       [not found] ` <mailman.7135.1085440202.1061.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Micha Feigin @ 2004-05-24 20:21 UTC (permalink / raw)


On Mon, May 24, 2004 at 12:23:37PM -0400, Joel Smith wrote:
> 
> 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?  

Either break the undo chain by pressing a key or C-g and then undo will
start redoing, or get the redo.el package (either google or email me
privately) and add something like the following to your .emacs:

(global-set-key "\C-xU" 'redo)
(global-set-key [(control +)]  'redo)

> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
       [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
  1 sibling, 0 replies; 9+ messages in thread
From: Mathias Dahl @ 2004-05-25  9:58 UTC (permalink / raw)


"Drew Adams" <drew.adams@oracle.com> writes:

> 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.

And when using the film-metaphor:

 http://article.gmane.org/gmane.emacs.sources/599

Mathias Dahl

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
       [not found] ` <mailman.7135.1085440202.1061.help-gnu-emacs@gnu.org>
@ 2004-05-26 18:21   ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2004-05-26 18:21 UTC (permalink / raw)


> (global-set-key "\C-xU" 'redo)

I think of C-x U as a stronger form of C-x u, so instead of redoing, it
should just undo more strongly, so I use it for `undo-only' which
skips redo-undo pairs while undoing.


        Stefan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: undo an undo
       [not found] <mailman.7092.1085432180.1061.help-gnu-emacs@gnu.org>
  2004-05-25  9:58 ` undo an undo Mathias Dahl
@ 2004-05-26 18:26 ` Stefan Monnier
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2004-05-26 18:26 UTC (permalink / raw)


> It might be better to point out that the undo history is not a stack;

Indeed, it's more like a tree, in the sense that when you undo something you
go back towards the root and future changes will be recorded as a new
branch.  But since the undo itself is a change, it is also recorded in the
tree at the tip of the current branch.  So you really get a big ugly
directed acyclic graph.


        Stefan

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-05-26 18:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.7092.1085432180.1061.help-gnu-emacs@gnu.org>
2004-05-25  9:58 ` undo an undo Mathias Dahl
2004-05-26 18:26 ` Stefan Monnier
2004-05-24 16:23 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
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

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.