Nico Golde:
[apps/madmutt.git] / doc / manual.sgml.head
index 556cff8..33fb23e 100644 (file)
 
 <sect>Introduction
 <p>
-<bf/Mutt/ is a small but very powerful text-based MIME mail client.  Mutt is
+<bf/Mutt-ng/ is a small but very powerful text-based MIME mail client.  Mutt-ng is
 highly configurable, and is well suited to the mail power user with advanced
 features like key bindings, keyboard macros, mail threading, regular
 expression searches and a powerful pattern matching language for selecting
 groups of messages.
 
-<sect1>Mutt Home Page
+<p>This documentation additionaly contains documentation to <bf/Mutt-NG/, a 
+fork from Mutt with the goal to fix all the little annoyances of Mutt, to
+integrate all the Mutt patches that are floating around in the web, and to
+add other new features. Features specific to Mutt-ng will be discussed in
+an extra section. Don't be confused when most of the documentation talk about
+Mutt and not Mutt-ng, Mutt-ng contains all Mutt-ng features, plus many more.
+
+
+<sect1>Mutt-ng Home Page
 <p>
-<htmlurl url="http://www.mutt.org/"
-name="http://www.mutt.org/">
+<htmlurl url="http://www.muttng.org/"
+name="http://www.muttng.org">
 
 <sect1>Mailing Lists
 <p>
-To subscribe to one of the following mailing lists, send a message with the
-word <em/subscribe/ in the body to
-<tt/list-name/<em/-request/<tt/@mutt.org/.
 
 <itemize>
-<item><htmlurl url="mailto:mutt-announce-request@mutt.org"
-name="mutt-announce@mutt.org"> -- low traffic list for announcements
-<item><htmlurl url="mailto:mutt-users-request@mutt.org"
-name="mutt-users@mutt.org"> -- help, bug reports and feature requests
-<item><htmlurl url="mailto:mutt-dev-request@mutt.org" name="mutt-dev@mutt.org"> -- development mailing list
+<item><htmlurl url="https://lists.berlios.de/mailman/listinfo/mutt-ng-users"
+name="mutt-ng-users@lists.berlios.de"> -- This is where the mutt-ng user support happens.
+<item><htmlurl url="https://lists.berlios.de/mailman/listinfo/mutt-ng-devel" name="mutt-ng-devel@lists.berlios.de"> -- The development mailing list for mutt-ng
 </itemize>
 
-<bf/Note:/ all messages posted to <em/mutt-announce/ are automatically
-forwarded to <em/mutt-users/, so you do not need to be subscribed to both
-lists.
-
 <sect1>Software Distribution Sites
 <p>
+So far, there are no official releases of Mutt-ng, but you can download
+daily snapshots from <htmlurl url="http://mutt-ng.berlios.de/snapshots/" name="http://mutt-ng.berlios.de/snapshots/">
+<!-- 
 <itemize>
 <item><htmlurl url="ftp://ftp.mutt.org/mutt/"
 name="ftp://ftp.mutt.org/mutt/">
@@ -52,16 +54,22 @@ name="ftp://ftp.mutt.org/mutt/">
 For a list of mirror sites, please refer to <htmlurl
 url="http://www.mutt.org/download.html"
 name="http://www.mutt.org/download.html">.
+-->
+
 
 <sect1>IRC
 <p>
-Visit channel <em/#mutt/ on <htmlurl
-url="http://www.openprojects.net" name="OpenProjects.Net
-(www.openprojects.net)"> to chat with other people interested in Mutt.
+Visit channel <em/#muttng/ on <htmlurl
+url="http://www.freenode.net/" name="irc.freenode.net
+(www.freenode.net)"> to chat with other people interested in Mutt-ng.
+
 
-<sect1>USENET
+<sect1>Weblog
 <p>
-See the newsgroup <htmlurl url="news:comp.mail.mutt" name="comp.mail.mutt">.
+If you want to read fresh news about the latest development in Mutt-ng, and get informed
+about stuff like interesting, Mutt-ng-related articles and packages for your favorite
+distribution, you can read and/or subscribe to our 
+<htmlurl url="http://mutt-ng.supersized.org/" name="Mutt-ng development weblog">.
 
 <sect1>Copyright
 <p>
@@ -411,7 +419,7 @@ you misspelled the passphrase.
 <p><bf/list-reply/<label id="list-reply"> (default: L)<newline>
 
 Reply to the current or tagged message(s) by extracting any addresses which
-match the addresses given by the <ref id="lists" name="lists or subscribe">
+match the regular expressions given by the <ref id="lists" name="lists or subscribe">
 commands, but also honor any <tt/Mail-Followup-To/ header(s) if the
 <ref id="honor_followup_to" name="&dollar;honor&lowbar;followup&lowbar;to">
 configuration variable is set.  Using this when replying to messages posted
