]> granicus.if.org Git - neomutt/commitdiff
merge: sidebar - overview of mailboxes
authorRichard Russon <rich@flatcap.org>
Mon, 7 Mar 2016 04:46:50 +0000 (04:46 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 7 Mar 2016 04:46:50 +0000 (04:46 +0000)
 * sidebar 1.5.24-20151111
 * bugfix: missing includes
 * bugfix: compose mode
 * bugfix: delim null wide
 * bugfix: fixed header wrapping
 * feature: new only
 * feature: prev/next wraparound
 * feature: whitelist
 * feature: working utf8
 * feature: dotpathsep
 * feature: refresh
 * indent: our functions
 * indent: sync to surroundings
 * fix: drop unused
 * fix: drop DrawFullLine
 * tidy: sidebar
 * tidy: our functions
 * tidy: other code
 * sort: sidebar functions
 * tidy: rename functions
 * tidy: add comments
 * build: conditional compilation
 * fix brain-damaged function: mh_buffy_update
 * fix refresh -- time overflowed short
 * feature: add function sidebar-toggle-visible
 * drop old sort
 * rename: msgcount to msg_count to match other sidebar variables
 * rename: vars
 * add: BUFFY sorting
 * add: colours for divider and highlights
 * refactor: split out initialise
 * add: BUFFY notifications
 * refactor: visibility check
 * distinguish between what's highlighted and what's actually open
 * revamp sorting
 * split up sb_draw
 * expandos for deleted, limited, tagged
 * feature: separate sidebar indicator colour
 * feature: separate colour for spoolfile
 * rename: lots of config for consistency with mutt
 * handle unmailboxes * safely
 * split out sidebar wipe
 * refresh sidebar after timeout
 * add docs
 * add ident to PATCHES

19 files changed:
1  2 
Makefile.am
PATCHES
color.c
configure.ac
curs_main.c
doc/manual.xml.head
functions.h
globals.h
init.c
init.h
main.c
menu.c
mh.c
mutt.h
mutt_curses.h
muttlib.c
mx.c
pager.c
sort.h

diff --cc Makefile.am
Simple merge
diff --cc PATCHES
index 69b775b5c2d9d97466cbbb1455d7dc0f342c72ac,37a410326fdbc11df298b07b2fc5e3a21084882d..0beb40ec5bbbb556fbeae9373290f1ffd04bcfdf
+++ b/PATCHES
@@@ -1,7 -1,1 +1,8 @@@
 +patch-quasi-delete-neo-UNKNOWN
 +patch-progress-neo-UNKNOWN
 +patch-status-color-neo-UNKNOWN
 +patch-index-color-neo-UNKNOWN
 +patch-nested-if-neo-UNKNOWN
 +patch-cond-date-neo-UNKNOWN
 +patch-tls-sni-neo-UNKNOWN
+ patch-sidebar-neo-UNKNOWN
diff --cc color.c
index 279487be4aa47a161826dadeec531778dc739aca,1ba4df2dab98a688980aa3c087f8e44383e0b9e4..9eaeb26459860142885988b75e02ab111349d13d
+++ b/color.c
@@@ -97,16 -93,15 +97,24 @@@ 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 },
+ #ifdef USE_SIDEBAR
+   { "sidebar_divider",        MT_COLOR_DIVIDER },
+   { "sidebar_flagged",        MT_COLOR_FLAGGED },
+   { "sidebar_highlight",MT_COLOR_HIGHLIGHT },
+   { "sidebar_indicator",MT_COLOR_SB_INDICATOR },
+   { "sidebar_new",    MT_COLOR_NEW },
+   { "sidebar_spoolfile",MT_COLOR_SB_SPOOLFILE },
+ #endif
    { NULL,             0 }
  };
  
