emacs-devel
[Top][All Lists]
Advanced

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

Re: [CVS] f7, f8 bound..


From: Miles Bader
Subject: Re: [CVS] f7, f8 bound..
Date: 31 Aug 2002 11:16:38 +0900

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.




reply via email to

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