@@ -568,7 +576,7 @@ Also see <ref id="edit_headers" name="edit&lowbar;headers">.
 <p>
 If you want to use PGP, you can specify 
 
-<tt/Pgp:/ &lsqb; <tt/E/ | <tt/S/ | <tt/S&lt;id/&gt; &rsqb; <newline>
+<tt/Pgp:/ &lsqb; <tt/E/ | <tt/S/ | <tt/S/<em/&lt;id&gt;/ &rsqb; <newline>
 
 ``E'' encrypts, ``S'' signs and
 ``S&lt;id&gt;'' signs with the given key, setting <ref
@@ -736,20 +744,20 @@ newsgroup entered instead loading from newsserver.
 <sect>Configuration
 <p>
 
-While the default configuration (or ``preferences'') make Mutt
-usable right out of the box, it is often desirable to tailor Mutt to
-suit your own tastes. When Mutt is first invoked, it will attempt to
-read the ``system'' configuration file (defaults set by your local
-system administrator), unless the ``-n'' <ref id="commandline"
-name="command line"> option is specified.  This file is typically
-<tt>/usr/local/share/mutt/Muttrc</tt> or <tt>/etc/Muttrc</tt>. Mutt
-will next look for a file named <tt>.muttrc</tt> in your home
-directory.  If this file does not exist and your home directory has
-a subdirectory named <tt/.mutt/, mutt try to load a file named
-<tt>.mutt/muttrc</tt>. 
+While the default configuration (or ``preferences'') make Mutt-ng usable right out
+of the box, it is often desirable to tailor Mutt to suit your own tastes. When
+Mutt-ng is first invoked, it will attempt to read the ``system'' configuration
+file (defaults set by your local system administrator), unless the ``-n'' <ref
+id="commandline" name="command line"> option is specified.  This file is
+typically <tt>/usr/local/share/muttng/Muttngrc</tt> or <tt>/etc/Muttngrc</tt>,
+Mutt-ng users will find this file in <tt>/usr/local/share/muttng/Muttrc</tt> or
+<tt>/etc/Muttngrc</tt>. Mutt will next look for a file named <tt>.muttrc</tt>
+in your home directory, Mutt-ng will look for <tt>.muttngrc</tt>.  If this file
+does not exist and your home directory has a subdirectory named <tt/.mutt/,
+mutt try to load a file named <tt>.muttng/muttngrc</tt>. 
 
-<tt>.muttrc</tt> is the file where you will usually place your <ref
- id="commands" name="commands"> to configure Mutt.
+<tt>.muttrc</tt> (or <tt>.muttngrc</tt> for Mutt-ng) is the file where you will
+usually place your <ref id="commands" name="commands"> to configure Mutt.
 
 In addition, mutt supports version specific configuration files that are
 parsed instead of the default files as explained above.  For instance, if
@@ -806,6 +814,36 @@ A &bsol; at the end of a line can be used to split commands over
 multiple lines, provided that the split points don't appear in the
 middle of command names.
 
+Please note that, unlike the various shells, mutt-ng interpretes a ``&bsol;''
+at the end of a line also in comments. This allows you to disable a command
+split over multiple lines with only one ``&num;''.
+
+<tscreen><verb>
+# folder-hook . \
+  set realname="Michael \"MuttDude\" Elkins"
+</tscreen></verb>
+
+When testing your config files, beware the following caveat. The backslash
+at the end of the commented line extends the current line with the next line
+- then referred to as a ``continuation line''.  As the first line is
+commented with a hash (&num;) all following continuation lines are also
+part of a comment and therefore are ignored, too. So take care of comments
+when continuation lines are involved within your setup files!
+
+Abstract example:
+<tscreen><verb>
+line1\
+line2a # line2b\
+line3\
+line4
+line5
+</tscreen></verb>
+
+line1 ``continues'' until line4. however, the part after the &num; is a
+comment which includes line3 and line4. line5 is a new line of its own and
+thus is interpreted again.
+
 It is also possible to substitute the output of a Unix command in an
 initialization file.  This is accomplished by enclosing the command in
 backquotes (``).  For example,
@@ -892,9 +930,11 @@ Usage: <tt/bind/ <em/map/ <em/key/ <em/function/
 This command allows you to change the default key bindings (operation
 invoked when pressing a key).
 
-<em/map/ specifies in which menu the binding belongs.  The currently
-defined maps are:
+<em/map/ specifies in which menu the binding belongs.  Multiple maps may
+be specified by separating them with commas (no additional whitespace is
+allowed). The currently defined maps are:
 
