]> granicus.if.org Git - neomutt/commitdiff
merge: index-color - theme the email index
authorRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:24:05 +0000 (16:24 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:24:05 +0000 (16:24 +0100)
 * feature: index-color
 * add handling index flags
 * fix width calculation
 * fix uncolor
 * tidy code
 * add docs
 * add ident to PATCHES

1  2 
PATCHES
color.c
curs_lib.c
doc/manual.xml.head
mutt.h
mutt_curses.h

diff --cc PATCHES
index 743886721241324ccd04c54fde3230a2411bd79a,3fbe4b5d92611a3b316952af2678ef3087700171..493b3c4bbeec4c7e593da188067c398df9eba381
+++ b/PATCHES
@@@ -1,3 -1,1 +1,4 @@@
 +patch-quasi-delete-neo-UNKNOWN
 +patch-progress-neo-UNKNOWN
 +patch-status-color-neo-UNKNOWN
+ patch-index-color-neo-UNKNOWN
diff --cc color.c
index a319468cdf991a7ccebc1ea51ddadd798319ba3c,07663b69070b22cc2689c3e49fb283a05a54cc96..9759288f1740d5655f66d50c4cd36674c19646a3
+++ b/color.c
@@@ -34,8 -34,10 +34,11 @@@ int ColorQuoteUsed
  int ColorDefs[MT_COLOR_MAX];
  COLOR_LINE *ColorHdrList = NULL;
  COLOR_LINE *ColorBodyList = NULL;
 +COLOR_LINE *ColorStatusList = NULL;
  COLOR_LINE *ColorIndexList = NULL;
+ COLOR_LINE *ColorIndexAuthorList = NULL;
+ COLOR_LINE *ColorIndexFlagsList = NULL;
+ COLOR_LINE *ColorIndexSubjectList = NULL;
  
  /* local to this file */
  static int ColorQuoteSize;
@@@ -94,7 -96,14 +97,15 @@@ static const struct mapping_t Fields[] 
    { "bold",           MT_COLOR_BOLD },
    { "underline",      MT_COLOR_UNDERLINE },
    { "index",          MT_COLOR_INDEX },
 +  { "progress",               MT_COLOR_PROGRESS },
+   { "index_author",   MT_COLOR_INDEX_AUTHOR },
+   { "index_collapsed",        MT_COLOR_INDEX_COLLAPSED },
+   { "index_date",     MT_COLOR_INDEX_DATE },
+   { "index_flags",    MT_COLOR_INDEX_FLAGS },
+   { "index_label",    MT_COLOR_INDEX_LABEL },
+   { "index_number",   MT_COLOR_INDEX_NUMBER },
+   { "index_size",     MT_COLOR_INDEX_SIZE },
+   { "index_subject",  MT_COLOR_INDEX_SUBJECT },
    { "prompt",         MT_COLOR_PROMPT },
    { NULL,             0 }
  };
