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

Re: [broken-patch] unbind command



On Fri, Dec 12, 2003 at 09:18:08AM -0800, Michael Elkins wrote:
> On 2003-12-12, Allister MacLeod wrote:
> > Ok.. I don't have any more time to work on this today, but it's not
> > functional yet.  The goal is to add an "unbind" command to reverse the
> > effect of a "bind" or "macro" command.
> You can already do this now by binding a key to the function "noop".

It grieves me to argue with the creator of such a wonderful program,
but . . .  the "noop" function does not reverse the effect of a
binding.  It replaces the binding with a null function.  In the case
of generic bindings being overshadowed by local bindings (e.g. in the
index menu) this leads to behavior wich may not be intuitive to all.

bind generic z tag-entry
bind index z flag-entry
# z should now be flag-entry in the index, tag-entry elsewhere
bind index z noop
# with the "removal" of the index binding, I wish that z would now
# revert to its generic binding when in the index
# instead, it reports "key is not bound"
# between the 1st and 2nd binds here, z could be used to tag index entries
# as I had expected

So.. in the intervening time, Dave Champion told me of
http://home.uchicago.edu/~dgc/mutt/#unbind 
Just goes to show that it pays not to be too hasty.  A little research
in the vicinity of the PatchList of wiki.mutt.org would have saved me
a bundle of work.  I can only hope that the few new things that I
learned about mutt's code may help me later on.

Thanks and Best Regards,
 Allister

-- 
Allister MacLeod <amacleod@xxxxxxxx> | http://amacleod.is-a-geek.org/
 Elen síla lúmenn'omentielvo.