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: 222

Filed under:
|

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

Related posts about colors

Related posts about mutt

  • Listing important folders in mutt

    as seen on Super User - Search for 'Super User'
    When I type c in mutt I get all my folders displayed and this is quite long. I would like to configure it to show only those folders that I deem to be interesting. Would be happy to configure it by adding a list in my .muttrc >>> More

  • sending mail using mutt + emacs

    as seen on Server Fault - Search for 'Server Fault'
    How to sent mail from emacs? I found this There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with new recipients) and send it again. C-c C-c (mail-send-and-exit)… >>> More

  • sending mail using mutt + emacs

    as seen on Super User - Search for 'Super User'
    How to sent mail from emacs? I found this There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with new recipients) and send it again. C-c C-c (mail-send-and-exit)… >>> More

  • sending mail using mutt + emacs

    as seen on Super User - Search for 'Super User'
    How to sent mail from emacs? I have add from address and subject and trapped inside emacs I found this There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with… >>> More

  • sending mail using mutt + emacs

    as seen on Stack Overflow - Search for 'Stack Overflow'
    How to sent mail from emacs? I have add from address and subject and trapped inside emacs I found this There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with… >>> More