Coloring of collapsed threads in mutt
Posted
by
Rich
on Super User
See other posts from Super User
or by Rich
Published on 2014-04-19T20:39:28Z
Indexed on
2014/06/03
15:32 UTC
Read the original article
Hit count: 225
I'm trying to figure out the syntax of colouring collapsed threads in the mutt index. The documentation for mutt patterns doesn't seem to include a description of how this works, and so far I've been completely unable to figure it out by trial and error.
What I'd like is for collapsed threads that contain any unread (new) messages to be always coloured green. If collapsed threads with no unread messages contain any flagged messages, then I'd like them to be red.
So far, every set of patterns I've tried results in threads that contain both flagged and unread messages being coloured red (I want them green).
These work:
color index green default "~N" # unread messages
color index green default "~N~F" # unread flagged messages
color index red default "~F" # flagged messages
color index green default "~v~(~N)" # collapsed thread with unread
But these don't:
color index green default "~v~(~N~F)" # attempt to keep threads with unread green
color index red default "~v~(~F)" # colours collapsed threads with flagged and unread red
color index red default "~v~(!~N~F)" # ditto
color index red default "~v~(^!~N~F)" # ditto
color index red default "~v~(~F)~(!~N)" # ditto
color index red default "~v~(~F)~v~(!~N)" # ditto
I've also tried switching the order of the "~v~(~F)" and "~v~(~N)" commands in the file, but the "flagged" rule always seems to take precedence over the "new" rule.
Ideally I'd like to understand how the syntax for colouring collapsed threads works, but at this point I'd happily settle for a set of rules that achieves the colourscheme described above.
© Super User or respective owner