On Thu, Oct 14, 2010 at 05:00:00PM -0500, Will Fiveash wrote:
> On Thu, Oct 14, 2010 at 04:36:07PM -0500, Will Fiveash wrote:
> > Actually, that's not really working for me as it interferes with other
> > mutt functions like saving a message.  For example when I'm in index
> > mode and I have the following setting:
> > 
> > message-hook '~s "^CR "' 'push ":macro pager / <search>^===\\ <enter>"'
> > 
> > and I select a message with Subject: CR etc...
> > and I type s to save it I see:
> > 
> > Create :macropager/<search>^===\? ([yes]/no):
> > 
> > I don't understand why message-hook is affecting the save command when
> > there is a separate save-hook for this.
> 
> truss is showing this call sequence when I try to save the message:
> 
> /1...@1:   -> mutt_save_message(0x818e010, 0x1, 0x0, 0x0)
> /1...@1:     -> mutt_message_hook(0x828dc48, 0x818e010, 0x80, 0x810df76)
> 
> Is that correct?
> 
> I ask that because the mutt docs state this about message-hook:
> 
>    Usage: message-hook [!]pattern command
> 
>    This command can be used to execute arbitrary configuration commands
>    before viewing or formatting a message based upon information about
>    the message. command is executed if the pattern matches the message to
>    be displayed. When multiple matches occur, commands are executed in
>    the order they are specified in the muttrc.
> 
> It is not obvious to me why mutt_save_message is calling
> mutt_message_hook.

And when I comment out the calls to mutt_message_hook() in
mutt_save_message() mutt works as I expect which allows me to set:

message-hook '~s "^CR "' 'push "<search>^=== <enter>"'

and this does not interfere with the save command.

-- 
Will Fiveash

Reply via email to