diff --cc configure.ac
Simple merge
diff --cc curs_main.c
index c4811c7b943f5043e7013fb036c41a40b458cb24,174a275c7a023edba6d7675696f55388535749b8..64bd3702742ce5eb7a0acaad9f4c127e9077826e
@@@ -737,10 -654,21 +760,21 @@@ int mutt_index_menu (void
  
        if (menu->redraw & REDRAW_STATUS)
        {
+ #ifdef USE_SIDEBAR
+         /* Temporarily lie about the sidebar width */
+       short sw = SidebarWidth;
+       SidebarWidth = 0;
+ #endif
        menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
+ #ifdef USE_SIDEBAR
+         SidebarWidth = sw; /* Restore the sidebar width */
+ #endif
        move (option (OPTSTATUSONTOP) ? 0 : LINES-2, 0);
        SETCOLOR (MT_COLOR_STATUS);
 -      mutt_paddstr (COLS, buf);
+ #ifdef USE_SIDEBAR
+       sb_set_buffystats (Context);
+ #endif
 +      mutt_draw_statusline (COLS, buf);
        NORMAL_COLOR;
        menu->redraw &= ~REDRAW_STATUS;
        if (option(OPTTSENABLED) && TSSupported)
          menu->redraw = REDRAW_FULL;
        break;
  
 +      case OP_MAIN_QUASI_DELETE:
 +      if (tag) {
 +        for (j = 0; j < Context->vcount; j++) {
 +          if (Context->hdrs[Context->v2r[j]]->tagged) {
 +            Context->hdrs[Context->v2r[j]]->quasi_deleted = TRUE;
 +            Context->changed = TRUE;
 +          }
 +        }
 +      } else {
 +        CURHDR->quasi_deleted = TRUE;
 +        Context->changed = 1;
 +      }
 +      break;
 +
+ #ifdef USE_SIDEBAR
+       case OP_SIDEBAR_OPEN:
+ #endif
        case OP_MAIN_CHANGE_FOLDER:
        case OP_MAIN_NEXT_UNREAD_MAILBOX:
  
index 53c7e4c4d5d166f42b76dcb9b12a67e5c1acbcaf,155da07af764be58594387af577f651f5b8ffc61..6e4ec11cc38af50a6de3669ba39354837ac0dd5d
@@@ -8055,1402 -8612,469 +8672,1865 @@@ 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>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>
 +
 +<sect1 id="nested-if">
 +      <title>Nested If Patch</title>
 +      <subtitle>Allow complex nested conditions in format strings</subtitle>
 +
 +      <sect2 id="nested-if-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Nested If</quote>, look for
 +                      <quote>patch-nested-if</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="nested-if-intro">
 +              <title>Introduction</title>
 +
 +              <para>
 +                      Mutt's format strings can contain embedded if-then-else conditions.
 +                      They are of the form:
 +              </para>
 +
 +<screen>
 +%?VAR?TRUE&amp;FALSE?
 +</screen>
 +
 +              <para>
 +                      If the variable <quote>VAR</quote> has a value greater than zero,
 +                      print the <quote>TRUE</quote> string, otherwise print the
 +                      <quote>FALSE</quote> string.
 +              </para>
 +
 +              <para>
 +                      e.g.  <literal>%?S?Size: %S&amp;Empty?</literal>
 +              </para>
 +
 +              <para>Which can be read as:</para>
 +
 +              <literallayout>
 +                  if (%S &gt; 0) {
 +                      print &quot;Size: %S&quot;
 +                  } else {
 +                      print &quot;Empty&quot;
 +                  }
 +              </literallayout>
 +
 +              <para>
 +                      These conditions are useful, but in Mutt they cannot be nested
 +                      within one another.  This patch uses the notation
 +                      <literal>%&lt;VAR?TRUE&amp;FALSE&gt;</literal> and allows them to be nested.
 +              </para>
 +
 +              <para>
 +                      The <literal>%&lt;...&gt;</literal> notation was used to format the
 +                      current local time.  but that's not really very useful since mutt
 +                      has no means of refreshing the screen periodically.
 +              </para>
 +
 +              <para>
 +                      A simple nested condition might be:
 +                      (Some whitespace has been introduced for clarity)
 +              </para>
 +
 +              <literallayout>
 +                  %&lt;x? %&lt;y? XY &amp; X &gt; &amp; %&lt;y? Y &amp; NONE &gt; &gt;  Conditions
 +                       %&lt;y? XY &amp; X &gt;                      x&gt;0
 +                            XY                            x&gt;0,y&gt;0
 +                                 X                        x&gt;0,y=0
 +              </literallayout>
 +
 +              <literallayout>
 +                  %&lt;x? %&lt;y? XY &amp; X &gt; &amp; %&lt;y? Y &amp; NONE &gt; &gt;  Conditions
 +                                       %&lt;y? Y &amp; NONE &gt;    x=0
 +                                            Y             x=0,y&gt;0
 +                                                NONE      x=0,y=0
 +              </literallayout>
 +
 +              <para>Equivalent to:</para>
 +
 +              <literallayout>
 +                  if (x &gt; 0) {
 +                      if (y &gt; 0) {
 +                          print 'XY'
 +                      } else {
 +                          print 'X'
 +                      }
 +                  } else {
 +                      if (y &gt; 0) {
 +                          print 'Y'
 +                      } else {
 +                          print 'NONE'
 +                      }
 +                  }
 +              </literallayout>
 +
 +              <para>Examples:</para>
 +
 +<screen>
 +set index_format='%4C %Z %{%b %d} %-25.25n %s%&gt; %&lt;M?%M Msgs &amp;%&lt;l?%l Lines&amp;%c Bytes&gt;&gt;'
 +</screen>
 +
 +              <literallayout>
 +                  if a thread is folded
 +                      display the number of messages (%M)
 +                  else if we know how many lines in the message
 +                      display lines in message (%l)
 +                  else
 +                      display the size of the message in bytes (%c)
 +              </literallayout>
 +
 +<screen>
 +set index_format='%4C %Z %{%b %d} %-25.25n %&lt;M?[%M] %s&amp;%s%* %&lt;l?%l&amp;%c&gt;&gt;'
 +</screen>
 +
 +              <literallayout>
 +                  if a thread is folded
 +                      display the number of messages (%M)
 +                      display the subject (%s)
 +                  else if we know how many lines in the message
 +                      display lines in message (%l)
 +                  else
 +                      display the size of the message in bytes (%c)
 +              </literallayout>
 +
 +      </sect2>
 +
 +      <sect2 id="nested-if-variables">
 +              <title>Variables</title>
 +              The <quote>nested-if</quote> patch doesn't have any config of its own.
 +              It modifies the behavior of the format strings.
 +      </sect2>
 +
 +<!--
 +      <sect2 id="nested-if-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="nested-if-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="nested-if-colors">
 +              <title>Colors</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="nested-if-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="nested-if-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'nested-if' feature.
 + 
 +# This patch uses the format: '%&lt;VAR?TRUE&amp;FALSE&gt;' for conditional
 +# format strings that can be nested.
 + 
 +# Example 1
 +# if a thread is folded
 +#       display the number of messages (%M)
 +# else if we know how many lines in the message
 +#       display lines in message (%l)
 +# else display the size of the message in bytes (%c)</emphasis>
 +set index_format='%4C %Z %{%b %d} %-25.25n %s%&gt; %&lt;M?%M Msgs &amp;%&lt;l?%l Lines&amp;%c Bytes&gt;&gt;'
 + 
 +<emphasis role="comment"># Example 2
 +# if a thread is folded
 +#       display the number of messages (%M)
 +#       display the subject (%s)
 +# else if we know how many lines in the message
 +#       display lines in message (%l)
 +# else
 +#       display the size of the message in bytes (%c)</emphasis>
 +set index_format='%4C %Z %{%b %d} %-25.25n %&lt;M?[%M] %s&amp;%s%* %&lt;l?%l&amp;%c&gt;&gt;'
 + 
 +<emphasis role="comment"># vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="nested-if-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="cond-date">cond-date patch</link></para></listitem>
 +                      <listitem><para><link linkend="index-format">$index_format</link></para></listitem>
 +                      <listitem><para><link linkend="status-format">$status_format</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="nested-if-known-bugs">
 +              <title>Known Bugs</title>
 +              Patch overwrites $&lt;fmt&gt; handler in <literal>$index_format</literal>
 +      </sect2>
 +
 +      <sect2 id="nested-if-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>David Champion <email>dgc@uchicago.edu</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
 +<sect1 id="cond-date">
 +      <title>Conditional Dates Patch</title>
 +      <subtitle>Use rules to choose date format</subtitle>
 +
 +      <sect2 id="cond-date-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Conditional Dates</quote>, look for
 +                      <quote>patch-cond-date</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="nested-if">nested-if 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="cond-date-intro">
 +              <title>Introduction</title>
 +
 +              <para>
 +              The <quote>cond-date</quote> patch allows you to construct
 +              <link linkend="index-format">$index_format</link> expressions based on the age of the email.
 +              </para>
 +
 +              <para>
 +              Mutt's default <literal>$index_format</literal> displays email dates in the
 +              form: abbreviated-month day-of-month &mdash; <quote>Jan 14</quote>.
 +              </para>
 +
 +              <para>
 +              The format is configurable but only per-mailbox.  This patch allows you
 +              to configure the display depending on the age of the email.
 +              </para>
 +
 +              <table id="table-cond-date-scheme">
 +                      <title>Potential Formatting Scheme</title>
 +                      <tgroup cols="3">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Email Sent</entry>
 +                                              <entry>Format</entry>
 +                                              <entry>Example</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry>Today</entry>
 +                                              <entry><literal>%H:%M</literal></entry>
 +                                              <entry>13:23</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>This Month</entry>
 +                                              <entry><literal>%a %d</literal></entry>
 +                                              <entry>Thu 17</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>This Year</entry>
 +                                              <entry><literal>%b %d</literal></entry>
 +                                              <entry>Dec 10</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>Older than 1 Year</entry>
 +                                              <entry><literal>%m/%y</literal></entry>
 +                                              <entry>06/14</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +
 +              <para>
 +        For an explanation of the date formatting strings, see
 +        <literal>strftime(3).</literal>
 +              </para>
 +
 +              <para>
 +        By carefully picking your formats, the dates can remain
 +        unambiguous and compact.
 +              </para>
 +
 +              <para>
 +              Mutt's conditional format strings have the form:
 +              (whitespace introduced for clarity)
 +              </para>
 +
 +              <screen>%? TEST ? TRUE &amp; FALSE ?</screen>
 +
 +              <para>
 +              The examples below use the test <quote>%[</quote> &mdash; the date
 +              of the message in the local timezone.  They will also work with
 +              <quote>%(</quote> &mdash; the local time that the message arrived.
 +              </para>
 +
 +              <para>
 +              The date tests are of the form:
 +              </para>
 +
 +              <screen>%[nX? TRUE &amp; FALSE ?</screen>
 +
 +              <itemizedlist>
 +              <listitem><para><quote>n</quote> is an optional count (defaults to 1 if missing)</para></listitem>
 +              <listitem><para><quote>X</quote> is the time period</para></listitem>
 +              </itemizedlist>
 +
 +              <table id="table-cond-date-format-codes">
 +                      <title>Date Formatting Codes</title>
 +                      <tgroup cols="2">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Letter</entry>
 +                                              <entry>Time Period</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry>y</entry>
 +                                              <entry>Years</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>m</entry>
 +                                              <entry>Months</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>w</entry>
 +                                              <entry>Weeks</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>d</entry>
 +                                              <entry>Days</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>H</entry>
 +                                              <entry>Hours</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry>M</entry>
 +                                              <entry>Minutes</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +
 +              <table id="table-cond-date-example-tests">
 +                      <title>Example Date Tests</title>
 +                      <tgroup cols="2">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Test</entry>
 +                                              <entry>Meaning</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry><literal>%[y</literal></entry>
 +                                              <entry>This year</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry><literal>%[1y</literal></entry>
 +                                              <entry>This year</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry><literal>%[6m</literal></entry>
 +                                              <entry>In the last 6 months</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry><literal>%[w</literal></entry>
 +                                              <entry>This week</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry><literal>%[d</literal></entry>
 +                                              <entry>Today</entry>
 +                                      </row>
 +                                      <row>
 +                                              <entry><literal>%[4H</literal></entry>
 +                                              <entry>In the last 4 hours</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +
 +              <sect3 id="cond-date-example1">
 +                      <title>Example 1</title>
 +
 +                      <para>We start with a one-condition test.</para>
 +
 +                      <table id="table-cond-date-example1">
 +                              <title>Example 1</title>
 +                              <tgroup cols="4">
 +                                      <thead>
 +                                              <row>
 +                                                      <entry>Test</entry>
 +                                                      <entry>Date Range</entry>
 +                                                      <entry>Format String</entry>
 +                                                      <entry>Example</entry>
 +                                              </row>
 +                                      </thead>
 +                                      <tbody>
 +                                              <row>
 +                                                      <entry><literal>%[1m</literal></entry>
 +                                                      <entry>This month</entry>
 +                                                      <entry><literal>%[%b %d]</literal></entry>
 +                                                      <entry>Dec 10</entry>
 +                                              </row>
 +                                              <row>
 +                                                      <entry></entry>
 +                                                      <entry>Older</entry>
 +                                                      <entry><literal>%[%Y-%m-%d]</literal></entry>
 +                                                      <entry>2015-04-23</entry>
 +                                              </row>
 +                                      </tbody>
 +                              </tgroup>
 +                      </table>
 +
 +                      <para>The $index_format string would contain:</para>
 +<screen>
 +%?[1m?%[%b %d]&amp;%[%Y-%m-%d]?
 +</screen>
 + 
 +                      <para>
 +                              Reparsed a little, for clarity, you can see the
 +                              test condition and the two format strings.
 +                      </para>
 +
 +<screen>
 +%?[1m?        &amp;           ?
 +      %[%b %d] %[%Y-%m-%d]
 +</screen>
 +
 +              </sect3>
 +
 +              <sect3 id="cond-date-example2">
 +                      <title>Example 2</title>
 +
 +                      <para>
 +                      This example contains three test conditions and four date formats.
 +                      </para>
 +
 +                      <table id="table-cond-date-example2">
 +                              <title>Example 2</title>
 +                              <tgroup cols="4">
 +                                      <thead>
 +                                              <row>
 +                                                      <entry>Test</entry>
 +                                                      <entry>Date Range</entry>
 +                                                      <entry>Format String</entry>
 +                                                      <entry>Example</entry>
 +                                              </row>
 +                                      </thead>
 +                                      <tbody>
 +                                              <row>
 +                                                      <entry><literal>%[d</literal></entry>
 +                                                      <entry>Today</entry>
 +                                                      <entry><literal>%[%H:%M ] </literal></entry>
 +                                                      <entry>12:34</entry>
 +                                              </row>
 +                                              <row>
 +                                                      <entry><literal>%[m</literal></entry>
 +                                                      <entry>This month</entry>
 +                                                      <entry><literal>%[%a %d]</literal></entry>
 +                                                      <entry>Thu 12</entry>
 +                                              </row>
 +                                              <row>
 +                                                      <entry><literal>%[y</literal></entry>
 +                                                      <entry>This year</entry>
 +                                                      <entry><literal>%[%b %d]</literal></entry>
 +                                                      <entry>Dec 10</entry>
 +                                              </row>
 +                                              <row>
 +                                                      <entry></entry>
 +                                                      <entry>Older</entry>
 +                                                      <entry><literal>%[%m/%y ]</literal></entry>
 +                                                      <entry>06/15</entry>
 +                                              </row>
 +                                      </tbody>
 +                              </tgroup>
 +                      </table>
 +
 +                      <para>The $index_format string would contain:</para>
 + 
 +<screen>
 +%&lt;[y?%&lt;[m?%&lt;[d?%[%H:%M ]&amp;%[%a %d]&gt;&amp;%[%b %d]&gt;&amp;%[%m/%y ]&gt;
 +</screen>
 +
 +                      <para>
 +                              Reparsed a little, for clarity, you can see the
 +                              test conditions and the four format strings.
 +                      </para>
 +
 +<screen>
 +%&lt;[y?                                       &amp;%[%m/%y ]&gt;  Older
 +     %&lt;[m?                        &amp;%[%b %d]&gt;             This year
 +          %&lt;[d?         &amp;%[%a %d]&gt;                       This month
 +               %[%H:%M ]                                 Today
 +</screen>
 +
 +                      <para>
 +                      This a another view of the same example, with some whitespace
 +                      for clarity.
 +                      </para>
 +
 +<screen>
 +%&lt;[y? %&lt;[m? %&lt;[d? AAA &amp; BBB &gt; &amp; CCC &gt; &amp; DDD &gt;
 +</screen>
 +
 +                      <literallayout>
 +AAA = %[%H:%M ]
 +BBB = %[%a %d]
 +CCC = %[%b %d]
 +DDD = %[%m/%y ]
 +                      </literallayout>
 +              </sect3>
 +      </sect2>
 +
 +      <sect2 id="cond-date-variables">
 +              <title>Variables</title>
 +
 +        <para>
 +              The <quote>cond-date</quote> patch doesn't have any config of its own.
 +              It modifies the behavior of the format strings.
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="cond-date-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="cond-date-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="cond-date-colors">
 +              <title>Colors</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="cond-date-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="cond-date-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'index-color' feature.
 +#
 +# The default index_format is:
 +#       '%4C %Z %{%b %d} %-15.15L (%?l?%4l&amp;%4c?) %s'
 +#
 +# We replace the date field '%{%b %d}', giving:</emphasis>
 +set index_format='%4C %Z %&lt;[y?%&lt;[m?%&lt;[d?%[%H:%M ]&amp;%[%a %d]&gt;&amp;%[%b %d]&gt;&amp;%[%m/%y ]&gt; %-15.15L (%?l?%4l&amp;%4c?) %s'
 + 
 +<emphasis role="comment"># Test  Date Range  Format String  Example
 +# --------------------------------------------
 +# %[d   Today       %[%H:%M ]      12:34
 +# %[m   This month  %[%a %d]       Thu 12
 +# %[y   This year   %[%b %d]       Dec 10
 +# -     Older       %[%m/%y ]      06/15
 + 
 +# vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="cond-date-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="index-format">$index_format</link></para></listitem>
 +                      <listitem><para><link linkend="nested-if">nested-if patch</link></para></listitem>
 +                      <listitem><para><literal>strftime(3)</literal></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="cond-date-known-bugs">
 +              <title>Known Bugs</title>
 +
 +              <para>
 +                      Date parsing doesn't quite do what you expect.
 +                      <quote>1w</quote> doesn't mean the <quote>in the last 7 days</quote>, but
 +                      <quote><emphasis>this</emphasis> week</quote>.  This doesn't match
 +                      the normal Mutt behaviour: for example <literal>~d>1w</literal>
 +                      means emails dated in the last 7 days.
 +              </para>
 +
 +      </sect2>
 +
 +      <sect2 id="cond-date-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Aaron Schrab <email>aaron@schrab.com</email></para></listitem>
 +              <listitem><para>Eric Davis <email>edavis@insanum.com</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
 +<sect1 id="tls-sni">
 +      <title>TLS-SNI Patch</title>
 +      <subtitle>Negotiate with a server for a TSL/SSL certificate</subtitle>
 +
 +      <sect2 id="tls-sni-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>TLS-SNI</quote>, look for
 +                      <quote>patch-tls-sni</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>OpenSSL</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="tls-sni-intro">
 +              <title>Introduction</title>
 +
 +              <para>
 +              The <quote>TLS-SNI</quote> patch adds support for TLS virtual hosting.
 +              If your mail server doesn't support this everything will still work
 +              normally.
 +              </para>
 +
 +              <para>
 +              TLS supports sending the expected server hostname during the
 +              handshake, via the SNI extension.  This can be used to select a
 +              server certificate to issue to the client, permitting
 +              virtual-hosting without requiring multiple IP addresses.
 +              </para>
 +
 +              <para>
 +              This has been tested against Exim 4.80, which optionally logs SNI
 +              and can perform vhosting.
 +              </para>
 +
 +        <para>
 +              To verify TLS SNI support by a server, you can use:
 +        </para>
 +
 +<screen>
 +openssl s_client -host &lt;imap server&gt; -port &lt;port&gt; -tls1 -servername &lt;imap server&gt;
 +</screen>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="tls-sni-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-colors">
 +              <title>Colors</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="tls-sni-muttrc">
 +              <title>Muttrc</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="tls-sni-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Jeremy Katz <email>katzj@linuxpower.org</email></para></listitem>
 +              <listitem><para>Phil Pennock <email>mutt-dev@spodhuis.demon.nl</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
+ <sect1 id="sidebar">
+       <title>Sidebar Patch</title>
+       <subtitle>Overview of mailboxes</subtitle>
+       <sect2 id="sidebar-patch">
+               <title>Patch</title>
+               <para>
+                       To check if Mutt supports <quote>Sidebar</quote>, look for
+                       <quote>+USE_SIDEBAR</quote> in the mutt version.
+                       See: <xref linkend="compile-time-features"/>.
+               </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="sidebar-intro">
+               <title>Introduction</title>
+               <para>
+                       The Sidebar shows a list of all your mailboxes.  The list can be
+                       turned on and off, it can be themed and the list style can be
+                       configured.
+               </para>
+               <para>
+                       This part of the manual is a reference guide.
+                       If you want a simple introduction with examples see the
+                       <link linkend="intro-sidebar">Sidebar Howto</link>.
+                       If you just want to get started, you could use the sample
+                       <link linkend="sidebar-muttrc">Sidebar muttrc</link>.
+               </para>
+               <para>
+                       This version of Sidebar is based on Terry Chan's
+                       <ulink url="http://www.lunar-linux.org/mutt-sidebar/">2015-11-11 release</ulink>.
+                       It contains many
+                       <emphasis role="bold"><link linkend="intro-sidebar-features">new features</link></emphasis>,
+                       lots of
+                       <emphasis role="bold"><link linkend="intro-sidebar-bugfixes">bugfixes</link></emphasis>.
+               </para>
+       </sect2>
+       <sect2 id="sidebar-variables">
+               <title>Variables</title>
+               <table id="table-sidebar-variables">
+                       <title>Sidebar Variables</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Name</entry>
+                                               <entry>Type</entry>
+                                               <entry>Default</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry><literal>sidebar_delim_chars</literal></entry>
+                                               <entry>string</entry>
+                                               <entry><literal>/.</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_divider_char</literal></entry>
+                                               <entry>string</entry>
+                                               <entry><literal>|</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_folder_indent</literal></entry>
+                                               <entry>boolean</entry>
+                                               <entry><literal>no</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_format</literal></entry>
+                                               <entry>string</entry>
+                                               <entry><literal>%B%?F? [%F]?%* %?N?%N/?%S</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_indent_string</literal></entry>
+                                               <entry>string</entry>
+                                               <entry><literal>&nbsp;&nbsp;</literal> (two spaces)</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_new_mail_only</literal></entry>
+                                               <entry>boolean</entry>
+                                               <entry><literal>no</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_next_new_wrap</literal></entry>
+                                               <entry>boolean</entry>
+                                               <entry><literal>no</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_refresh_time</literal></entry>
+                                               <entry>number</entry>
+                                               <entry><literal>60</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_short_path</literal></entry>
+                                               <entry>boolean</entry>
+                                               <entry><literal>no</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_sort_method</literal></entry>
+                                               <entry>enum</entry>
+                                               <entry><literal>SORT_ORDER</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_visible</literal></entry>
+                                               <entry>boolean</entry>
+                                               <entry><literal>no</literal></entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_whitelist</literal></entry>
+                                               <entry>list</entry>
+                                               <entry>(empty)</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_width</literal></entry>
+                                               <entry>number</entry>
+                                               <entry><literal>20</literal></entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </sect2>
+       <sect2 id="sidebar-functions">
+               <title>Functions</title>
+               <para>
+                       Sidebar adds the following functions to Mutt.
+                       By default, none of them are bound to keys.
+               </para>
+               <table id="table-sidebar-functions">
+                       <title>Sidebar Functions</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Menus</entry>
+                                               <entry>Function</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-next&gt;</literal></entry>
+                                               <entry>Move the highlight to next mailbox</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-next-new&gt;</literal></entry>
+                                               <entry>Move the highlight to next mailbox with new mail</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-open&gt;</literal></entry>
+                                               <entry>Open highlighted mailbox</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-page-down&gt;</literal></entry>
+                                               <entry>Scroll the Sidebar down 1 page</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-page-up&gt;</literal></entry>
+                                               <entry>Scroll the Sidebar up 1 page</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-prev&gt;</literal></entry>
+                                               <entry>Move the highlight to previous mailbox</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-prev-new&gt;</literal></entry>
+                                               <entry>Move the highlight to previous mailbox with new mail</entry>
+                                       </row>
+                                       <row>
+                                               <entry>index,pager</entry>
+                                               <entry><literal>&lt;sidebar-toggle-visible&gt;</literal></entry>
+                                               <entry>Make the Sidebar (in)visible</entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </sect2>
+       <sect2 id="sidebar-commands">
+               <title>Commands</title>
+               <cmdsynopsis>
+                       <command>sidebar_whitelist</command>
+                       <arg choice="plain">
+                               <replaceable class="parameter">mailbox</replaceable>
+                       </arg>
+                       <arg choice="opt" rep="repeat">
+                               <replaceable class="parameter">mailbox</replaceable>
+                       </arg>
+               </cmdsynopsis>
+       </sect2>
+       <sect2 id="sidebar-colors">
+               <title>Colors</title>
+               <table id="table-sidebar-colors">
+                       <title>Sidebar Colors</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Name</entry>
+                                               <entry>Default Color</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry><literal>sidebar_divider</literal></entry>
+                                               <entry>default</entry>
+                                               <entry>The dividing line between the Sidebar and the Index/Pager panels</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_flagged</literal></entry>
+                                               <entry>default</entry>
+                                               <entry>Mailboxes containing flagged mail</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_highlight</literal></entry>
+                                               <entry>underline</entry>
+                                               <entry>Cursor to select a mailbox</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_indicator</literal></entry>
+                                               <entry>mutt <literal>indicator</literal></entry>
+                                               <entry>The mailbox open in the Index panel</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_new</literal></entry>
+                                               <entry>default</entry>
+                                               <entry>Mailboxes containing new mail</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>sidebar_spoolfile</literal></entry>
+                                               <entry>default</entry>
+                                               <entry>Mailbox that receives incoming mail</entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+               If the <literal>sidebar_indicator</literal> color isn't set, then the default Mutt
+               indicator color will be used (the color used in the index panel).
+       </sect2>
+       <sect2 id="sidebar-sort">
+               <title>Sort</title>
+               <table id="table-sidebar-sort">
+                       <title>Sidebar Sort</title>
+                       <tgroup cols="2">
+                               <thead>
+                                       <row>
+                                               <entry>Sort</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry><literal>alpha</literal></entry>
+                                               <entry>Alphabetically by path</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>count</literal></entry>
+                                               <entry>Total number of messages</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>flagged</literal></entry>
+                                               <entry>Number of flagged messages</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>name</literal></entry>
+                                               <entry>Alphabetically by path</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>new</literal></entry>
+                                               <entry>Number of new messages</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>path</literal></entry>
+                                               <entry>Alphabetically by path</entry>
+                                       </row>
+                                       <row>
+                                               <entry><literal>unsorted</literal></entry>
+                                               <entry>Do not resort the paths</entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </sect2>
+       <sect2 id="sidebar-muttrc">
+               <title>Muttrc</title>
+ <screen>
+ <emphasis role="comment"># This is a complete list of sidebar-related configuration.
+  
+ # --------------------------------------------------------------------------
+ # VARIABLES - shown with their default values
+ # --------------------------------------------------------------------------
+  
+ # Should the Sidebar be shown?</emphasis>
+ set sidebar_visible = no
+  
+ <emphasis role="comment"># How wide should the Sidebar be in screen columns?
+ # Note: Some characters, e.g. Chinese, take up two columns each.</emphasis>
+ set sidebar_width = 20
+  
+ <emphasis role="comment"># Should the mailbox paths be abbreviated?</emphasis>
+ set sidebar_short_path = no
+  
+ <emphasis role="comment"># When abbreviating mailbox path names, use any of these characters as path
+ # separators.  Only the part after the last separators will be shown.
+ # For file folders '/' is good.  For IMAP folders, often '.' is useful.</emphasis>
+ set sidebar_delim_chars = '/.'
+  
+ <emphasis role="comment"># If the mailbox path is abbreviated, should it be indented?</emphasis>
+ set sidebar_folder_indent = no
+  
+ <emphasis role="comment"># Indent mailbox paths with this string.</emphasis>
+ set sidebar_indent_string = '  '
+  
+ <emphasis role="comment"># Make the Sidebar only display mailboxes that contain new, or flagged,
+ # mail.</emphasis>
+ set sidebar_new_mail_only = no
+  
+ <emphasis role="comment"># Any mailboxes that are whitelisted will always be visible, even if the
+ # sidebar_new_mail_only option is enabled.</emphasis>
+ sidebar_whitelist '/home/user/mailbox1'
+ sidebar_whitelist '/home/user/mailbox2'
+  
+ <emphasis role="comment"># When searching for mailboxes containing new mail, should the search wrap
+ # around when it reaches the end of the list?</emphasis>
+ set sidebar_next_new_wrap = no
+  
+ <emphasis role="comment"># The character to use as the divider between the Sidebar and the other Mutt
+ # panels.
+ # Note: Only the first character of this string is used.</emphasis>
+ set sidebar_divider_char = '|'
+  
+ <emphasis role="comment"># Display the Sidebar mailboxes using this format string.</emphasis>
+ set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
+  
+ <emphasis role="comment"># Sidebar will not refresh its list of mailboxes any more frequently than
+ # this number of seconds.  This will help reduce disk/network traffic.</emphasis>
+ set sidebar_refresh_time = 60
+  
+ <emphasis role="comment"># Sort the mailboxes in the Sidebar using this method:
+ #       count    - total number of messages
+ #       flagged  - number of flagged messages
+ #       new      - number of new messages
+ #       path     - mailbox path
+ #       unsorted - do not sort the mailboxes</emphasis>
+ set sidebar_sort_method = 'unsorted'
+  
+ <emphasis role="comment"># --------------------------------------------------------------------------
+ # FUNCTIONS - shown with an example mapping
+ # --------------------------------------------------------------------------
+  
+ # Move the highlight to the previous mailbox</emphasis>
+ bind index,pager \Cp sidebar-prev
+  
+ <emphasis role="comment"># Move the highlight to the next mailbox</emphasis>
+ bind index,pager \Cn sidebar-next
+  
+ <emphasis role="comment"># Open the highlighted mailbox</emphasis>
+ bind index,pager \Co sidebar-open
+  
+ <emphasis role="comment"># Move the highlight to the previous page
+ # This is useful if you have a LOT of mailboxes.</emphasis>
+ bind index,pager &lt;F3&gt; sidebar-page-up
+  
+ <emphasis role="comment"># Move the highlight to the next page
+ # This is useful if you have a LOT of mailboxes.</emphasis>
+ bind index,pager &lt;F4&gt; sidebar-page-down
+  
+ <emphasis role="comment"># Move the highlight to the previous mailbox containing new, or flagged,
+ # mail.</emphasis>
+ bind index,pager &lt;F5&gt; sidebar-prev-new
+  
+ <emphasis role="comment"># Move the highlight to the next mailbox containing new, or flagged, mail.</emphasis>
+ bind index,pager &lt;F6&gt; sidebar-next-new
+  
+ <emphasis role="comment"># Toggle the visibility of the Sidebar.</emphasis>
+ bind index,pager B sidebar-toggle-visible
+  
+ <emphasis role="comment"># --------------------------------------------------------------------------
+ # COLORS - some unpleasant examples are given
+ # --------------------------------------------------------------------------
+ # Note: All color operations are of the form:
+ #       color OBJECT FOREGROUND BACKGROUND
+  
+ # Color of the current, open, mailbox
+ # Note: This is a general Mutt option which colors all selected items.</emphasis>
+ color indicator cyan black
+  
+ <emphasis role="comment"># Color of the highlighted, but not open, mailbox.</emphasis>
+ color sidebar_highlight black color8
+  
+ <emphasis role="comment"># Color of the divider separating the Sidebar from Mutt panels</emphasis>
+ color sidebar_divider color8 black
+  
+ <emphasis role="comment"># Color to give mailboxes containing flagged mail</emphasis>
+ color sidebar_flagged red black
+  
+ <emphasis role="comment"># Color to give mailboxes containing new mail</emphasis>
+ color sidebar_new green black
+  
+ <emphasis role="comment"># --------------------------------------------------------------------------
+  
+ # vim: syntax=muttrc</emphasis>
+ </screen>
+       </sect2>
+       <sect2 id="sidebar-see-also">
+               <title>See Also</title>
+               <itemizedlist>
+                       <listitem><para><link linkend="regexp">Regular Expressions</link></para></listitem>
+                       <listitem><para><link linkend="patterns">Patterns</link></para></listitem>
+                       <listitem><para><link linkend="color">Color command</link></para></listitem>
+                       <listitem><para><link linkend="notmuch">notmuch patch</link></para></listitem>
+               </itemizedlist>
+       </sect2>
+       <sect2 id="sidebar-known-bugs">
+               <title>Known Bugs</title>
+               Unsorted isn't
+       </sect2>
+       <sect2 id="sidebar-credits">
+               <title>Credits</title>
+               <itemizedlist>
+               <listitem><para>Justin Hibbits <email>jrh29@po.cwru.edu</email></para></listitem>
+               <listitem><para>Thomer M. Gil <email>mutt@thomer.com</email></para></listitem>
+               <listitem><para>David Sterba <email>dsterba@suse.cz</email></para></listitem>
+               <listitem><para>Evgeni Golov <email>evgeni@debian.org</email></para></listitem>
+               <listitem><para>Fabian Groffen <email>grobian@gentoo.org</email></para></listitem>
+               <listitem><para>Jason DeTiberus <email>jdetiber@redhat.com</email></para></listitem>
+               <listitem><para>Stefan Assmann <email>sassmann@kpanic.de</email></para></listitem>
+               <listitem><para>Steve Kemp <email>steve@steve.org.uk</email></para></listitem>
+               <listitem><para>Terry Chan <email>tchan@lunar-linux.org</email></para></listitem>
+               <listitem><para>Tyler Earnest <email>tylere@rne.st</email></para></listitem>
+               <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
+               </itemizedlist>
+       </sect2>
+ </sect1>
  </chapter>
  
  <chapter id="security">
diff --cc functions.h
index 23af099140c7432684fc6dccf2ae0514221d01d5,9d7850c6ba04d2cc99b0bdf71248f3b7032a0014..d47771fb36ada2b1bf3d905bc956c81acbc1aa2e
@@@ -167,8 -167,17 +167,18 @@@ const struct binding_t OpMain[] = { /* 
    { "mail-key",                       OP_MAIL_KEY,                    "\033k" },
    { "decrypt-copy",           OP_DECRYPT_COPY,                NULL },
    { "decrypt-save",           OP_DECRYPT_SAVE,                NULL },
 +  { "quasi-delete",           OP_MAIN_QUASI_DELETE,           NULL },
  
+ #ifdef USE_SIDEBAR
+   { "sidebar-next",           OP_SIDEBAR_NEXT,                NULL },
+   { "sidebar-next-new",               OP_SIDEBAR_NEXT_NEW,            NULL },
+   { "sidebar-open",           OP_SIDEBAR_OPEN,                NULL },
+   { "sidebar-page-down",      OP_SIDEBAR_PAGE_DOWN,           NULL },
+   { "sidebar-page-up",                OP_SIDEBAR_PAGE_UP,             NULL },
+   { "sidebar-prev",           OP_SIDEBAR_PREV,                NULL },
+   { "sidebar-prev-new",               OP_SIDEBAR_PREV_NEW,            NULL },
+   { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE,      NULL },
+ #endif
  
    { NULL,                     0,                              NULL }
  };
@@@ -272,8 -281,18 +282,19 @@@ const struct binding_t OpPager[] = { /
    { "decrypt-save",           OP_DECRYPT_SAVE,                NULL },
  
    { "what-key",               OP_WHAT_KEY,            NULL },
 +  { "quasi-delete",   OP_MAIN_QUASI_DELETE,           NULL },
  
+ #ifdef USE_SIDEBAR
+   { "sidebar-next",           OP_SIDEBAR_NEXT,                NULL },
+   { "sidebar-next-new",               OP_SIDEBAR_NEXT_NEW,            NULL },
+   { "sidebar-open",           OP_SIDEBAR_OPEN,                NULL },
+   { "sidebar-page-down",      OP_SIDEBAR_PAGE_DOWN,           NULL },
+   { "sidebar-page-up",                OP_SIDEBAR_PAGE_UP,             NULL },
+   { "sidebar-prev",           OP_SIDEBAR_PREV,                NULL },
+   { "sidebar-prev-new",               OP_SIDEBAR_PREV_NEW,            NULL },
+   { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE,      NULL },
+ #endif
    { NULL,             0,                              NULL }
  };
  
diff --cc globals.h
Simple merge
diff --cc init.c
Simple merge
diff --cc init.h
Simple merge
diff --cc main.c
Simple merge
diff --cc menu.c
index 411b4bef5a182d09681113777d0e44d8d43873b9,72a870d03f6311883bc73b85ae1c788ca57cb126..7508e232f90bdfdd290987314b4856608457b2db
--- 1/menu.c
--- 2/menu.c
+++ b/menu.c
@@@ -349,8 -311,8 +359,8 @@@ void menu_redraw_motion (MUTTMENU *menu
      {
        menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
        menu_pad_string (buf, sizeof (buf));
-       move (menu->oldcurrent + menu->offset - menu->top, 3);
+       move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3);
 -      print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
 +      print_enriched_string (menu->oldcurrent, menu->color (menu->oldcurrent), (unsigned char *) buf, 1);
      }
  
      /* now draw it in the new location */
      menu_make_entry (buf, sizeof (buf), menu, menu->current);
      menu_pad_string (buf, sizeof (buf));
      SETCOLOR(MT_COLOR_INDICATOR);
-     move(menu->current - menu->top + menu->offset, 0);
 -    move(menu->current - menu->top + menu->offset, SidebarWidth);
 -    print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
++    move (menu->current - menu->top + menu->offset, SidebarWidth);
 +    print_enriched_string (menu->current, menu->color (menu->current), (unsigned char *) buf, 0);
    }
    menu->redraw &= REDRAW_STATUS;
    NORMAL_COLOR;
diff --cc mh.c
Simple merge
diff --cc mutt.h
Simple merge
diff --cc mutt_curses.h
index 91e63433559014820086bd4bf818fffc23512807,3f44b9d2126a971bb4991462fa00b2424d8c7ce2..18de337c830c0265e3509b9cec51bb3be28e6d72
@@@ -119,19 -122,16 +122,27 @@@ enu
    MT_COLOR_SEARCH,
    MT_COLOR_BOLD,
    MT_COLOR_UNDERLINE,
 -  MT_COLOR_INDEX,
    MT_COLOR_PROMPT,
 +  MT_COLOR_PROGRESS,
+ #ifdef USE_SIDEBAR
+   MT_COLOR_DIVIDER,
+   MT_COLOR_FLAGGED,
+   MT_COLOR_HIGHLIGHT,
+   MT_COLOR_NEW,
+   MT_COLOR_SB_INDICATOR,
+   MT_COLOR_SB_SPOOLFILE,
+ #endif
 +  /* 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
  };
  
diff --cc muttlib.c
Simple merge
diff --cc mx.c
Simple merge
diff --cc pager.c
index 882d94dc966bd7623f946d0571c165456491e515,8bc51377c2d902368acbdbe21a4b56233c7dbed6..c5fc44d8a933e755a291270e021cc79779a18efc
+++ b/pager.c
@@@ -1803,14 -1832,18 +1832,18 @@@ mutt_pager (const char *banner, const c
        size_t l2 = sizeof (buffer);
        hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr;
        mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
-       mutt_draw_statusline (COLS, buffer);
 -      mutt_paddstr (statuswidth, buffer);
++      mutt_draw_statusline (statuswidth, buffer);
        }
        else
        {
        char bn[STRING];
        snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str);
-       mutt_draw_statusline (COLS, bn);
 -      mutt_paddstr (statuswidth, bn);
++      mutt_draw_statusline (statuswidth, bn);
        }
+ #ifdef USE_SIDEBAR
+       if (!option (OPTSTATUSONTOP) || PagerIndexLines == 0)
+         SidebarWidth = sw; /* Restore the sidebar width */
+ #endif
        NORMAL_COLOR;
        if (option(OPTTSENABLED) && TSSupported)
        {
diff --cc sort.h
index 5f66f79ea1004c2bbe0cf2854e3ab53799e5b067,f24491b95ef8d6f9c2a3f3e15be69e54cbbaebd1..207da870fe4797ea0e4a4bb7906bf6ea1ec66c9a
--- 1/sort.h
--- 2/sort.h
+++ b/sort.h
  #define SORT_KEYID    12
  #define SORT_TRUST    13
  #define SORT_SPAM     14
 -#define SORT_COUNT    15
 -#define SORT_COUNT_NEW        16
 -#define SORT_DESC     17
 +#define SORT_DESC     15
 +#define SORT_COUNT    16
 +#define SORT_COUNT_NEW        17
+ #define SORT_FLAGGED  18
+ #define SORT_PATH     19
  /* dgc: Sort & SortAux are shorts, so I'm bumping these bitflags up from
   * bits 4 & 5 to bits 8 & 9 to make room for more sort keys in the future. */
  #define SORT_MASK     0xff