Re: mutt/1880: wish: rebind to generic
The following reply was made to PR mutt/1880; it has been noted by GNATS.
From: TAKAHASHI Tamotsu <ttakah@xxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/1880: wish: rebind to generic
Date: Fri, 23 Sep 2005 21:14:08 +0900
Hi Alain,
* Fri Sep 23 2005 Alain Bench <veronatif@xxxxxxx>
> On Tuesday, September 20, 2005 at 1:56:59 AM +0200, Tamotsu Takahashi
> wrote:
>
> > http://www.momonga-linux.org/~tamo/patch-1.5.8.tamo.unbind.1 This
> > ``unbind'' might be less useful than DGC's one, because this does not
> > support ``unbind *'' syntax.
>
> We probably want "unbind *" functionality, if not syntax.
You can make a file with a lot of unbinds and source it.
(No, this is not a joke. I'm serious.)
I don't like "*" in unbind, because it needs some tricks
as DGC's one does. (e.g. recovering ":" and editor bindings)
And I don't know how to unbind literal "*" key with DGC's.
> > This ``unbind'' really removes mappings instead of ``bind to noop'',
> > so that a little memory is freed.
>
> Fine! I seem to recall DGC removes mapping only in * case, not in
> individual key sequence case.
But I am not sure my patch is bug-free.
Seems too complicated for me.
The small amount of memory does not worth the risk. ;)
> It seems to clearly be a wish for a new feature.
Yes, but this ``new'' feature is what mutt must have,
from the beginning. Otherwise mutt must not have
pre-defined keymappings. (i.e. Instead of hard-coding
them, use /etc/Muttrc to define initial mappings.
That could decrease hundreds of lines from the code.)
Without this feature, "generic" is not useful for many
keys, because they are already hard-coded on some menu.
> Manual says:
>
> | Usage: bind map key function
> | The special function noop unbinds the specified key sequence.
>
> I agree s/unbinds/disables/ may help desambiguitation. But then
> reintroducing ambiguity by adding an "unbind" command is not good.
So, as I once said, "bind <map> <key> generic" may be
the best solution. It's easy and clean.
--
tamo