<<< Date Index >>>     <<< Thread Index >>>

Re: Strange send-hook behavior



On Tue, Aug 15, 2006 at 12:09:29PM -0700, Dustin Laurence wrote:
> On Tue, Aug 15, 2006 at 11:19:11AM -0700, William Yardley wrote:
> 
> > Dustin didn't mention it in his post, but I know that he knows it's
> > documented, because he mentioned it. This shows up in the manual, though
> > not in the muttrc(5) man page.
> 
> I thought I did, guess not.  I'm trying to get around the documented
> behavior, not asking someone to read the mutt manual for me.  It was
> reading the manual to figure out how to add a header with a send-hook
> that prompted the question.  :-)

I had the same problem before a few months and somebody on #mutt came up
with a pretty good explanation, why this behaviour is preferable but
unfortunately I forgot the details.

However, I use message-hooks as a workaround.

As example: When I _view_ a message with `^[[]thelist[]].*$' in the Subject
a message-hook sets `my_hdr Cc:' to `example@xxxxxxxxxx'. When I view a 
message without the mentioned regex matching, `Cc:' gets unset. Afterwards,
a reply will have the correct `Cc:'-recipient.

This workaround has a small drawback: When you reply directly from the
index, the message-hook will not apply because you don't _view_ the message
before replying. Therefore, I use this macro for `r' in `index':

        macro   index r '<display-message><reply>'


HTH,

Petar