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

Re: hook conflicts...



On Fri, May 28, 2004 at 04:11:25PM -0400, David Yitzchak Cohen wrote:
> On Fri, May 28, 2004 at 03:53:57PM EDT, Matt Price wrote:
> 
> > more fundamentally:  the "send-hook ." line trumps the folder-hooks,
> > doesn't it?  At least so it seems to me.  So my folder-hooks are
> > useless.  Is there a way to modify things so this works approximately
> > like this:
> > 
> > IF a send-hook paplies, use it, 
> > ELSE IF folder-hook applies, use it,
> > ELSE use the default From: and signature settings
> 
> Easy:
> 
> folder-hook folder1 'send-hook sweetie "do sweetie stuff"; send-hook . "do 
> folder1 stuff"'
> folder-hook folder2 'send-hook sweetie "do sweetie stuff"; send-hook . "do 
> folder2 stuff"'
> folder-hook . 'send-hook sweetie "do sweetie stuff"; send-hook . "do default 
> stuff"'
> 
> This even allows you to fine tune which send-hooks you want to override
> by which folder-hooks (say, sending from a particular folder even to
> sweetie won't do sweetie stuff).

wicked!  thanks.


ok, so the big question is solved.  How about this problem though:  

send-hook "~C^sugar\.pop@utoronto\.ca" 'set 
signature=.mutt/sigs/signature_sweetie ; my_hdr From: Matt 
<matt.price@utoronto.\ ca>'


what's wrong with this hook?  From the manual, I would think it would
only match a message with sugar.pop@xxxxxxxxxxx as the ONLY recipient
(because of the ^).  Instead, it matches all messages with
sugar.pop@...  as ANY of the recipients.  Or am I missing something?
I have also tried it without the ~C (which seems superfluous for a
send-hook) -- but this seemed to make no difference -- neither fixed
nor gave me a syntax error.


anyway, thx again...
m