+<label id="maps">
 <descrip>
 <tag/generic/
 This is not a real menu, but is used as a fallback for all of the other
@@ -932,7 +972,7 @@ recalling a message the user was composing, but saved until later.
 control character, use the sequence <em/&bsol;Cx/, where <em/x/ is the
 letter of the control character (for example, to specify control-A use
 ``&bsol;Ca'').  Note that the case of <em/x/ as well as <em/&bsol;C/ is
-ignored, so that <em/&bsol;CA, &bsol;Ca, &bsol;cA/ and <em/&bsol;ca/ are all
+ignored, so that <em/&bsol;CA/, <em/&bsol;Ca/, <em/&bsol;cA/ and <em/&bsol;ca/ are all
 equivalent.  An alternative form is to specify the key as a three digit
 octal number prefixed with a ``&bsol;'' (for example <em/&bsol;177/ is
 equivalent to <em/&bsol;c?/).
@@ -1030,6 +1070,11 @@ you had typed <em/sequence/.  So if you have a common sequence of commands
 you type, you can create a macro to execute those commands with a single
 key.
 
+<em/menu/ is the <ref id="maps" name="map"> which the macro will be bound.
+Multiple maps may be specified by separating multiple menu arguments by
+commas. Whitespace may not be used in between the menu arguments and the
+commas separating them.
+
 <em/key/ and <em/sequence/ are expanded by the same rules as the <ref
 id="bind" name="key bindings">.  There are some additions however.  The
 first is that control characters in <em/sequence/ can also be specified
@@ -1186,7 +1231,7 @@ someone else.  For instance, when replying to a message that you
 sent to a different party, mutt will automatically suggest to send
 the response to the original message's recipients -- responding to
 yourself won't make much sense in many cases.  (See <ref
-id="reply_to" name="&dollar;reply_to">.)
+id="reply_to" name="&dollar;reply&lowbar;to">.)
 
 Many users receive e-mail under a number of different addresses. To
 fully use mutt's features here, the program must be able to
@@ -1195,8 +1240,18 @@ purpose of the <tt/alternates/ command: It takes a list of regular
 expressions, each of which can identify an address under which you
 receive e-mail.
 
-To remove a regular expression from this list, use the
-<tt/unalternates/ command.
+The <tt/unalternates/ command can be used to write exceptions to
+<tt/alternates/ patterns. If an address matches something in an
+<tt/alternates/ command, but you nonetheless do not think it is
+from you, you can list a more precise pattern under an <tt/unalternates/
+command.
+
+To remove a regular expression from the <tt/alternates/ list, use the
+<tt/unalternates/ command with exactly the same <em/regexp/.
+Likewise, if the <em/regexp/ for a <tt/alternates/ command matches
+an entry on the <tt/unalternates/ list, that <tt/unalternates/
+entry will be removed. If the <em/regexp/ for <tt/unalternates/
+is ``*'', <em/all entries/ on <tt/alternates/ will be removed.
 
 <sect1>Mailing lists<label id="lists">
 <p>
@@ -1215,7 +1270,7 @@ the Mail-Followup-To header is a non-standard extension which is not
 supported by all mail user agents.  Adding it is not bullet-proof against
 receiving personal CCs of list messages.  Also note that the generation
 of the Mail-Followup-To header is controlled by the <ref id="followup_to"
-name="&dollar;followup_to"> configuration variable.
+name="&dollar;followup&lowbar;to"> configuration variable.
 
 More precisely, Mutt maintains lists of patterns for the addresses
 of known and subscribed mailing lists.  Every subscribed mailing
@@ -1235,8 +1290,8 @@ mailing list, you could add ``lists mutt-users'' to your
 initialization file.  To tell mutt that you are subscribed to it,
 add ``subscribe mutt-users'' to your initialization file instead.
 If you also happen to get mail from someone whose address is
-<em/mutt-users@example.com/, you could use ``lists mutt-users@mutt.org'' 
-or ``subscribe mutt-users@mutt.org'' to
+<em/mutt-users@example.com/, you could use ``lists mutt-users@mutt&bsol;&bsol;.org'' 
+or ``subscribe mutt-users@mutt&bsol;&bsol;.org'' to
 match only mail from the actual list.
 
 The ``unlists'' command is used to remove a token from the list of
@@ -1379,7 +1434,7 @@ to <ref id="record" name="&dollar;record"> mailbox.
 
 See <ref id="pattern_hook" name="Message Matching in Hooks"> for information on the exact format of <em/pattern/.
 
