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

Re: hook conflicts...



On Fri, May 28, 2004 at 04:40:56PM EDT, Matt Price wrote:
> 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:

> 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.

~C matches individual addresses in any of the typical recipient headers
(To and Cc).  The "^" anchor simply means that my.sugar.pop@xxxxxxxxxxx
won't match :-)

I guess you can split it into two send-hooks:
send-hook "~C sugar\.pop@utoronto\.ca" "do sweetie stuff"
send-hook "~C !(sugar\.pop@utoronto\.ca)" "do nonsweetie stuff"

...or however you do the second one in GNU regex syntax (basically,
matching any nonsweetie addy - I doubt my example works, but at least
it makes what I'm trying to do clear ... find the syntax, and you're in
business) :-)

HTH,
 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpQNBiZCpJJa.pgp
Description: PGP signature