Re: Binding Space to select-entry gives Key is not bound.
On Mon, Sep 20, 2021 at 08:31:07PM -0700, "Kevin J. McCarthy" wrote: > Thanks raf, I certainly can't say your opinion is due to a lack of > experience with Mutt! However, just to be clear to everyone, my opposition > to the "tag" interpretation is because of Mutt's current usage of > . > > Menus that allow both single and multiple selection (e.g. alias list, file > browser, query menu) use tagging for multiple selection and > for single selection. Menus that allow single selection (e.g. > background-edit list, key selection, postponed list) respond to > by immediately using/processing the entry (and usually, > though not always, exiting the menu afterwards). That convinces me that makes much more sense. There's still so much I don't know about mutt. :-) Great programs are like that. > I understand that in general the term "selection" can be interpreted either > way. But consistent usage within Mutt is important to me, and I think is a > good design principle. Definitely agree. > The default bindings for are overshadowed by the default > bindings for in the index. But for those who re-bind it, > I don't think there's a good reason to drastically change its behavior in > the index, compared to everywhere else in Mutt. As you noted, the way to > operate on or select multiple entries in Mutt is already well established: > via tagging. > > Now, there *is* one case where the index is used as a selection menu: > attaching messages. Currently that interface forces selection (either one > or multiple message) via tagging. One could make an argument > could be used in that case for single selection and immediately returning. > But it would entail some technical changes to an already complicated menu, > as well as requiring a *new* keybinding in the index. Since that operation > isn't all that common I don't know that it would be worth it, but I'd be > open for that discussion (on mutt-dev). I think it's usually a bad idea to implement something that solves a problem that isn't actually affecting anyone yet. This sounds like a case of that. There will definitely be better ways to spend your finite remaining keystrokes. :-) > -- > Kevin J. McCarthy > GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA cheers, raf
Re: Binding Space to select-entry gives Key is not bound.
On Tue, Sep 21, 2021 at 11:24:56AM +1000, raf wrote: On Sat, Sep 18, 2021 at 07:28:14PM -0700, "Kevin J. McCarthy" wrote: Do any old timers have an opinion on this? I guess the difference is whether you think that a "selection" can only contain a single item and so the purpose of the selection should be performed immediately (so display-message makes sense), or whether a selection can contain multiple items and so the purpose of the selection might need to be delayed until the selection process is complete (so tag-entry makes sense). Thanks raf, I certainly can't say your opinion is due to a lack of experience with Mutt! However, just to be clear to everyone, my opposition to the "tag" interpretation is because of Mutt's current usage of . Menus that allow both single and multiple selection (e.g. alias list, file browser, query menu) use tagging for multiple selection and for single selection. Menus that allow single selection (e.g. background-edit list, key selection, postponed list) respond to by immediately using/processing the entry (and usually, though not always, exiting the menu afterwards). I understand that in general the term "selection" can be interpreted either way. But consistent usage within Mutt is important to me, and I think is a good design principle. The default bindings for are overshadowed by the default bindings for in the index. But for those who re-bind it, I don't think there's a good reason to drastically change its behavior in the index, compared to everywhere else in Mutt. As you noted, the way to operate on or select multiple entries in Mutt is already well established: via tagging. Now, there *is* one case where the index is used as a selection menu: attaching messages. Currently that interface forces selection (either one or multiple message) via tagging. One could make an argument could be used in that case for single selection and immediately returning. But it would entail some technical changes to an already complicated menu, as well as requiring a *new* keybinding in the index. Since that operation isn't all that common I don't know that it would be worth it, but I'd be open for that discussion (on mutt-dev). -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: Binding Space to select-entry gives Key is not bound.
On Sat, Sep 18, 2021 at 07:28:14PM -0700, "Kevin J. McCarthy" wrote: > On Sat, Sep 18, 2021 at 04:34:10PM -0700, li...@ifohancroft.com wrote: > > Personally, I see a couple of possible solutions for select-message in > > index: > > Thanks for the feedback. > > I don't agree with #3, though. It sounds like you've recently started using > Mutt and are still adjusting to some of the concepts. I understand the > initial confusion, but that's not a justification for changing basic > functionality around. > > #1 is awkward to implement. > > So I'm still debating between making equivalent to > or just having it print an error message. > > > > If your expectation wasn't to display the message with this > > > function, then perhaps it's better to not make it equivalent to > > > display-message, but try to display a more appropriate error message > > > instead. > > > > This is exactly what I meant. I think it would be best to not make it > > equivalent to display-message in the index. > > Since the function isn't currently implemented, I don't see the harm in > making them equivalent. Displaying the message seems the most natural > interpretation of "selection" in the index when compared to its usage in the > other menus. > > Do any old timers have an opinion on this? > > -- > Kevin J. McCarthy > GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA Tagging/untagging the current message seems like another natural interpretation of "select" to me. I'm not advocating for that. It's just what I think of as "selection". But you don't agree with that (the first half of #3). I guess the difference is whether you think that a "selection" can only contain a single item and so the purpose of the selection should be performed immediately (so display-message makes sense), or whether a selection can contain multiple items and so the purpose of the selection might need to be delayed until the selection process is complete (so tag-entry makes sense). But like I said, I'm not advocating for this. I don't even tag messages, and even if I did, there's already a keystroke for doing that. cheers, raf P.S. Thanks so much for all your work on mutt. It's much appreciated, every single day.
Re: Binding Space to select-entry gives Key is not bound.
On Sat, Sep 18, 2021 at 07:28:14PM -0700, Kevin J. McCarthy wrote: > Displaying the message seems the most natural > interpretation of "selection" in the index when compared to its usage in the > other menus. ACK
Re: Binding Space to select-entry gives Key is not bound.
On Sat, Sep 18, 2021 at 04:34:10PM -0700, li...@ifohancroft.com wrote: Personally, I see a couple of possible solutions for select-message in index: Thanks for the feedback. I don't agree with #3, though. It sounds like you've recently started using Mutt and are still adjusting to some of the concepts. I understand the initial confusion, but that's not a justification for changing basic functionality around. #1 is awkward to implement. So I'm still debating between making equivalent to or just having it print an error message. If your expectation wasn't to display the message with this function, then perhaps it's better to not make it equivalent to display-message, but try to display a more appropriate error message instead. This is exactly what I meant. I think it would be best to not make it equivalent to display-message in the index. Since the function isn't currently implemented, I don't see the harm in making them equivalent. Displaying the message seems the most natural interpretation of "selection" in the index when compared to its usage in the other menus. Do any old timers have an opinion on this? -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: Binding Space to select-entry gives Key is not bound.
If your expectation wasn't to display the message with this function, then perhaps it's better to not make it equivalent to display-message, but try to display a more appropriate error message instead. This is exactly what I meant. I think it would be best to not make it equivalent to display-message in the index. Personally, I see a couple of possible solutions for select-message in index: 1. If bound for index or a binding that contains the index, display an error message on mutt start, about the function not being available in index. 2. Keep allowing it in binds for index/that include index, but when the key is pressed, show an error message in mutt that the function isn't available for this menu. 3. Make it equivalent to tag-message. To me, this makes the most sense, as I can't speak for everyone but, looking at the function names, I'd expect select-message to do what tag-message does, while I'd expect tag-message to do what edit-label does. Best Regards, IFo Hancroft
Re: Binding Space to select-entry gives Key is not bound.
On Sat, Sep 18, 2021 at 12:47:10PM -0700, li...@ifohancroft.com wrote: I'll make select-entry equivalent to display-message for the next release. I thought select-entry was supposed to select the message, not open it? Sort of like the tag command? It makes more sense for a temporary menu that provides choices. For example, for the query/alias menus it returns the address, and the result is typically appended to the current To/Cc/Bcc address list being composed. Similar for the browser, although it can either select and return a mailbox or enter a directory. The function doesn't appear to be implemented in all menus. So perhaps the intent was not to implement it for menus where you aren't "choosing" anything. If your expectation wasn't to display the message with this function, then perhaps it's better to not make it equivalent to display-message, but try to display a more appropriate error message instead. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: Binding Space to select-entry gives Key is not bound.
Even though select-entry is a generic operation, it's actually not implemented in the index. You'll want to use display-message instead for the index. Ah! Thank you! That explains why it was working the way it was. When I want to open the message, I do use display-message, yes. I'll make select-entry equivalent to display-message for the next release. I thought select-entry was supposed to select the message, not open it? Sort of like the tag command? Best Regards, IFo Hancroft
Re: Binding Space to select-entry gives Key is not bound.
Hello Hi I don't have index bound to any key and space selects the entry the cursor is on so maybe what you want is the default behavior? I think that is what I want, yes. However, when I remove the space binding from my config, hitting space in index opens the message instead of selecting it. Space by default is bound to display-message for me, Enter as well, Return (under Generic Bindings) is bound to select-entry. If I hit what-key and press my enter key, I get that it's Return, but from what I remember, mutt doesn't actually differentiate between Enter and Return keys. If I unbind Enter however, then Return is bound to both display-message and under Generic Bindings to select-entry, but hitting it opens the message. Best Regards, IFo Hancroft
Re: Binding Space to select-entry gives Key is not bound.
On Sat, Sep 18, 2021 at 12:02:56PM -0700, li...@ifohancroft.com wrote: I am trying to bind the space key to the `select-entry` function, but then when I start mutt and hit the key, I get 'Key is not bound. Press '?' for help. I have this in my muttrc: bind index select-entry Even though select-entry is a generic operation, it's actually not implemented in the index. You'll want to use display-message instead for the index. I'll make select-entry equivalent to display-message for the next release. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: Binding Space to select-entry gives Key is not bound.
Hello I don't have index bound to any key and space selects the entry the cursor is on so maybe what you want is the default behavior? On Sat, Sep 18, 2021 at 12:02:56PM -0700, li...@ifohancroft.com wrote: > Hi, > > I am trying to bind the space key to the `select-entry` function, but > then when I start mutt and hit the key, I get 'Key is not bound. Press > '?' for help. > > I have this in my muttrc: > > bind index select-entry > > When I start mutt and hit '?' in the listing there, I see: > > ' select-entry select the current entry' > > So it is clearly bound. > > To make sure my key actually sends space, I execute the `what-key` > function, press the key and I get: > > Char = , Octal = 40, Decimal = 32 > > To test my binding, I tested binding space to what-key using: > > bind index what-key > > Then I start mutt, hit Space and indeed what-key gets executed. Also > the help screen shows it being bound to what-key. > > I have also tried to bind it to select-entry, writing the key as > instead of and the same thing happens. > > Am I doing something wrong or is this perhaps a weird bug? > > Here is my muttrc: > > https://pastebin.com/5eBp4N1j > > Here is my activate-sidebar config: > > https://pastebin.com/pjPckhTh > > Here is my deactivate-sidebar config: > > https://pastebin.com/mzk9Rn4B > > Best Regards, > IFo Hancroft > -- Hokan Bicyclist Sysadmin signature.asc Description: PGP signature
Binding Space to select-entry gives Key is not bound.
Hi, I am trying to bind the space key to the `select-entry` function, but then when I start mutt and hit the key, I get 'Key is not bound. Press '?' for help. I have this in my muttrc: bind index select-entry When I start mutt and hit '?' in the listing there, I see: ' select-entry select the current entry' So it is clearly bound. To make sure my key actually sends space, I execute the `what-key` function, press the key and I get: Char = , Octal = 40, Decimal = 32 To test my binding, I tested binding space to what-key using: bind index what-key Then I start mutt, hit Space and indeed what-key gets executed. Also the help screen shows it being bound to what-key. I have also tried to bind it to select-entry, writing the key as instead of and the same thing happens. Am I doing something wrong or is this perhaps a weird bug? Here is my muttrc: https://pastebin.com/5eBp4N1j Here is my activate-sidebar config: https://pastebin.com/pjPckhTh Here is my deactivate-sidebar config: https://pastebin.com/mzk9Rn4B Best Regards, IFo Hancroft