-Example: <tt/fcc-hook aol.com&dollar; +spammers/
+Example: <tt/fcc-hook &lsqb;@.&rsqb;aol&bsol;&bsol;.com&dollar; +spammers/
 
 The above will save a copy of all messages going to the aol.com domain to
 the `+spammers' mailbox by default.  Also see the <ref id="fcc-save-hook" 
@@ -1393,10 +1448,11 @@ Usage: <tt/fcc-save-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
 This command is a shortcut, equivalent to doing both a <ref id="fcc-hook" name="fcc-hook">
 and a <ref id="save-hook" name="save-hook"> with its arguments.
 
-<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook">
+<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook"><label id="send2-hook">
 <p>
 Usage: <tt/reply-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
-Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
+Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
+Usage: <tt/send2-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
 
 These commands can be used to execute arbitrary configuration commands based
 upon recipients of the message.  <em/pattern/ is a regular expression
@@ -1409,7 +1465,14 @@ matched against all messages, both <em/new/ and <em/replies/.  <bf/Note:/
 <tt/reply-hook/s are matched <bf/before/ the <tt/send-hook/, <bf/regardless/
 of the order specified in the users's configuration file.
 
-For each type of <tt/send-hook/ or <tt/reply-hook/, When multiple matches
+<tt/send2-hook/ is matched every time a message is changed, either
+by editing it, or by using the compose menu to change its recipients
+or subject.  <tt/send2-hook/ is executed after <tt/send-hook/, and
+can, e.g., be used to set parameters such as the <ref id="sendmail"
+name="&dollar;sendmail"> variable depending on the message's sender
+address.
+
+For each type of <tt/send-hook/ or <tt/reply-hook/, when multiple matches
 occur, commands are executed in the order they are specified in the muttrc
 (for that type of hook).
 
@@ -1503,6 +1566,106 @@ specify the same pattern specified in the <tt/score/ command for it to be
 removed.  The pattern ``*'' is a special token which means to clear the list
 of all score entries.
 
+<sect1>Spam detection<label id="spam">
+<p>
+Usage: <tt/spam/ <em/pattern/ <em/format/<newline>
+Usage: <tt/nospam/ <em/pattern/
+
+Mutt has generalized support for external spam-scoring filters.
+By defining your spam patterns with the <tt/spam/ and <tt/nospam/
+commands, you can <em/limit/, <em/search/, and <em/sort/ your
+mail based on its spam attributes, as determined by the external
+filter. You also can display the spam attributes in your index
+display using the <tt/%H/ selector in the <ref id="index_format"
+name="&dollar;index&lowbar;format"> variable. (Tip: try <tt/%?H?[%H] ?/
+to display spam tags only when they are defined for a given message.)
+
+Your first step is to define your external filter's spam patterns using
+the <tt/spam/ command. <em/pattern/ should be a regular expression
+that matches a header in a mail message. If any message in the mailbox
+matches this regular expression, it will receive a ``spam tag'' or
+``spam attribute'' (unless it also matches a <tt/nospam/ pattern -- see
+below.) The appearance of this attribute is entirely up to you, and is
+governed by the <em/format/ parameter. <em/format/ can be any static
+text, but it also can include back-references from the <em/pattern/
+expression. (A regular expression ``back-reference'' refers to a
+sub-expression contained within parentheses.) <tt/%1/ is replaced with
+the first back-reference in the regex, <tt/%2/ with the second, etc.
+
+If you're using multiple spam filters, a message can have more than
+one spam-related header. You can define <tt/spam/ patterns for each
+filter you use. If a message matches two or more of these patterns, and
+the &dollar;spam&lowbar;separator variable is set to a string, then the
+message's spam tag will consist of all the <em/format/ strings joined
+together, with the value of &dollar;spam&lowbar;separator separating
+them.
+
+For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
+define these spam settings:
+<tscreen><verb>
+spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
+spam "X-Spam-Status: Yes"                     "90+/SA"
+spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
+set spam_separator=", "
+</verb></tscreen>
+
+If I then received a message that DCC registered with ``many'' hits
+under the ``Fuz2'' checksum, and that PureMessage registered with a
+97% probability of being spam, that message's spam tag would read
+<tt>90+/DCC-Fuz2, 97/PM</tt>. (The four characters before ``=many'' in a
+DCC report indicate the checksum used -- in this case, ``Fuz2''.)
+
+If the &dollar;spam&lowbar;separator variable is unset, then each
+spam pattern match supercedes the previous one. Instead of getting
+joined <em/format/ strings, you'll get only the last one to match.
+
+The spam tag is what will be displayed in the index when you use
+<tt/%H/ in the <tt/&dollar;index&lowbar;format/ variable. It's also the
+string that the <tt/~H/ pattern-matching expression matches against for
+<em/search/ and <em/limit/ functions. And it's what sorting by spam
+attribute will use as a sort key.
+
+That's a pretty complicated example, and most people's actual
+environments will have only one spam filter. The simpler your
+configuration, the more effective mutt can be, especially when it comes
+to sorting.
+
+Generally, when you sort by spam tag, mutt will sort <em/lexically/ --
+that is, by ordering strings alphnumerically. However, if a spam tag
+begins with a number, mutt will sort numerically first, and lexically
+only when two numbers are equal in value. (This is like UNIX's
+<tt/sort -n/.) A message with no spam attributes at all -- that is, one
+that didn't match <em/any/ of your <tt/spam/ patterns -- is sorted at
+lowest priority. Numbers are sorted next, beginning with 0 and ranging
+upward. Finally, non-numeric strings are sorted, with ``a'' taking lower
+priority than ``z''. Clearly, in general, sorting by spam tags is most
+effective when you can coerce your filter to give you a raw number. But
+in case you can't, mutt can still do something useful.
+
+The <tt/nospam/ command can be used to write exceptions to <tt/spam/
+patterns. If a header pattern matches something in a <tt/spam/ command,
+but you nonetheless do not want it to receive a spam tag, you can list a
+more precise pattern under a <tt/nospam/ command.
+
+If the <em/pattern/ given to <tt/nospam/ is exactly the same as the
+<em/pattern/ on an existing <tt/spam/ list entry, the effect will be to
+remove the entry from the spam list, instead of adding an exception.
+Likewise, if the <em/pattern/ for a <tt/spam/ command matches an entry
+on the <tt/nospam/ list, that <tt/nospam/ entry will be removed. If the
+<em/pattern/ for <tt/nospam/ is ``*'', <em/all entries on both lists/
+will be removed. This might be the default action if you use <tt/spam/
+and <tt/nospam/ in conjunction with a <tt/folder-hook/.
+
+You can have as many <tt/spam/ or <tt/nospam/ commands as you like.
+You can even do your own primitive spam detection within mutt -- for
+example, if you consider all mail from <tt/MAILER-DAEMON/ to be spam,
+you can use a <tt/spam/ command like this:
+
+<tscreen><verb>
+spam "^From: .*MAILER-DAEMON"       "999"
+</verb></tscreen>
+
+
 <sect1>Setting variables<label id="set">
 <p>
 Usage: <tt/set/ &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;<newline>
@@ -1574,7 +1737,52 @@ path of your home directory.
 
 If the filename ends with a vertical bar (|), then <em/filename/ is
 considered to be an executable program from which to read input (eg.
-<tt/source ~/bin/myscript|/).
+<tt>source ~/bin/myscript|</tt>).
+
+<sect1>Configuring features conditionaly<label id="ifdef">
+<p>
+Usage: <tt/ifdef/ <em/item/ <em/command/
+Usage: <tt/ifndef/ <em/item/ <em/command/
+
+These command allows to test if a variable, function or certain feature
+is available or not respectively, before actually executing the command.
+<tt/ifdef/ (short for ``if defined) handles commands if upon
+availability while <tt/ifndef/ (short for ``if not defined'') does if
+not. The <em/command/ may be any valid fraction of a configuration file.
+
+All names of variables and functions may be tested. Additionally, the
+following compile-features may be tested when prefixed with 'feature_':
+ncurses, slang, iconv, idn, dotlock, standalone, pop, nntp, imap, ssl,
+gnutls, sasl, sasl2, libesmtp, compressed, color, classic_pgp,
+classic_smime, gpgme, header_cache.
+
+Examples follow.
+
+To only source a file with IMAP related settings only if IMAP support is
+compiled in, use:
+<tscreen><verb>
+ifdef feature_imap 'source ~/.mutt-ng/imap_setup'
+# or
+# ifdef imap_user 'source ~/.mutt-ng/imap_setup'
+# or
+# ...
+</verb></tscreen>
+
+To exit mutt-ng directly if no NNTP support is compiled in:
+<tscreen><verb>
+ifndef feature_nntp 'push q'
+# or
+# ifndef newsrc 'push q'
+# or
+# ...
+</verb/</tscreen>
+
+To only set the <ref id="imap_mail_check"
+name="&lt;&dollar;imap&lowbar;mail&lowbar;check"> when the system's SVN
+is recent enough to have it:
+<tscreen><verb>
+ifdef imap_mail_check 'set imap_mail_check=300'
+</tscreen></verb>
 
 <sect1>Removing hooks<label id="unhook">
 <p>
@@ -1770,6 +1978,7 @@ messages:
 ~f USER         messages originating from USER
 ~g              cryptographically signed messages
 ~G              cryptographically encrypted messages
+~H EXPR         messages with a spam attribute matching EXPR
 ~h EXPR         messages which contain EXPR in the message header
 ~k             message contains PGP key material
 ~i ID           message which match ID in the ``Message-ID'' field
@@ -1795,6 +2004,10 @@ messages:
 ~y EXPR         messages which contain EXPR in the `X-Label' field
 ~z [MIN]-[MAX]  messages with a size in the range MIN to MAX *)
 ~=             duplicated messages (see $duplicate_threads)
