From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: make undo operate as in (no flames please) vim Date: Sun, 25 Jan 2009 09:02:38 -0800 Message-ID: <003501c97f0e$ba8c8210$0200a8c0@us.oracle.com> References: <87eiyusrn4.fsf@newsguy.com><000f01c97e88$e231db20$0200a8c0@us.oracle.com> <87vds3miqt.fsf@newsguy.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232903380 20147 80.91.229.12 (25 Jan 2009 17:09:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2009 17:09:40 +0000 (UTC) To: "'Harry Putnam'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 18:10:50 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LR8VA-0004Kz-VX for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 18:10:29 +0100 Original-Received: from localhost ([127.0.0.1]:43529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR8Tt-0003xh-3o for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 12:09:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR8NV-0007iC-Il for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:02:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR8NV-0007gv-03 for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:02:33 -0500 Original-Received: from [199.232.76.173] (port=40137 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR8NT-0007gg-Ok for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:02:32 -0500 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:56127 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LR8NS-0008O5-MB for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:02:31 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n0PH4ND1016267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 25 Jan 2009 17:04:25 GMT Original-Received: from acsmt701.oracle.com (acsmt701.oracle.com [141.146.40.71]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n0PH2PY3029583; Sun, 25 Jan 2009 17:02:26 GMT Original-Received: from dradamslap1 (/24.5.128.33) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 25 Jan 2009 09:02:24 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87vds3miqt.fsf@newsguy.com> Thread-Index: Acl/DV5KQNWXR4SYTgWbM5vtMgtWfAAADjlw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt701.oracle.com [141.146.40.71] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.497C9B21.020A:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61629 Archived-At: > You've hit on one of the reasons I had grown to dread using undo. > > I resorted to the prefix arg to eliminate possibly dozens of C-x u > presses which inevitably would lead sooner or later to hitting > `C-x-u', the dread upcase-region that totally disrupts the work flow. > And, like you guessed... there'd come a point where I'd have to figure > out if I'd passed the goal, and by then it wasn't unlikely that I'd be > somewhat confused about what was or wasn't undone.... Then the whole > thing with arrow keys to indicate which way to go with undo can get > pretty confusing too. Dunno what you mean by "the thing with arrow keys". Maybe that is something new that I am unaware of. The general rule is that undo just undoes. Including undoing what it itself did. That means that to seemingly go backwards you need only do something other than undo, then start doing undo again. Example: C-/ C-/ C-/ SPC C-/ C-/ Hitting the space bar (or some other key, such as an arrow key) stops undoing. Then hitting C-/ again undoes the space char insertion and starts undoing the undo's that you did previously. In this way, you can seemingly go backwards and forwards, like rewinding a movie. You are not actually rewinding it, however: everything you do is added to the undo chain. It's just that the undo chain then itself has back and forth actions. That's not a clear explanation - sorry. But if you try it you'll see what I mean, I think. This page might also help: http://www.emacswiki.org/emacs/CategoryUndo > Now if only I can break the ingrained habit of using C-x u.... ;-) And I do hope someone helps you find the Vim-like behavior you really want.