From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: [CVS] f7, f8 bound.. Date: 31 Aug 2002 11:16:38 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: <87d6rzpybd.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <87lm6xiruh.fsf@computer.localdomain> <5xu1liwmu6.fsf@kfs2.cua.dk> <200208261526.g7QFQX624783@rum.cs.yale.edu> <5xu1lgu1e4.fsf@kfs2.cua.dk> <200208271621.g7RGLNm30516@rum.cs.yale.edu> <5xhehfe3aj.fsf@kfs2.cua.dk> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030760302 13339 127.0.0.1 (31 Aug 2002 02:18:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 31 Aug 2002 02:18:22 +0000 (UTC) Cc: storm@cua.dk, monnier+gnu/emacs@rum.cs.yale.edu, deego@glue.umd.edu, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17kxq7-0003T2-00 for ; Sat, 31 Aug 2002 04:18:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17kyN9-0006Z6-00 for ; Sat, 31 Aug 2002 04:52:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kxrV-0001fH-00; Fri, 30 Aug 2002 22:19:45 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17kxpQ-0001ag-00 for emacs-devel@gnu.org; Fri, 30 Aug 2002 22:17:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17kxpO-0001aU-00 for emacs-devel@gnu.org; Fri, 30 Aug 2002 22:17:36 -0400 Original-Received: from smtp02.fields.gol.com ([203.216.5.132]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kxpN-0001aO-00; Fri, 30 Aug 2002 22:17:33 -0400 Original-Received: from tc-2-218.kawasaki.gol.ne.jp ([203.216.25.218] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.fields.gol.com with esmtp (Magnetic Fields) id 17kxpA-0008AX-00; Sat, 31 Aug 2002 11:17:21 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id 9ACD7306E; Sat, 31 Aug 2002 11:16:38 +0900 (JST) Original-To: Richard Stallman In-Reply-To: System-Type: i686-pc-linux-gnu Original-Lines: 95 X-Abuse-Complaints: abuse@gol.com Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7196 Richard Stallman writes: > Hmm, what I was thinking was that it would end the macro definition, and > immediately execute the macro. I'm not sure that there's much > advantage to having it just end the macro, > > Simplicity is the advantage. Simplicity in what way? (A) Conceptually? I think end-macro-definition and execute-macro are two pretty different operations (certainly for emacs users, and I see no reason that novices should be different). I think ideally that it's much easier to use when different operations are on different keys (with exceptions for `equivalent' operations, or those with strong historical meaning in different context -- but this is neither of those cases). So making the same key invoke or or the other depending on the context actually is _less_ simple to think about. (B) Operationally? Consider two cases: (1) Where the user wants to end the macro definition, do some other stuff (move around or whatever) and then execute the macro for the first time. In this case, I seen no particular advantage to having the same binding do one or the other operations -- the intermediate operations move your fingers around and remove whatever advantage there is to hitting the same set of keystrokes twice. (2) Where the user wants to immediately execute the macro after ending the definition. With a multiple keystroke binding like `C-x e' or `C-x )', this isn't as easy as simply hitting a single key twice (like in Kim's original), but in this case, there probably _is_ some advantage to being able to use the same binding twice -- your fingers are positioned appropriately, and it's less burden to think about what to do next. However, note that this is _exactly_ the case where my suggestion is even better. Now consider my suggestion (have `C-x e' end any currently-being-defined macro definition and _also_ execute the macro once) using the same criteria: (A) Conceptually? Note that using my definition, both bindings (`C-x e' and `C-x )') retain their current simple one-binding-one-operation meanings. What it essentially does is _extend_ the number of places where `C-x e' works, by implicitly ending any current macro definition before executing the macro. It removes a case the user has to worry about (getting an error by forgetting to type `C-x )'). Thus, I think you can say that it's actually simpler than the historical definition of `C-x e', and certainly simpler than Kim's replacement (end-macro-or-execute). (B) Operationally? Consider two cases: (1) Where the user wants to end the macro definition, do some other stuff (move around or whatever) and then execute the macro for the first time. In this case, my binding is basically the same as the historical one, which is fine because the historical one is just right for this case; there's no reason to merge the operations. (2) Where the user wants to immediately execute the macro after ending the definition. Here, obviously my binding is more convenient -- you just have to hit `C-x e' once (instead of twice as with Kim's binding, or instead of two different bindings as with the historical ones). So as far as I can see, my idea is simpler and more convenient than both the historical bindings and Kim's replacement: in case (A), it's conceptually easier to think about (and explain), in case (B 1) it's no less convenient than other bindings, and in case (B 2) it's more convenient than the alternatives. -Miles -- Fast, small, soon; pick any 2.