On Thu, Apr 17, 2025 at 11:23:58AM -0400, Todd Zullinger wrote: >I do this: > ># selectively remap 'r' to list-reply (<ESC>R does a private reply) >folder-hook . 'bind index r group-reply; bind index <ESC>R reply' >message-hook ~A 'bind index,pager r group-reply; bind index,pager <ESC>R reply' >message-hook ~l 'bind index,pager r list-reply; bind index,pager <ESC>R reply' >message-hook '~C g...@vger.kernel.org' 'bind index,pager r group-reply; bind >index <ESC>R reply'
Ah, I missed ~l. That's better than what I suggested, using ~h to detect a message from a list -- better if you have told Mutt what lists you're subscribed to (with command "subscribe" or $auto_subscribe). ~l depends on knowing that. >I had `folder-hook '=lists/'` too, but `message-hook` has >replaced that for me. I may not need `folder-hook .` >anymore, but I haven't changed or tested it in several >years. I think you don't need it. Looks like you used "folder-hook ." to reset to the default key bindings for messages not from lists, and now you do that with "message-hook ~A". Yes? >Kurt wondered why you'd ever want this to behave differently >per folder and, for me, the answer is that not all lists >have the same customs. > >I want mutt to "do the right thing" when I start a reply >without having to change my behavior based on the list to >which I am replying. Sure, but you could identify the list from the headers List-*:, rather than from what folder you stored the message in. In fact, it looks like you do something similar above. Doesn't "message-hook ~C" detect a message from a particular list, and set up custom key bindings for it?