<link linkend="patterns">patterns</link> section (note: For efficiency
reasons, patterns which scan information not available in the index,
such as <literal>~b</literal>, <literal>~B</literal>,
- <literal>~h</literal>, or <literal>~X</literal> may not be used).
- <emphasis>value</emphasis> is a positive or negative integer.
- A message's final score is the sum total of all matching
+ <literal>~h</literal>, <literal>~M</literal>, or <literal>~X</literal>
+ may not be used). <emphasis>value</emphasis> is a positive or negative
+ integer. A message's final score is the sum total of all matching
<command>score</command> entries. However, you may optionally prefix
<emphasis>value</emphasis> with an equal sign (<quote>=</quote>) to
cause evaluation to stop at a particular entry if there is a match.
<entry>~b <emphasis>EXPR</emphasis></entry>
<entry>
messages which contain <emphasis>EXPR</emphasis> in the
- message body
+ message body ***)
</entry>
</row>
<row>
<entry>=b <emphasis>STRING</emphasis></entry>
<entry>
- messages which contain <emphasis>STRING</emphasis> in the
- message body. If IMAP is enabled, searches for
+ If IMAP is enabled, like ~b but searches for
<emphasis>STRING</emphasis> on the server, rather than
downloading each message and searching it locally.
</entry>
<row>
<entry>~B <emphasis>EXPR</emphasis></entry>
<entry>
- messages which contain <emphasis>EXPR</emphasis> in the whole
- message
+ messages which contain <emphasis>EXPR</emphasis>in the whole
+ message ***)
</entry>
</row>
<row>
<entry>=B <emphasis>STRING</emphasis></entry>
<entry>
- messages which contain <emphasis>STRING</emphasis> in the
- whole message. If IMAP is enabled, searches for
- <emphasis>STRING</emphasis> on the server, rather than
+ If IMAP is enabled, like ~B but searches for
+ <emphasis>STRING</emphasis>on the server, rather than
downloading each message and searching it locally.
</entry>
</row>
<row>
<entry>~h <emphasis>EXPR</emphasis></entry>
<entry>
- messages which contain <emphasis>EXPR</emphasis> in the
- message header
+ messages which contain <emphasis>EXPR</emphasis>in the
+ message header ***)
</entry>
</row>
<row>
<entry>=h <emphasis>STRING</emphasis></entry>
<entry>
- messages which contain <emphasis>STRING</emphasis> in the
- message header. If IMAP is enabled, searches for
- <emphasis>STRING</emphasis> on the server, rather than
- downloading each message and searching it locally;
- <emphasis>STRING</emphasis> must be of the form
- <quote>header: substring</quote> (see below).
+ If IMAP is enabled, like ~h but searches for
+ <emphasis>STRING</emphasis>on the server, rather than
+ downloading each message and searching it locally;
+ <emphasis>STRING</emphasis>must be of the form
+ <quote>header: substring</quote>(see below).
</entry>
</row>
<row>
<row>
<entry>~M <emphasis>EXPR</emphasis></entry>
<entry>
- messages which contain a mime Content-Type matching
- <emphasis>EXPR</emphasis>
+ messages which contain a mime Content-Type matching
+ <emphasis>EXPR</emphasis>****)
</entry>
</row>
<row>
</entry>
</row>
<row>
- <entry>~X [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry>
+ <entry>~X [ <emphasis>MIN</emphasis>]-[ <emphasis>MAX</emphasis>]</entry>
<entry>
- messages with <emphasis>MIN</emphasis> to
- <emphasis>MAX</emphasis> attachments *)
+ messages with <emphasis>MIN</emphasis>to
+ <emphasis>MAX</emphasis>attachments *) ****)
</entry>
</row>
<row>
are even more general and powerful than the other types of ranges.
Read on and see <xref linkend="message-ranges" /> below.
</para>
+ <para>
+ ****) These patterns read each message in, and can therefore be much
+ slower. Over IMAP this will entail downloading each message. They
+ can not be used for <link linkend="score-command">message scoring</link>,
+ and it is recommended to avoid using them for index coloring.
+ </para>
<para>
Special attention has to be paid when using regular expressions
inside of patterns. Specifically, NeoMutt's parser for these patterns
will strip one level of backslash (<quote>\</quote>), which is
normally used for quoting. If it is your intention to use a backslash
in the regular expression, you will need to use two backslashes
- instead (<quote>\\</quote>). You can force NeoMutt to treat
+ instead (<quote>\\</quote>).
+ </para>
+ <para>
+ You can force NeoMutt to treat
<emphasis>EXPR</emphasis> as a simple substring instead of a regular
expression by using = instead of ~ in the pattern name. For example,
<literal>=b *.*</literal> will find all messages that contain the
literal string <quote>*.*</quote>. Simple string matches are less
powerful than regular expressions but can be considerably faster.
- This is especially true for IMAP folders, because string matches can
- be performed on the server instead of by fetching every message. IMAP
- treats <literal>=h</literal> specially: it must be of the form
+ </para>
+ <para>
+ For IMAP folders, string matches <literal>=b</literal>,
+ <literal>=B</literal>, and <literal>=h</literal> will be performed on
+ the server instead of by fetching every message. IMAP treats
+ <literal>=h</literal> specially: it must be of the form
<quote>header: substring</quote> and will not partially match header
names. The substring part may be omitted if you simply wish to find
messages containing a particular header without regard to its value.