<<< Date Index >>>     <<< Thread Index >>>

Re: [broken-patch] unbind command



On Tue, Dec 16, 2003 at 11:32:36PM +0100, Alain Bench wrote:
>  On Tuesday, December 16, 2003 at 9:43:35 AM +0100, Thomas Roessler wrote:

> > The attached patch makes sure that mutt tries the generic menu if the
> > specific one returns OP_NULL.
> 
>     This forbids unbinding to nothing a generic key from a specific map.
> 
>     Example: I have a "bind generic <Left> exit". But I don't want to
> exit losing changes when in index, and don't want another function. So I
> set a "bind index <Left> noop". Results in $beep and "Key is not bound.
> Press '?' for help.". Exactly what's wanted.
> 
>     This doesn't work anymore with your patch-1.5.5.1.tlr.unbind.1,
> resulting back in generic exit in index also. And AFAICS is no more
> doable, outside of unbinding generic, and binding each and every map but
> index. Bad.

In a previous message in this thread (and much more in-depth in
mutt-users), I commented on precisely this, offering exactly the
same solution.  However, I also pointed out the existance of a slightly
hackish solution: rather than unbinding generic and then binding each map
individually, you can leave generic bound, but macro to some unbound key
the key you'd like to unbind in whatever modes you'd like to unbind it in.
The operational effect is exactly what you want (unless macros and binds
behave in weird ways when combined in arbitrary orders, in which case
it's possible that a subsequent bind of the key wouldn't do what you
might expect - I haven't checked that, but I'm pretty sure it's not the
case anyway), even if your RC files then become much less readable.

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpIWEpux1uNW.pgp
Description: PGP signature