emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CVS] f7, f8 bound..


From: Francesco Potorti`
Subject: Re: [CVS] f7, f8 bound..
Date: Wed, 11 Sep 2002 11:03:06 +0200

   > 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.

I suppose this is a new feature, because the current pretest does no
exhibit this behaviour (nor does it document it).  It is useful,
indeed. 
   
   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.

These are all useful features, but they are not easy nor obvious to use.
You must know about them, you must learn how to use them, you must
remember them once you have learned.  I, for one, usually write some
complex macros once in a while.  It may happen that I do not write one
for some months, and then I spend some days writing many.  Non-obvious
features are forgotten in the meantime.

The suggestion Miles made (below) allows the whole range of choices at
the cost of a single question, and then only when you make an error.  It
cannot be annoying, because the fact itself of making an error somehow
breaks your thought direction.  The advantage is that it immediately
allows you to resume, without any other thinking, and it requires no
learning at all.

   > 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]