Discussion:
unbind (all) key bindings
Martin Vegter
2013-11-25 22:31:14 UTC
Permalink
hello,

as a new user, I feel intimidated by the many key bindings in Mutt.
Not only do I see no chance of ever needing more than 5% of them, but I
am afraid that by accidentally pressing some key, I will perform some
"action" without knowing what happened.

I have very simple requirements from my email client. I don't need two
separate key binding for "next-entry" and "next-undeleted", for example.

I would like to unbind all key bindings, so that I can explicitly define
only those, that I am actually going to use.

While googling, I have discovered that I am not the only one having this
problem. There even seems to be a patch called "unbind":

http://home.uchicago.edu/~dgc/mutt/#unbind

but only for version 1.4 and 1.5.1. I am using mutt version
1.5.21-6.2+deb7u1, so I am not sure if that would work.

Could somebody please advise, what would be the best way to do it?
Patrick Shanahan
2013-11-25 23:05:52 UTC
Permalink
as a new user, I feel intimidated by the many key bindings in Mutt. Not
only do I see no chance of ever needing more than 5% of them, but I am
afraid that by accidentally pressing some key, I will perform some
"action" without knowing what happened.
I have very simple requirements from my email client. I don't need two
separate key binding for "next-entry" and "next-undeleted", for example.
I would like to unbind all key bindings, so that I can explicitly define
only those, that I am actually going to use.
While googling, I have discovered that I am not the only one having this
http://home.uchicago.edu/~dgc/mutt/#unbind
but only for version 1.4 and 1.5.1. I am using mutt version
1.5.21-6.2+deb7u1, so I am not sure if that would work.
Could somebody please advise, what would be the best way to do it?
I would look at the help file in mutt and add to ~/.muttrc
bind <key> /dev/null
and then you would have a record of what you have changed and have a
simple way to revert.

not tested.
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535 @ http://linuxcounter.net
Martin Vegter
2013-11-26 09:09:37 UTC
Permalink
Post by Patrick Shanahan
as a new user, I feel intimidated by the many key bindings in Mutt. Not
only do I see no chance of ever needing more than 5% of them, but I am
afraid that by accidentally pressing some key, I will perform some
"action" without knowing what happened.
I have very simple requirements from my email client. I don't need two
separate key binding for "next-entry" and "next-undeleted", for example.
I would like to unbind all key bindings, so that I can explicitly define
only those, that I am actually going to use.
While googling, I have discovered that I am not the only one having this
http://home.uchicago.edu/~dgc/mutt/#unbind
but only for version 1.4 and 1.5.1. I am using mutt version
1.5.21-6.2+deb7u1, so I am not sure if that would work.
Could somebody please advise, what would be the best way to do it?
I would look at the help file in mutt and add to ~/.muttrc
bind <key> /dev/null
and then you would have a record of what you have changed and have a
simple way to revert.
not tested.
I have found the following in the manual:

bind index j noop
bind index k noop

the problem with this approach is, that I have to unbind every single
key-binding explicitly.

I was wondering whether there is a better solution
Chris Bannister
2013-11-26 12:49:04 UTC
Permalink
Post by Martin Vegter
bind index j noop
bind index k noop
the problem with this approach is, that I have to unbind every
single key-binding explicitly.
It makes no sense to unbind them all, so in reality it is not a
problem.
Post by Martin Vegter
I was wondering whether there is a better solution
I'm wondering how you are actually going to use mutt at all.
Is the problem you are trying to solve a real one? Have you been bitten
by it yourself?

You could set the quadoption to ask-yes or ask-no (depending on the
action) so that a clumsy key press will bring up the dreaded "Are you
sure you really want to do what you have just asked me to do?" dialog.
--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X
Martin Orwin
2013-11-26 13:41:55 UTC
Permalink
I understand your concerns about this but I don't think you'll find it a problem in the long run. I occasionally hit the wrong key and there is always a way of undoing what I've done (aside from saying 'no' when Mutt actually asks me if I really want to do something, which personally I like). Shift-W let's me unclear a flag I've accidentally set and ctrl-c ('do you want to exit mutt?') gets me out of any other situation (just remember to type n(o) when it asks). There will be other more sophisticated ways of getting out of certain situations, but for me these two work and are enough. As to all the other key-bound functions, it doesn't matter that you don't use them. It's a big tool box and over the time I've used Mutt I've learned to use some of the tools when I've felt the need to do something (limit patterns for example). I think you might be throwing the baby out with the bathwater if you disable all the keybindings as then you may need to work out how to reinstate some function or other when you feel the need to use it.

