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

Re: hook conflicts...



On Fri, May 28, 2004 at 05:02:13PM EDT, David Yitzchak Cohen wrote:
> On Fri, May 28, 2004 at 04:38:31PM EDT, Nicolas Rachinsky wrote:
> > * David Yitzchak Cohen <lists+mutt_users@xxxxxxxxxxxxxx> [2004-05-28 16:11 
> > -0400]:

> > > 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"'
> > 
> > I think, the '.' should be the first one. And I think you'll need to
> > have
> > folder-hook . unhook send-hook
> > in the beginning.
> 
> ...what he said (thanks, St. Nic) :-)

It gets worse: if we're in folder1 or folder2, the default folder-hook
will screw up the send-hooks before we get to the folder1 or folder2
folder-hooks (but after we've already unhooked the stale send-hooks
from before).  In other words, something like this should be best,
if I'm correct:

folder-hook . 'unhook send-hook; send-hook sweetie "do sweetie stuff"; 
send-hook . "do default stuff"'
folder-hook folder1 'unhook send-hook; send-hook sweetie "do sweetie stuff"; 
send-hook . "do folder1 stuff"'
folder-hook folder2 'unhook send-hook; send-hook sweetie "do sweetie stuff"; 
send-hook . "do folder2 stuff"'

 - 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: pgpgCNBnFczSc.pgp
Description: PGP signature