@@@ -755,38 -785,22 +788,50 @@@ _mutt_parse_color (BUFFER *buf, BUFFER 
  #endif
    
    if (object == MT_COLOR_HEADER)
 -    r = add_pattern (&ColorHdrList, buf->data, 0, fg, bg, attr, err,0);
 +    r = add_pattern (&ColorHdrList, buf->data, 0, fg, bg, attr, err, 0, match);
    else if (object == MT_COLOR_BODY)
 -    r = add_pattern (&ColorBodyList, buf->data, 1, fg, bg, attr, err, 0);
 +    r = add_pattern (&ColorBodyList, buf->data, 1, fg, bg, attr, err, 0, match);
 +  else if ((object == MT_COLOR_STATUS) && MoreArgs (s)) {
 +    /* 'color status fg bg' can have upto 2 arguments:
 +     * 0 arguments: sets the default status color (handled below by else part)
 +     * 1 argument : colorize pattern on match
 +     * 2 arguments: colorize nth submatch of pattern
 +     */
 +    mutt_extract_token (buf, s, 0);
 +
 +    if (MoreArgs (s)) {
 +      BUFFER temporary;
 +      memset (&temporary, 0, sizeof (BUFFER));
 +      mutt_extract_token (&temporary, s, 0);
 +      match = atoi (temporary.data);
 +      FREE(&temporary.data);
 +    }
 +
 +    if (MoreArgs (s)) {
 +      strfcpy (err->data, _("too many arguments"), err->dsize);
 +      return -1;
 +    }
 +
 +    r = add_pattern (&ColorStatusList, buf->data, 1,
 +                  fg, bg, attr, err, 0, match);
 +  }
    else if (object == MT_COLOR_INDEX)
    {
 -    r = add_pattern (&ColorIndexList, buf->data, 1, fg, bg, attr, err, 1);
 +    r = add_pattern (&ColorIndexList, buf->data, 1,
 +                  fg, bg, attr, err, 1, match);
      set_option (OPTFORCEREDRAWINDEX);
 -    r = add_pattern (&ColorIndexAuthorList, buf->data, 1, fg, bg, attr, err, 1);
+   } else if (object == MT_COLOR_INDEX_AUTHOR) {
 -    r = add_pattern (&ColorIndexFlagsList, buf->data, 1, fg, bg, attr, err, 1);
++    r = add_pattern (&ColorIndexAuthorList, buf->data, 1,
++                  fg, bg, attr, err, 1, match);
+     set_option (OPTFORCEREDRAWINDEX);
+   } else if (object == MT_COLOR_INDEX_FLAGS) {
 -    r = add_pattern (&ColorIndexSubjectList, buf->data, 1, fg, bg, attr, err, 1);
++    r = add_pattern (&ColorIndexFlagsList, buf->data, 1,
++                  fg, bg, attr, err, 1, match);
+     set_option (OPTFORCEREDRAWINDEX);
+   } else if (object == MT_COLOR_INDEX_SUBJECT) {
++    r = add_pattern (&ColorIndexSubjectList, buf->data, 1,
++                  fg, bg, attr, err, 1, match);
+     set_option (OPTFORCEREDRAWINDEX);
    }
    else if (object == MT_COLOR_QUOTED)
    {
diff --cc curs_lib.c
Simple merge
index 96ddf35ed9f6264274f735260767e5fa0a55b299,93f28f15b187f8e484c298cfc3bf1403be2e212e..fabd057ca29baea188cd4c520b020dac8109a339
@@@ -8082,448 -8107,232 +8108,674 @@@ please have a look at the mixmaster doc
  
  </sect1>
  
 +<sect1 id="quasi-delete">
 +      <title>Quasi-Delete Patch</title>
 +      <subtitle>Mark emails that should be hidden, but not deleted</subtitle>
 +
 +      <sect2 id="quasi-delete-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Quasi-Delete</quote>, look for
 +                      <quote>patch-quasi-delete</quote> in the mutt version.
 +                      See: <xref linkend="mutt-patches"/>.
 +              </para>
 +
 +              <itemizedlist>
 +                      <title>Dependencies:</title>
 +                      <listitem><para>mutt-1.5.24</para></listitem>
 +              </itemizedlist>
 +
 +              <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-intro">
 +              <title>Introduction</title>
 +
 +        <para>
 +              The <quote>quasi-delete</quote> function marks an email that should be
 +              hidden from the index, but NOT deleted.
 +        </para>
 +
 +        <para>
 +              On its own, this patch isn't very useful.  It forms a useful part of
 +              the notmuch plugin.
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="quasi-delete-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="quasi-delete-functions">
 +              <title>Functions</title>
 +              <table id="table-quasi-delete-functions">
 +                      <title>Quasi-Delete Functions</title>
 +                      <tgroup cols="4">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Menus</entry>
 +                                              <entry>Default Key</entry>
 +                                              <entry>Function</entry>
 +                                              <entry>Description</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry>index,pager</entry>
 +                                              <entry>(none)</entry>
 +                                              <entry><literal>&lt;quasi-delete&gt;</literal></entry>
 +                                              <entry>delete from mutt, don't touch on disk</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="quasi-delete-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-colors">
 +              <title>Colors</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="quasi-delete-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'quasi-delete' feature.
 + 
 +# The 'quasi-delete' function marks an email that should be hidden
 +# from the index, but NOT deleted.</emphasis>
 +bind index,pager Q quasi-delete
 + 
 +<emphasis role="comment"># vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +                      <listitem><para><link linkend="notmuch">notmuch patch</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Karel Zak <email>kzak@redhat.com</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
 +<sect1 id="progress">
 +      <title>Progress Bar Patch</title>
 +      <subtitle>Show a visual progress bar on slow operations</subtitle>
 +
 +      <sect2 id="progress-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Progress Bar</quote>, look for
 +                      <quote>patch-progress</quote> in the mutt version.
 +                      See: <xref linkend="mutt-patches"/>.
 +              </para>
 +
 +              <itemizedlist>
 +                      <title>Dependencies:</title>
 +                      <listitem><para>mutt-1.5.24</para></listitem>
 +              </itemizedlist>
 +
 +              <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
 +      </sect2>
 +
 +      <sect2 id="progress-intro">
 +              <title>Introduction</title>
 +
 +        <para>
 +              The <quote>progress</quote> patch shows a visual progress bar on slow
 +              tasks, such as indexing a large folder over the net.
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="progress-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="progress-colors">
 +              <title>Colors</title>
 +              <table id="table-progress-colors">
 +                      <title>Progress Colors</title>
 +                      <tgroup cols="3">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Name</entry>
 +                                              <entry>Default Color</entry>
 +                                              <entry>Description</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry><literal>progress</literal></entry>
 +                                              <entry>default</entry>
 +                                              <entry>Visual progress bar</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="progress-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="progress-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'progress' patch.
 + 
 +# The 'progress' patch provides clear visual feedback for
 +# slow tasks, such as indexing a large folder over the net.
 + 
 +# Set the color of the progress bar
 +# White text on a red background</emphasis>
 +color progress white red
 + 
 +<emphasis role="comment"># vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="progress-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +                      <listitem><para><link linkend="color">Color command</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="progress-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Rocco Rutte <email>pdmef@gmx.net</email></para></listitem>
 +              <listitem><para>Vincent Lefevre <email>vincent@vinc17.org</email></para></listitem>
 +              <listitem><para>Stefan Kuhn <email>wuodan@hispeed.ch</email></para></listitem>
 +              <listitem><para>Karel Zak <email>kzak@redhat.com</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
 +<sect1 id="status-color">
 +      <title>Status Color Patch</title>
 +      <subtitle>Custom rules for theming the status bar</subtitle>
 +
 +      <sect2 id="status-color-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Status Color</quote>, look for
 +                      <quote>patch-status-color</quote> in the mutt version.
 +                      See: <xref linkend="mutt-patches"/>.
 +              </para>
 +
 +              <itemizedlist>
 +                      <title>Dependencies:</title>
 +                      <listitem><para>mutt-1.5.24</para></listitem>
 +              </itemizedlist>
 +
 +              <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
 +      </sect2>
 +
 +      <sect2 id="status-color-intro">
 +              <title>Introduction</title>
 +
 +        <para>
 +              The <quote>status-color</quote> patch allows you to theme different
 +              parts of the status bar (also when it's used by the index).
 +        </para>
 +
 +        <para>
 +              Unlike normal color commands, <literal>color status</literal> can now
 +              take up to 2 extra parameters (regex, num).
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="status-color-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="status-color-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="status-color-commands">
 +              <title>Commands</title>
 +              <cmdsynopsis>
 +                      <command>color</command>
 +                      <arg choice="plain">
 +                              <option>status</option>
 +                      </arg>
 +                      <arg choice="plain">
 +                              <replaceable class="parameter">foreground</replaceable>
 +                      </arg>
 +                      <arg choice="plain">
 +                              <replaceable class="parameter">background</replaceable>
 +                      </arg>
 +                      <group choice="opt">
 +                              <arg choice="plain">
 +                                      <replaceable class="parameter">regex</replaceable>
 +                              </arg>
 +                              <group choice="opt">
 +                                      <arg choice="plain">
 +                                              <replaceable class="parameter">num</replaceable>
 +                                      </arg>
 +                              </group>
 +                      </group>
 +              </cmdsynopsis>
 +
 +              <para>
 +                      With zero parameters, Mutt will set the default color for the entire
 +                      status bar.
 +              </para>
 +
 +              <para>
 +                      With one parameter, Mutt will only color the parts matching the
 +                      regex.
 +              </para>
 +
 +              <para>
 +                      With two parameters, Mutt will only color the num'th sub-match of
 +                      the regex.
 +              </para>
 +      </sect2>
 +
 +      <sect2 id="status-color-colors">
 +              <title>Colors</title>
 +
 +              <table id="table-status-color-colors">
 +                      <title>Status Colors</title>
 +                      <tgroup cols="3">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Name</entry>
 +                                              <entry>Default Color</entry>
 +                                              <entry>Description</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry>status</entry>
 +                                              <entry><literal>reverse</literal></entry>
 +                                              <entry>Status bar</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="status-color-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="status-color-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'status-color' patch.
 + 
 +# The 'status-color' patch allows you to theme different parts of
 +# the status bar (also when it's used by the index).
 + 
 +# For the examples below, set some defaults</emphasis>
 +set status_format='-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%&gt;-(%P)---'
 +set index_format='%4C %Z %{%b %d} %-15.15L (%?l?%4l&amp;%4c?) %s'
 +set sort=threads
 +set sort_aux=last-date-received
 + 
 +<emphasis role="comment"># 'status color' can take up to 2 extra parameters
 + 
 +# color status foreground background [ regex [ num ]]
 + 
 +# 0 extra parameters
 +# Set the default color for the entire status line</emphasis>
 +color status blue white
 + 
 +<emphasis role="comment"># 1 extra parameter
 +# Set the color for a matching pattern
 +# color status foreground background regexp
 + 
 +# Highlight New, Deleted, or Flagged emails</emphasis>
 +color status brightred white '(New|Del|Flag):[0-9]+'
 + 
 +<emphasis role="comment"># Highlight mailbox ordering if it's different from the default
 +# First, highlight anything (*/*)</emphasis>
 +color status brightred default '\([^)]+/[^)]+\)'
 + 
 +<emphasis role="comment"># Then override the color for one specfic case</emphasis>
 +color status default   default '\(threads/last-date-received\)'
 + 
 +<emphasis role="comment"># 2 extra parameters
 +# Set the color for the nth submatch of a pattern
 +# color status foreground background regexp num
 + 
 +# Highlight the contents of the []s but not the [] themselves</emphasis>
 +color status red default '\[([^]]+)\]' 1
 + 
 +<emphasis role="comment"># The '1' refers to the first regex submatch, which is the inner
 +# part in ()s
 + 
 +# Highlight the mailbox</emphasis>
 +color status brightwhite default 'Mutt: ([^ ]+)' 1
 + 
 +<emphasis role="comment"># Search for 'Mutt: ' but only highlight what comes after it
 + 
 +# vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="status-color-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +                      <listitem><para><link linkend="compile-time-features">Compile-Time Features</link></para></listitem>
 +                      <listitem><para><link linkend="regexp">Regular Expressions</link></para></listitem>
 +                      <listitem><para><link linkend="patterns">Patterns</link></para></listitem>
 +                      <listitem><para><link linkend="index-color">index-color patch</link></para></listitem>
 +                      <listitem><para><link linkend="color">Color command</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="status-color-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="status-color-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>David Sterba <email>dsterba@suse.cz</email></para></listitem>
 +              <listitem><para>Thomas Glanzmann <email>thomas@glanzmann.de</email></para></listitem>
 +              <listitem><para>Kirill A. Shutemov <email>kirill@shutemov.name</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
+ <sect1 id="index-color">
+       <title>Index Color Patch</title>
+       <subtitle>Custom rules for theming the email index</subtitle>
+       <sect2 id="index-color-patch">
+               <title>Patch</title>
+               <para>
+                       To check if Mutt supports <quote>Index Color</quote>, look for
+                       <quote>patch-index-color</quote> in the mutt version.
+                       See: <xref linkend="mutt-patches"/>.
+               </para>
+               <itemizedlist>
+                       <title>Dependencies:</title>
+                       <listitem><para>mutt-1.5.24</para></listitem>
+                       <listitem><para><link linkend="status-color">status-color patch</link></para></listitem>
+               </itemizedlist>
+               <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
+       </sect2>
+       <sect2 id="index-color-intro">
+               <title>Introduction</title>
+         <para>
+               The <quote>index-color</quote> patch allows you to specify colors for
+               individual parts of the email index. e.g. Subject, Author, Flags.
+         </para>
+         <para>
+               First choose which part of the index you'd like to color.
+               Then, if needed, pick a pattern to match.
+         </para>
+               <para>
+               Note: The pattern does not have to refer to the object you wish to
+               color.  e.g.
+               </para>
+ <screen>
+ color index_author red default &quot;~smutt&quot;
+ </screen>
+         <para>
+               The author appears red when the subject (~s) contains <quote>mutt</quote>.
+         </para>
+       </sect2>
+ <!--
+       <sect2 id="index-color-variables">
+               <title>Variables</title>
+               <para>None</para>
+       </sect2>
+       <sect2 id="index-color-functions">
+               <title>Functions</title>
+               <para>None</para>
+       </sect2>
+       <sect2 id="index-color-commands">
+               <title>Commands</title>
+               <para>None</para>
+       </sect2>
+ -->
+       <sect2 id="index-color-colors">
+               <title>Colors</title>
+         <para>
+               All the colors default to <literal>default</literal>, i.e. unset.
+         </para>
+         <para>
+               The index objects can be themed using the <literal>color</literal> command.
+               Some objects require a pattern.
+         </para>
+ <screen>
+ color index-object foreground background
+ color index-object foreground background pattern
+ </screen>
+               <table id="table-index-color-colors">
+                       <title>Index Colors</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Object</entry>
+                                               <entry>Pattern</entry>
+                                               <entry>Highlights</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry><literal>index</literal></entry>
+                                               <entry>yes</entry>
+                                               <entry>Entire index line</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_author</literal></entry>
+                                               <entry>yes</entry>
+                                               <entry>Author name, %A %a %F %L %n</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_collapsed</literal></entry>
+                                               <entry>no</entry>
+                                               <entry>Number of messages in a collapsed thread, %M</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_date</literal></entry>
+                                               <entry>no</entry>
+                                               <entry>Date field</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_flags</literal></entry>
+                                               <entry>yes</entry>
+                                               <entry>Message flags, %S %Z</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_label</literal></entry>
+                                               <entry>no</entry>
+                                               <entry>Message label, %y %Y</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_number</literal></entry>
+                                               <entry>no</entry>
+                                               <entry>Message number, %C</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_size</literal></entry>
+                                               <entry>no</entry>
+                                               <entry>Message size, %c %l</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>index_subject</literal></entry>
+                                               <entry>yes</entry>
+                                               <entry>Subject, %s</entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </sect2>
+ <!--
+       <sect2 id="index-color-sort">
+               <title>Sort</title>
+               <para>None</para>
+       </sect2>
+ -->
+       <sect2 id="index-color-muttrc">
+               <title>Muttrc</title>
+ <screen>
+ <emphasis role="comment"># Example Mutt config file for the 'index-color' feature.
+  
+ # Entire index line</emphasis>
+ color index white black '.*'
+  
+ <emphasis role="comment"># Author name, %A %a %F %L %n
+  
+ # Give the author column a dark grey background</emphasis>
+ color index_author default color234 '.*'
+  
+ <emphasis role="comment"># Highlight a particular from (~f)</emphasis>
+ color index_author brightyellow color234 '~fRay Charles'
+  
+ <emphasis role="comment"># Message flags, %S %Z
+ # Highlight the flags for flagged (~F) emails</emphasis>
+ color index_flags default red '~F'
+  
+ <emphasis role="comment"># Subject, %s
+ # Look for a particular subject (~s)</emphasis>
+ color index_subject brightcyan default '~s\(closes #[0-9]+\)'
+  
+ <emphasis role="comment"># Number of messages in a collapsed thread, %M</emphasis>
+ color index_collapsed default brightblue
+  
+ <emphasis role="comment"># Date field</emphasis>
+ color index_date green default
+  
+ <emphasis role="comment"># Message label, %y %Y</emphasis>
+ color index_label default brightgreen
+  
+ <emphasis role="comment"># Message number, %C</emphasis>
+ color index_number red default
+  
+ <emphasis role="comment"># Message size, %c %l</emphasis>
+ color index_size cyan default
+  
+ <emphasis role="comment"># vim: syntax=muttrc</emphasis>
+ </screen>
+       </sect2>
+       <sect2 id="index-color-see-also">
+               <title>See Also</title>
+               <itemizedlist>
+                       <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
+                       <listitem><para><link linkend="regexp">Regular Expressions</link></para></listitem>
+                       <listitem><para><link linkend="patterns">Patterns</link></para></listitem>
+                       <listitem><para><link linkend="index-format">$index_format</link></para></listitem>
+                       <listitem><para><link linkend="color">Color command</link></para></listitem>
+                       <listitem><para><link linkend="status-color">Status-Color patch</link></para></listitem>
+                       <listitem><para><link linkend="keywords">Keywords patch</link></para></listitem>
+               </itemizedlist>
+       </sect2>
+       <sect2 id="index-color-known-bugs">
+               <title>Known Bugs</title>
+               <para>None</para>
+       </sect2>
+       <sect2 id="index-color-credits">
+               <title>Credits</title>
+               <itemizedlist>
+               <listitem><para>Christian Aichinger <email>Greek0@gmx.net</email></para></listitem>
+               <listitem><para>Christoph <quote>Myon</quote> Berg <email>myon@debian.org</email></para></listitem>
+               <listitem><para>Elimar Riesebieter <email>riesebie@lxtec.de</email></para></listitem>
+               <listitem><para>Eric Davis <email>edavis@insanum.com</email></para></listitem>
+               <listitem><para>Vladimir Marek <email>Vladimir.Marek@oracle.com</email></para></listitem>
+               <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
+               </itemizedlist>
+       </sect2>
+ </sect1>
  </chapter>
  
  <chapter id="security">
diff --cc mutt.h
Simple merge
diff --cc mutt_curses.h
index ef80f9740d85b0e69358a9803eb77503b3667981,e8bb9aa016e1d9d97ff888dd9f106069f9bd674f..b7bf5fb1f358cea749e04f4b8cff9d2551f889a9
@@@ -122,9 -122,18 +122,19 @@@ enu
    MT_COLOR_SEARCH,
    MT_COLOR_BOLD,
    MT_COLOR_UNDERLINE,
-   MT_COLOR_INDEX,
    MT_COLOR_PROMPT,
 +  MT_COLOR_PROGRESS,
+   /* please no non-MT_COLOR_INDEX objects after this point */
+   MT_COLOR_INDEX,
+   MT_COLOR_INDEX_AUTHOR,
+   MT_COLOR_INDEX_FLAGS,
+   MT_COLOR_INDEX_SUBJECT,
+   /* below here - only index coloring stuff that doesn't have a pattern */
+   MT_COLOR_INDEX_COLLAPSED,
+   MT_COLOR_INDEX_DATE,
+   MT_COLOR_INDEX_LABEL,
+   MT_COLOR_INDEX_NUMBER,
+   MT_COLOR_INDEX_SIZE,
    MT_COLOR_MAX
  };
  
@@@ -178,8 -186,10 +188,11 @@@ extern int ColorQuoteUsed
  extern int ColorDefs[];
  extern COLOR_LINE *ColorHdrList;
  extern COLOR_LINE *ColorBodyList;
 +extern COLOR_LINE *ColorStatusList;
  extern COLOR_LINE *ColorIndexList;
+ extern COLOR_LINE *ColorIndexAuthorList;
+ extern COLOR_LINE *ColorIndexFlagsList;
+ extern COLOR_LINE *ColorIndexSubjectList;
  
  void ci_init_color (void);
  void ci_start_color (void);