]> granicus.if.org Git - neomutt/commitdiff
docs: index-color
authorRichard Russon <rich@flatcap.org>
Mon, 1 Aug 2016 23:39:33 +0000 (00:39 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 18 Aug 2016 14:51:01 +0000 (15:51 +0100)
doc/manual.xml.head
doc/muttrc.index-color [new file with mode: 0644]
doc/vimrc.index-color [new file with mode: 0644]

index 937c853f13daa98365b1350f8238ef3317b608c8..640cc82e788704650bfe54cd0b7432d9dc358ed5 100644 (file)
@@ -2651,7 +2651,7 @@ silently truncated at the screen width, and are not wrapped.
 
 <command>color</command>
 <arg choice="plain">
-<option>index</option>
+<option>index-object</option>
 </arg>
 <arg choice="plain">
 <replaceable class="parameter">foreground</replaceable>
@@ -2666,7 +2666,7 @@ silently truncated at the screen width, and are not wrapped.
 <command>uncolor</command>
 <group choice="req">
 <arg choice="plain">
-<option>index</option>
+<option>index-object</option>
 </arg>
 <arg choice="plain">
 <option>header</option>
@@ -2696,8 +2696,8 @@ specify one or the other).
 <para>
 <emphasis>header</emphasis> and <emphasis>body</emphasis> match
 <emphasis>regexp</emphasis> in the header/body of a message,
-<emphasis>index</emphasis> matches <emphasis>pattern</emphasis> (see
-<xref linkend="patterns"/>) in the message index.  Note that IMAP
+<emphasis>index-object</emphasis> can match <emphasis>pattern</emphasis>
+(see <xref linkend="patterns"/>) in the message index. Note that IMAP
 server-side searches (=b, =B, =h) are not supported for color index
 patterns.
 </para>
@@ -2711,6 +2711,14 @@ patterns.
 <listitem><para>bold (highlighting bold patterns in the body of messages)</para></listitem>
 <listitem><para>error (error messages printed by Mutt)</para></listitem>
 <listitem><para>hdrdefault (default color of the message header in the pager)</para></listitem>
+<listitem><para>index_author (color of the author name in the index, uses <emphasis>pattern</emphasis>)</para></listitem>
+<listitem><para>index_collapsed (the number of messages in a collapsed thread in the index)</para></listitem>
+<listitem><para>index_date (color of the date field in the index)</para></listitem>
+<listitem><para>index_flags (color of the message flags in the index)</para></listitem>
+<listitem><para>index_label (color of the message label in the index)</para></listitem>
+<listitem><para>index_number (color of the message number in the index)</para></listitem>
+<listitem><para>index_size (color of the message size and line number in the index)</para></listitem>
+<listitem><para>index_subject (color of the subject in the index, uses <emphasis>pattern</emphasis>)</para></listitem>
 <listitem><para>indicator (arrow or bar used to indicate the current item in a menu)</para></listitem>
 <listitem><para>markers (the <quote>+</quote> markers at the beginning of wrapped lines in the pager)</para></listitem>
 <listitem><para>message (informational messages)</para></listitem>
@@ -2725,6 +2733,24 @@ patterns.
 <listitem><para>underline (highlighting underlined patterns in the body of messages)</para></listitem>
 </itemizedlist>
 
+<para>
+<emphasis>index-object</emphasis> can be one of the following:
+</para>
+
+<itemizedlist>
+<listitem><para>index (default highlighting of the entire index line, uses <emphasis>pattern</emphasis>)</para></listitem>
+<listitem><para>index_date (the date field)</para></listitem>
+<listitem><para>index_flags (the message flags, %S %Z, uses <emphasis>pattern</emphasis>)</para></listitem>
+<listitem><para>index_number (the message number, %C)</para></listitem>
+<listitem><para>index_collapsed (the number of messages in a collapsed thread, %M)</para></listitem>
+<listitem><para>index_author (the author name, %A %a %F %L %n, uses <emphasis>pattern</emphasis>)</para></listitem>
+<listitem><para>index_subject (the subject, %s, uses <emphasis>pattern</emphasis>)</para></listitem>
+<listitem><para>index_size (the message size, %c %l)</para></listitem>
+<listitem><para>index_label (the message label, %y %Y)</para></listitem>
+<listitem><para>index_tags (the transformed message tags, %g)</para></listitem>
+<listitem><para>index_tag (an individual message tag, %G, uses <emphasis>pattern / tag name</emphasis>)</para></listitem>
+</itemizedlist>
+
 <para>
 <emphasis>foreground</emphasis> and <emphasis>background</emphasis> can
 be one of the following:
@@ -2842,7 +2868,7 @@ command. Usage:
 <command>unmono</command>
 <group choice="req">
 <arg choice="plain">
-<option>index</option>
+<option>index-object</option>
 </arg>
 <arg choice="plain">
 <option>header</option>
@@ -9228,6 +9254,232 @@ ifndef USE_SIDEBAR finish
   </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.6.2</para></listitem>
+      <listitem><para><link linkend="status-color">status-color patch</link></para></listitem>
+    </itemizedlist>
+
+    <para>This patch is part of the <ulink url="http://www.neomutt.org/">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="http://www.neomutt.org/">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>
+
 <sect1 id="sidebar">
   <title>Sidebar</title>
   <subtitle>Overview of mailboxes</subtitle>
diff --git a/doc/muttrc.index-color b/doc/muttrc.index-color
new file mode 100644 (file)
index 0000000..3ec91f5
--- /dev/null
@@ -0,0 +1,37 @@
+# Example Mutt config file for the 'index-color' feature.
+
+# Entire index line
+color index white black '.*'
+
+# Author name, %A %a %F %L %n
+
+# Give the author column a dark grey background
+color index_author default color234 '.*'
+
+# Highlight a particular from (~f)
+color index_author brightyellow color234 '~fRay Charles'
+
+# Message flags, %S %Z
+# Highlight the flags for flagged (~F) emails
+color index_flags default red '~F'
+
+# Subject, %s
+# Look for a particular subject (~s)
+color index_subject brightcyan default '~s\(closes #[0-9]+\)'
+
+# Number of messages in a collapsed thread, %M
+color index_collapsed default brightblue
+
+# Date field
+color index_date green default
+
+# Message label, %y %Y
+color index_label default brightgreen
+
+# Message number, %C
+color index_number red default
+
+# Message size, %c %l
+color index_size cyan default
+
+# vim: syntax=muttrc
diff --git a/doc/vimrc.index-color b/doc/vimrc.index-color
new file mode 100644 (file)
index 0000000..8de9c67
--- /dev/null
@@ -0,0 +1,13 @@
+" Vim syntax file for the mutt index-color patch
+
+syntax keyword muttrcColorField contained index
+syntax keyword muttrcColorField contained index_author
+syntax keyword muttrcColorField contained index_collapsed
+syntax keyword muttrcColorField contained index_date
+syntax keyword muttrcColorField contained index_flags
+syntax keyword muttrcColorField contained index_label
+syntax keyword muttrcColorField contained index_number
+syntax keyword muttrcColorField contained index_size
+syntax keyword muttrcColorField contained index_subject
+
+" vim: syntax=vim