chan@UUNET.UU.NET (Milo Chan) (10/18/90)
There has been much recent discussion about how to undo changes in GNU Emacs. C-_ can undo recent changes. When Emacs has undone all that it remembers (when it has reached the end of the change history), it reverses the undo direction, and 're-does' the changes it just 'undid', one step at a time. QUESTION: Is there any way to reverse the direction of the undo without going 'all the way back' to the end of the change history first? Sometimes I need to undo a sequence of changes, and I undo *one step too far*. It would be nice not to have to cycle all the back to the end of the change history to re-do an accidental undo. -Milo Chan, Lehman Brothers Division, Shearson Lehman Brothers, Inc. +----------------------------------+---------------------------------------+ |Mail: Shearson Lehman Brothers |EMail: ...uunet!slcpi!dev07123!chan | | 388 Greenwich St., 11th Flr.| "slcpi!dev07123!chan"@uunet.UU.NET| | New York, NY 10007, USA | chan@fractl.tn.cornell.edu | |Voice: (212) 464-3808 |Fax: (212) 464-3011 | +----------------------------------+---------------------------------------+
xtt@mace.cc.purdue.edu (Michal Jankowski) (10/19/90)
Actually, it is easy to 're-do' unwanted 'un-do'. If you decide that you did, say, two 'un-do's too many, just type any cursor-movement command (say, ^F or right-arrow) and press C-_ twice. It will undo last two changes, which happen to be 'un-do's, in effect re-doing them. Michal Jankowski
jpayne@flam.Eng.Sun.COM (Drummer Boy) (10/19/90)
In article <5806@mace.cc.purdue.edu> xtt@mace.cc.purdue.edu (Michal Jankowski) writes: >Actually, it is easy to 're-do' unwanted 'un-do'. >If you decide that you did, say, two 'un-do's too many, just >type any cursor-movement command (say, ^F or right-arrow) >and press C-_ twice. It will undo last two changes, which happen >to be 'un-do's, in effect re-doing them. > > Michal Jankowski Yeah, but then your edit history becomes full of undos, which are not useful or helpful things to have lying around in the undo history. Pretty soon you can't tell what is going to happen when you hit UNDO.
MAP@LCS.MIT.EDU (Michael A. Patton) (10/21/90)
From: slcpi!dev07123!chan@uunet.uu.net (Milo Chan) Date: Thu, 18 Oct 90 10:36:54 EDT QUESTION: Is there any way to reverse the direction of the undo without going 'all the way back' to the end of the change history first? If you type some command other than undo---I tend to use C-A---that breaks the chain of undos. Now if you type undo (C-_) again, it undoes the last change. In this case the last change is the last undo from the previous sequence. In effect this redoes the original change. Watch out, if you redo several then make some other changes and decide to use undo to get back to some other intermediate state you may confuse yourself, I've occasionally done this so much my brain started hurting :-).
chan@UUNET.UU.NET (Milo Chan) (10/25/90)
Thanks to all who responded with the solution do re-doing undo's (pressing any other key to reverse the undo sequence). (Thank you also for not responding with any RTFM's!) :-) -Milo Chan, Shearson Lehman Brothers, Inc. +----------------------------------+---------------------------------------+ |Mail: Shearson Lehman Brothers |EMail: ...uunet!slcpi!dev07123!chan | | 388 Greenwich St., 11th Flr.| "slcpi!dev07123!chan"@uunet.UU.NET| | New York, NY 10007, USA | chan@fractl.tn.cornell.edu | |Voice: (212) 464-3808 |Fax: (212) 464-3011 | +----------------------------------+---------------------------------------+