Jim Breton <[EMAIL PROTECTED]> wrote on Sat, 29 Jan 2000:
> If I want to trigger a command in the "mutt" folder but not in
> "mutt-sent" how can I do this? The hook seems to make a match on either
> one.
>
> I've tried "mutt" and "=mutt" for the hook. There must be some regexp
> pattern that would get this right.
First, let me explain about the = shortcut. The = gets expanded to the
contents of $folder whenever it's seen. So if you set $folder to ~/mail
(which gets immediately expanded to /home/user/mail or something like
that), and then have a folder-hook for =mutt, that gets treated as
"folder-hook /home/user/mail/mutt" If you leave out the =, you get a
"folder-hook mutt".
Anyway, to answer your question, the default match is a substring
match. So if you specify folder-hooks for =mutt and =mutt-sent,
then the =mutt gets executed for =mutt-sent too because =mutt is a
substring of =mutt-sent. Therefore you need to use the standard
regexp match, "=mutt$", for the first hook (if you're not familiar
with $, it's used in regexps as the end-of-string marker).
Because of the substring match, it may also be relevant whether you
specify a folder-hook for =mutt or mutt. The former is more likely
to match only the folder you want, whereas a "folder-hook mutt" would
also match something like /tmp/muttmail, for example.
> Or am I being too picky, and should just rename my folders? ;)
That might be the easy solution, but Mutt can accommodate your wish.
:-)
Hope this helps,
Mikko
--
// Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/
// The Corrs list maintainer // net.freak // DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
How do you organize an anarchists' conference?