From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [CVS] f7, f8 bound.. Date: 11 Sep 2002 01:16:48 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xadmpv3j3.fsf@kfs2.cua.dk> 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> <5x4rdfdzu6.fsf@kfs2.cua.dk> <200208281413.g7SEDkT03872@rum.cs.yale.edu> <5xvg5thgw8.fsf@kfs2.cua.dk> <200208291724.g7THOJZ11366@rum.cs.yale.edu> <5xd6roult6.fsf@kfs2.cua.dk> <87ptvmavj2.fsf@pot.cnuce.cnr.it> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031696281 6286 127.0.0.1 (10 Sep 2002 22:18:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2002 22:18:01 +0000 (UTC) Cc: rms@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, miles@gnu.org, 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 17otKZ-0001d9-00 for ; Wed, 11 Sep 2002 00:17:59 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17otvA-0007pn-00 for ; Wed, 11 Sep 2002 00:55:49 +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 17otKc-0003N3-00; Tue, 10 Sep 2002 18:18:02 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17otJJ-0002zn-00 for emacs-devel@gnu.org; Tue, 10 Sep 2002 18:16:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17otJH-0002zb-00 for emacs-devel@gnu.org; Tue, 10 Sep 2002 18:16:41 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17otJH-0002zV-00; Tue, 10 Sep 2002 18:16:39 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 001A47C017; Tue, 10 Sep 2002 22:16:31 +0000 (GMT) Original-To: Francesco Potorti` In-Reply-To: <87ptvmavj2.fsf@pot.cnuce.cnr.it> Original-Lines: 51 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:7823 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7823 Francesco Potorti` writes: > I would like to change that so if an error occurs while defining a > macro, emacs will query the user whether he wants to continue adding > to the macro, end and save it, or discard it. WDYT? > > The question would be very annoying. I think it should terminate and > define the macro. If the user wants to ignore that definition, he > can. If the user wants to add to it, he can do that too. > > That is only part of the problem. It often occurs to me that, while I'm > defining a long macro, I make a mistake in the middle of it. > > The current behaviour is discarding the work done so far, so I have to > restart from the beginning. > > The behaviour Richard proposes is to stop recording the macro (without > discarding it), so I'd have to restart with a series of undos, in order > to get rid of the modifications I did with the interrupted macro > definition, then restart with C-uC-x(, which reexecutes the macro > defined so far and then allows me to continue defining it. Also, this > requires some thinking, because after doing the undo and the redo I must > be careful to remember where exactly I had made a mistake. You can use C-u C-u C-x ( to append to the macro without re-executing it first. Also look at `kmacro-execute-before-command'. If you set it to nil, you can use C-u C-x ( to append to the previous macro without re-executing it. You can look at the defined macro with C-x C-k C-v. You can also experiment with the new step-edit feature on C-x C-k SPC. > > Generally speaking, the possible choices one would want are: > - aborting the definition (the current behaviour) > - ending the definition with or without the last command > - continuing the definition with or without the last command > > As Miles says, however, only one question is needed: > Error occured; ignore last command? (y or n) > without interrupting the recording of the macro. > > This would leave the user the whole range of choices: they can abort > with C-g, they can continue, they can end with C-x), and they can choose > whether they want the last command included. Although this would be nice, I think the current feature set is adequate. -- Kim F. Storm http://www.cua.dk