I'd say stick with Mutt as it is, I did, and in a few weeks time I think you'll find that the keybinding thing is a non-issue. Just my thoughts. Whatever you choose to do, once you get used to it, it's the best email client out there IMHO (apart from when I get those pesky complex html messages and have to use the Gmail web interface!).
Post by Chris Bannister
Post by Martin Vegter
bind index j noop
bind index k noop
the problem with this approach is, that I have to unbind every
single key-binding explicitly.
It makes no sense to unbind them all, so in reality it is not a
problem.
Post by Martin Vegter
I was wondering whether there is a better solution
I'm wondering how you are actually going to use mutt at all.
Is the problem you are trying to solve a real one? Have you been bitten
by it yourself?
You could set the quadoption to ask-yes or ask-no (depending on the
action) so that a clumsy key press will bring up the dreaded "Are you
sure you really want to do what you have just asked me to do?" dialog.
--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X
--
Dr Martin Orwin
Senior Lecturer in Somali and Amharic
Associate Head of the Department of the Languages and Cultures of Africa
SOAS
r***@oplink.net
2013-11-26 22:16:54 UTC
Permalink
Post by Martin Orwin
Whatever you choose to do, once you get used to it, it's the best email
client out there ...
Of the various mail user agents I have investigated, only mutt
and gnus offer good efficiency in the handling of a large volume of
messages. Not coincidentally, neither mutt nor gnus makes use
of the rodent.

gnus possibly is more efficient than is mutt, but the configuration
and the command structure of gnus is rather obscure.

More importantly, if Lars Magne Ingebrigtsen -- the creator of gnus,
and perhaps the only man who fully understands the package -- falls
off the edge of the earth, the popularity of gnus may decline rapidly.
In contrast, mutt enjoys considerable popularity and long has been
installed by default by Debian. And popularity perhaps is the best
guarantee against obsolescence.

Thus it is that mutt appears to be the better option in the long term.

RLH
Chris Bannister
2013-11-27 12:31:14 UTC
Permalink
Post by Martin Orwin
I understand your concerns about this but I don't think you'll find it a problem in the long run. I occasionally hit the wrong key and there is always a way of undoing what I've done (aside from saying 'no' when Mutt actually asks me if I really want to do something, which personally I like). Shift-W let's me unclear a flag I've accidentally set and ctrl-c ('do you want to exit mutt?') gets me out of any other situation (just remember to type n(o) when it asks). There will be other more sophisticated ways of getting out of certain situations, but for me these two work and are enough. As to all the other key-bound functions, it doesn't matter that you don't use them. It's a big tool box and over the time I've used Mutt I've learned to use some of the tools when I've felt the need to do something (limit patterns for example). I think you might be throwing the baby out with the bathwater if you disable all the keybindings as then you may need to work out how to reinstate some function or other when you feel the need to use it.
I'd say stick with Mutt as it is, I did, and in a few weeks time I think you'll find that the keybinding thing is a non-issue. Just my thoughts. Whatever you choose to do, once you get used to it, it's the best email client out there IMHO (apart from when I get those pesky complex html messages and have to use the Gmail web interface!).
I notice you are using mutt as the MUA. How did you manage to screw up
this post so badly?
--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X
Martin Orwin
2013-11-27 15:04:02 UTC
Permalink
Post by Chris Bannister
Post by Martin Orwin
I understand your concerns about this but I don't think you'll find it a problem in the long run. I occasionally hit the wrong key and there is always a way of undoing what I've done (aside from saying 'no' when Mutt actually asks me if I really want to do something, which personally I like). Shift-W let's me unclear a flag I've accidentally set and ctrl-c ('do you want to exit mutt?') gets me out of any other situation (just remember to type n(o) when it asks). There will be other more sophisticated ways of getting out of certain situations, but for me these two work and are enough. As to all the other key-bound functions, it doesn't matter that you don't use them. It's a big tool box and over the time I've used Mutt I've learned to use some of the tools when I've felt the need to do something (limit patterns for example). I think you might be throwing the baby out with the bathwater if you disable all the keybindings as then you may need to work out how to reinstate some function or other when you feel the need to use it.
I'd say stick with Mutt as it is, I did, and in a few weeks time I think you'll find that the keybinding thing is a non-issue. Just my thoughts. Whatever you choose to do, once you get used to it, it's the best email client out there IMHO (apart from when I get those pesky complex html messages and have to use the Gmail web interface!).
I notice you are using mutt as the MUA. How did you manage to screw up
this post so badly?
I see my error. Apologies. I'm not sure how that happened.
David Champion
2013-11-27 23:15:34 UTC
Permalink
Post by Martin Vegter
I would like to unbind all key bindings, so that I can explicitly define
only those, that I am actually going to use.
While googling, I have discovered that I am not the only one having this
http://home.uchicago.edu/~dgc/mutt/#unbind
but only for version 1.4 and 1.5.1. I am using mutt version
1.5.21-6.2+deb7u1, so I am not sure if that would work.
Hi Martin -

I think the other responses on this thread are appropriate, and you
should consider whether you really want to unbind everything. That
said, as the author of the unbind patch that you cited: no, it won't
work with a current mutt. It's very out of date. I took some time to
update and improve the patch and you'll find the result here:

http://permalink.gmane.org/gmane.mail.mutt.devel/21157

(For anyone familiar with the unbind saga and its intricacies, this
patch finally does a real unbind, not a bind to noop.)
--
David Champion • ***@bikeshed.us
Loading...