Re: Multiple color rules for index?
- To: mutt-users@xxxxxxxx
- Subject: Re: Multiple color rules for index?
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 8 May 2009 09:27:13 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=aJjB287xhRuSdjKz7cB1AqaKkHQ=; b=I5Ey AsVZ7A9tnShQ1lhPF9UVcJwlH70ZF8qbpTXZ7B7fOhe+h2JKUF2kXAKYFfULC1wy ns3MqrHmtgDn1gj+IW8qa+GExHZm6KVNYQhrMbp+2WXhgPxLSBEoyxVNJelhWHr2 +rD6ojgFLW0BWb3HvA0S7cbEtZdi/2aLGvuJBaA=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=dT+A5UkDj7N98wFuLqK6nxpToYW8lX1AYWpOSSBIEPDk06fWWbVRQKpETjpMbwKycrnLHDrEtMFdAanLePwSwmsSCO7oJ1NVApTjEWGZoU9N2bjLGJQSEztj1VzUDAAtTY1wUFebDNWp2/sBVpeIPJQDexW3rhx6s6z/rOQTNo4=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20090508135625.GC5181@epatton-desktop>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20090508135625.GC5181@epatton-desktop>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-04-29)
-----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-----