On Mon, Jun 29, 2015 at 12:57 PM, Kevin J. McCarthy <[email protected]> wrote: > Xu Wang wrote: >> On Wed, Jun 3, 2015 at 5:03 PM, Xu Wang <[email protected]> wrote: >> > To give an example, if I am in the postpone menu, I would like my >> > editor to be, e.g. "vim", but in the index map, I would like my editor >> > to be "gedit". >> >> Another use case for this is setting index_format for the postpone >> map. Having %n in postpone map does not make much sense because you >> are the sender. So it would be nice to easily change to e.g. %t. > > Okay, I think I understand what you're asking for. Basically you are > thinking of something like > > keymap-hook <keymap> <function> > > Where <keymap> is one of the maps listed for the bind command: generic, > alias, attach, browser, editor, index, compose, pager, ... > > Both of your examples are with respect to the postpone menu screen > though. It feels like this feature would be overkill to compensate for > a deficiency in the customizability of the postpone/resume menu. > > It's also a bit unclear when this hook should fire. For example, for > the index keymap, would it fire the first time we enter the index, or > should it also fire after every command that changes the keymap too > (e.g. after viewing a message in the pager, composing an email, saving > an email [because of the editor keymap], etc).
Good point. I agree it's not clear. My opinion is fire every time. > I'm not convinced the amount of programmatic work involved would be > worth the small payoff in improved customization. Yes I can understand that. Thank you very much, Kevin, for taking the time to understand the proposal I was attempting to suggest. I highly appreciate your effort in understanding it and it giving good comments on it. Kind regards, Xu