+~$             unreferenced messages (requires threaded view)
+~*             ``From'' contains realname and (syntactically) valid
+               address (excluded are addresses matching against
+               alternates or any alias)
 </verb></tscreen>
 
 Where EXPR, USER, ID, and SUBJECT are 
@@ -1871,8 +2084,9 @@ pattern language.  For example,
 ~f "me@(mutt\.org|cs\.hmc\.edu)"
 </verb></tscreen>
 
-Without the quotes, the parenthesis would truncate the regular expression
-to simply <em/me@/, which is probably not what you want.
+Without the quotes, the parenthesis wouldn't end.
+This would be seperated to two OR'd patterns: <em/&tilde;f me@(mutt\.org/
+and <em/cs\.hmc\.edu)/. They are never what you want.
 
 <sect2>Searching by Date
 <p>
@@ -1962,6 +2176,13 @@ manner.  If the <ref id="auto_tag" name="&dollar;auto&lowbar;tag">
 variable is set, the next operation applies to the tagged messages
 automatically, without requiring the ``tag-prefix''.
 
+In <ref id="macro" name="macros"> or <ref id="push" name="push"> commands,
+you can use the ``tag-prefix-cond'' operator.  If there are no tagged
+messages, mutt will "eat" the rest of the macro to abort it's execution.
+Mutt will stop "eating" the macro when it encounters the ``end-cond''
+operator;  after this operator the rest of the macro will be executed as
+normal.
+
 <sect1>Using Hooks<label id="hooks">
 <p>
 A <em/hook/ is a concept borrowed from the EMACS editor which allows you to
