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

Re: Multiple color rules for index?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday, May  8 at 10:56 AM, quoth Eric Patton:
> Is there a way to design multiple color rules for incoming mail in 
> the index? I want to have all new mail green, for instance, and if 
> the mail belongs to a known mailing list, color it as yellow after 
> it has been read.
>
> Currently, I can color mail yellow with ~l, and new mail green with 
> ~N, but I can't find the appropriate section in the docs to form a 
> conditional expression.

I'm not sure what you mean. What kind of condition?

Keep in mind that with color rules, order matters. Specifically, 
last-match wins. For example, to get all new mail green, no matter 
what, make the new mail rule last. i.e.:

     color index yellow default ~l
     color index green default ~N

Thus, list messages will only be yellow if they aren't new, because if 
they're new, they match both rules, and the last one wins.

Of course, you can always make complex patterns. For example:

     color index yellow default '~l ! ~N'

Does that help?

~Kyle
- -- 
In all matters of opinion, our adversaries are insane.
                                                         -- Oscar Wilde
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkoEQTwACgkQBkIOoMqOI17TMACaAiW4/Jt/aSSmm/HbmqDzaIOd
IYIAoOvYsExPQVc0wJ16t3U3kY8ehx1N
=ZbM7
-----END PGP SIGNATURE-----