From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: undo an undo Date: Mon, 24 May 2004 11:24:03 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1085433124 3796 80.91.224.253 (24 May 2004 21:12:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 May 2004 21:12:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 24 23:11:39 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BSMjS-0000UE-00 for ; Mon, 24 May 2004 23:11:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BSMVH-0007b6-9C for geh-help-gnu-emacs@m.gmane.org; Mon, 24 May 2004 16:56:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BSLWH-0005d6-5c for help-gnu-emacs@gnu.org; Mon, 24 May 2004 15:53:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BSKrI-0006b3-Bp for help-gnu-emacs@gnu.org; Mon, 24 May 2004 15:12:07 -0400 Original-Received: from [148.87.2.204] (helo=inet-mail4.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BSK7N-0006iH-JO; Mon, 24 May 2004 14:24:10 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.191.10]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i4OILBV3015912; Mon, 24 May 2004 11:21:12 -0700 (PDT) Original-Received: from rgmgw1.us.oracle.com (localhost [127.0.0.1]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i4OIO5e2031456; Mon, 24 May 2004 12:24:05 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id i4OIO4wH031432; Mon, 24 May 2004 12:24:04 -0600 Original-To: , X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:18705 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18705 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 writes: dk> Joel Smith 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.