@@ -1990,7 +2211,7 @@ my_hdr directive:
 
 <tscreen><verb>
 send-hook . 'unmy_hdr From:'
-send-hook ~Cb@b.b my_hdr from: c@c.c
+send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
 </verb></tscreen>
 
 <sect2>Message Matching in Hooks<label id="pattern_hook">
@@ -2026,6 +2247,59 @@ pattern is translated at the time the hook is declared, so the value of
 <ref id="default_hook" name="&dollar;default&lowbar;hook"> that is in effect
 at that time will be used.
 
+<sect1>Using the sidebar<label id="sidebar">
+<p>
+The sidebar, a feature specific to Mutt-ng, allows you to use a mailbox listing 
+which looks very similar to the ones you probably know from GUI mail clients.
+The sidebar lists all specified mailboxes, shows the number in each
+and highlights the ones with new email
+Use the following configuration commands:
+<tscreen><verb>
+set sidebar_visible="yes"
+set sidebar_width=25
+</verb></tscreen>
+
+If you want to specify the mailboxes you can do so with:
+<tscreen><verb>
+set mbox='=INBOX'
+mailboxes INBOX \
+          MBOX1 \
+          MBOX2 \
+          ...
+</verb></tscreen>
+
+You can also specify the colors for mailboxes with new mails by using:
+<tscreen><verb>
+color sidebar_new red black
+color sidebar white black
+</verb></tscreen>
+
+The available functions are:
+<tscreen><verb>
+sidebar-scroll-up      Scrolls the mailbox list up 1 page
+sidebar-scroll-down    Scrolls the mailbox list down 1 page
+sidebar-next           Hilights the next mailbox
+sidebar-next-new       Hilights the next mailbox with new mail
+sidebar-previous       Hilights the previous mailbox
+sidebar-open           Opens the currently hilighted mailbox
+</verb></tscreen>
+
+Reasonable key bindings look e.g. like this:
+<tscreen><verb>
+bind index \Cp sidebar-prev
+bind index \Cn sidebar-next
+bind index \Cb sidebar-open
+bind pager \Cp sidebar-prev
+bind pager \Cn sidebar-next
+bind pager \Cb sidebar-open
+
+macro index B ':toggle sidebar_visible^M'
+macro pager B ':toggle sidebar_visible^M'
+</verb></tscreen>
+
+You can then go up and down by pressing Ctrl-P and Ctrl-N, and 
+switch on and off the sidebar simply by pressing 'B'.
+
 <sect1>External Address Queries<label id="query">
 <p>
 Mutt supports connecting to external directory databases such as LDAP,
@@ -2056,7 +2330,7 @@ There are two mechanisms for accessing the query function of mutt.  One
 is to do a query from the index menu using the query function (default: Q).
 This will prompt for a query, then bring up the query menu which will
 list the matching responses.  From the query menu, you can select
