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: 29 Aug 2002 10:14:40 +0900

Richard Stallman <address@hidden> writes:
>     Hell, why not just make `C-x e' end the macro as well as executing it,
>     and then use Stefan's idea of allowing the `e' to be repeated
>     indefinitely [or something similar]?
> 
> These seem like good ideas, except that I would have chosen C-x ) instead
> of C-x e, for symmetry with C-x (.

Yeah, I agree, but that changes the meaning of `C-x )', whereas adding
this new meaning to `C-x e' can be done in a backward-compatible way
(currently `C-x e' while defining a macro just results in an error).

I also like the mnemonic value of `C-x e' -- `execute' -- and the
concept of an `execute' command implicitly terminating the definition
phase seems more natural to me that the concept of the `end-def'
command (for which `C-x )' is highly mnemonic) executing once.

I also think that `C-x )' is still a useful command; sometimes I want to
just end the current macro definition with, without executing it (e.g.,
when I'm defining the macro in a different buffer on some fake data).

>     Actually, I think a better idea would be to make `C-x e' repeat if you
>     hit SPC afterwards, and display a message to that effect so that it's
>     obvious, e.g., 
> 
> SPC would be easier to type over and over than e.
> 
> However, one thing worries me about both ideas: both of them could be
> error-prone.  You might want to type an e, or a space, for its normal
> meaning, after executing the macro.

Very true, but I think that that's _far_ more rare than wanting to
execute the macro again (that's why I think it's important to display a
message, so it's up-front obvious that you're really in some sort of
mode), and SPC is just about the easiest to type and most widespread
repetition key there is (think of pagers such as more, query-replace,
etc).

It's kind of isearch -- sometimes you want to search for RET, and have
to think a little to do it, but most of the time the convenience of the
unusual binding wins out.

I think the _best_ thing would be a single-mnemonic-letter-with-modifier
binding, e.g. M-e (but that's obviously taken, and of course not
everyone has a real meta-key); however adding repeating behavior to an
existing command seems like a decent alternative.

Also, adding the SPC-key behavior to `C-x e' would have the benefit
that existing emacs users could immediately start using it, when they
see the message, without really learning any new commands at all.

I agree with Kim that the repetition key should probably be controlled
by a variable or something, mostly so people who don't like this
behavior can set it to nil -- but I also think that the default should
be to enable it, with a value of SPC.

-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'




reply via email to

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