-addresses to create aliases, or to mail.  You can tag multiple messages
+addresses to create aliases, or to mail.  You can tag multiple addresses
 to mail, start a new query, or have a new query appended to the current
 responses.
 
@@ -2117,6 +2391,7 @@ path.
 <item>! -- refers to your <ref id="spoolfile" name="&dollar;spoolfile"> (incoming) mailbox
 <item>&gt; -- refers to your <ref id="mbox" name="&dollar;mbox"> file
 <item>&lt; -- refers to your <ref id="record" name="&dollar;record"> file
+<item>^ -- refers to the current mailbox
 <item>- or !! -- refers to the file you've last visited
 <item>&tilde; -- refers to your home directory
 <item>= or + -- refers to your <ref id="folder" name="&dollar;folder"> directory
@@ -2184,10 +2459,11 @@ than the author of the message.  This can create problems when trying
 to reply directly to the author in private, since most mail clients
 will automatically reply to the address given in the ``Reply-To''
 field.  Mutt uses the <ref id="reply_to" name="&dollar;reply&lowbar;to">
-variable to help decide which address to use.  If set, you will be
+variable to help decide which address to use.  If set to <em/ask-yes/ or
+<em/ask-no/, you will be
 prompted as to whether or not you would like to use the address given in
 the ``Reply-To'' field, or reply directly to the address given in the
-``From'' field.  When unset, the ``Reply-To'' field will be used when
+``From'' field.  When set to <em/yes/, the ``Reply-To'' field will be used when
 present.
 
 The ``X-Label:'' header field can be used to further identify mailing
@@ -2208,8 +2484,40 @@ used a threaded news client, this is the same concept.  It makes dealing
 with large volume mailing lists easier because you can easily delete
 uninteresting threads and quickly find topics of value.
 
+<sect1>Editing threads
+<p>
+Mutt has the ability to dynamically restructure threads that are broken
+either by misconfigured software or bad behaviour from some
+correspondents. This allows to clean your mailboxes formats) from these
+annoyances which make it hard to follow a discussion.
+
+<sect2>Linking threads
+<p>
+
+Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
+"References:" headers when replying to a message. This results in broken
+discussions because Mutt has not enough information to guess the correct
+threading.
+You can fix this by tagging the reply, then moving to the parent message
+and using the ``link-threads'' function (bound to & by default). The
+reply will then be connected to this "parent" message.
+
+You can also connect multiple childs at once, tagging them and using the
+tag-prefix command (';') or the auto_tag option.
+
+<sect2>Breaking threads
+<p>
+
+On mailing lists, some people are in the bad habit of starting a new
+discussion by hitting "reply" to any message from the list and changing
+the subject to a totally unrelated one.
+You can fix such threads by using the ``break-thread'' function (bound
+by default to #), which will turn the subthread starting from the
+current message into a whole different thread.
+
 <sect1>Delivery Status Notification (DSN) Support
 <p>
+
 RFC1894 defines a set of MIME content types for relaying information
 about the status of electronic mail messages.  These can be thought of as
 ``return receipts.'' Berkeley sendmail 8.8.x currently has some command
@@ -2243,7 +2551,7 @@ You can also specify different username for each folder, ie:
 Polling for new mail is more expensive over POP3 than locally. For this
 reason the frequency at which Mutt will check for mail remotely can be
 controlled by the
-<ref id="pop&lowbar;checkinterval" name="&dollar;pop&lowbar;checkinterval">
+<ref id="pop_checkinterval" name="&dollar;pop&lowbar;checkinterval">
 variable, which defaults to every 60 seconds.
 
 If Mutt was compiled with SSL support (by running the <em/configure/
@@ -2300,20 +2608,15 @@ paths accordingly.
 When browsing folders on an IMAP server, you can toggle whether to look
 at only the folders you are subscribed to, or all folders with the
 <em/toggle-subscribed/ command.  See also the 
-<ref id="imap&lowbar;list&lowbar;subscribed"
+<ref id="imap_list_subscribed"
 name="&dollar;imap&lowbar;list&lowbar;subscribed"> variable.
 
 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
 want to carefully tune the
-<ref id="mail&lowbar;check" name="&dollar;mail&lowbar;check">
+<ref id="imap_mail_check" name="&dollar;imap&lowbar;mail&lowbar;check">
 and
 <ref id="timeout" name="&dollar;timeout">
-variables. Personally I use
-<tscreen><verb>
-set mail_check=90
-set timeout=15
-</verb></tscreen>
-with relatively good results over my slow modem line.
+variables.
 
 Note that if you are using mbox as the mail store on UW servers prior to
 v12.250, the server has been reported to disconnect a client if another client
@@ -2326,7 +2629,7 @@ As of version 1.2, mutt supports browsing mailboxes on an IMAP
 server. This is mostly the same as the local file browser, with the
 following differences:
 <itemize>
-<item>In lieu of file permissions, mutt displays the string "IMAP",
+<item>Instead of file permissions, mutt displays the string "IMAP",
   possibly followed by the symbol "+", indicating
   that the entry contains both messages and subfolders. On
   Cyrus-like servers folders will often contain both messages and
@@ -2336,8 +2639,10 @@ following differences:
   will choose to descend into the subfolder view. If you wish to view
   the messages in that folder, you must use <tt>view-file</tt> instead
   (bound to <tt>space</tt> by default).
-<item>You can delete mailboxes with the <tt>delete-mailbox</tt>
-  command (bound to <tt>d</tt> by default. You may also
+<item>You can create, delete and rename mailboxes with the
+  <tt>create-mailbox</tt>, <tt>delete-mailbox</tt>, and
+  <tt>rename-mailbox</tt> commands (default bindings: <tt>C</tt>,
+  <tt>d</tt> and <tt>r</tt>, respectively). You may also
   <tt>subscribe</tt> and <tt>unsubscribe</tt> to mailboxes (normally
   these are bound to <tt>s</tt> and <tt>u</tt>, respectively).
 </itemize>
@@ -2366,15 +2671,15 @@ in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
 
 There are a few variables which control authentication: 
 <itemize>
-<item><ref id="imap&lowbar;user" name="&dollar;imap&lowbar;user"> - controls
+<item><ref id="imap_user" name="&dollar;imap&lowbar;user"> - controls
   the username under which you request authentication on the IMAP server,
   for all authenticators. This is overridden by an explicit username in
   the mailbox path (ie by using a mailbox name of the form
   <tt/{user@host}/).
-<item><ref id="imap&lowbar;pass" name="&dollar;imap&lowbar;pass"> - a
+<item><ref id="imap_pass" name="&dollar;imap&lowbar;pass"> - a
   password which you may preset, used by all authentication methods where
   a password is needed.
-<item><ref id="imap&lowbar;authenticators"
+<item><ref id="imap_authenticators"
   name="&dollar;imap&lowbar;authenticators"> - a colon-delimited list of IMAP
   authentication methods to try, in the order you wish to try them. If
   specified, this overrides mutt's default (attempt everything, in the order
@@ -2401,7 +2706,7 @@ account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
 
 <sect1>Start a WWW Browser on URLs (EXTERNAL)<label id="urlview">
 <p>
-If a message contains URLs (<em/unified ressource locator/ = address in the
+If a message contains URLs (<em/unified resource locator/ = address in the
 WWW space like <em>http://www.mutt.org/</em>), it is efficient to get
 a menu with all the URLs and start a WWW browser on one of them.  This
 functionality is provided by the external urlview program which can be
@@ -3077,7 +3382,7 @@ associated with this extension will then be used to process the attachment
 according to the rules in the mailcap file and according to any other configuration
 options (such as auto&lowbar;view) specified.  Common usage would be:
 <tscreen><verb>
-mime-lookup application/octet-stream application/X-Lotus-Manuscript
+mime_lookup application/octet-stream application/X-Lotus-Manuscript
 </verb></tscreen>
 
 In addition, the unmime&lowbar;lookup command may be used to disable this feature
@@ -3187,9 +3492,9 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="ignore" name="unignore"></tt> <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
 <item>
-<tt><ref id="lists" name="lists"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="lists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
-<tt><ref id="lists" name="unlists"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="unlists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
 <tt><ref id="macro" name="macro"></tt> <em/menu/ <em/key/ <em/sequence/ &lsqb; <em/description/ &rsqb; 
 <item>
@@ -3227,15 +3532,21 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="send-hook" name="send-hook"></tt> <em/regexp/ <em/command/
 <item>
+<tt><ref id="reply-hook" name="reply-hook"></tt> <em/regexp/ <em/command/
+<item>
 <tt><ref id="set" name="set"></tt> &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;
 <item>
 <tt><ref id="set" name="unset"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
 <item>
 <tt><ref id="source" name="source"></tt> <em/filename/
 <item>
-<tt><ref id="lists" name="subscribe"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="spam" name="spam"></tt> <em/pattern/ <em/format/
+<item>
+<tt><ref id="spam" name="nospam"></tt> <em/pattern/
+<item>
+<tt><ref id="lists" name="subscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
-<tt><ref id="lists" name="unsubscribe"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="unsubscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
 <tt><ref id="set" name="toggle"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
 <item>