~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to doc/configuration.html

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-06-17 17:17:28 UTC
  • mfrom: (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20090617171728-61dkl7w5fgn7ybdq
Tags: upstream-1.5.20
Import upstream version 1.5.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
 
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Configuration</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="The Mutt E-Mail Client" /><link rel="up" href="index.html" title="The Mutt E-Mail Client" /><link rel="prev" href="gettingstarted.html" title="Chapter 2. Getting Started" /><link rel="next" href="advancedusage.html" title="Chapter 4. Advanced Usage" /><style xmlns="" type="text/css">
 
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Configuration</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="index.html" title="The Mutt E-Mail Client" /><link rel="up" href="index.html" title="The Mutt E-Mail Client" /><link rel="prev" href="gettingstarted.html" title="Chapter 2. Getting Started" /><link rel="next" href="advancedusage.html" title="Chapter 4. Advanced Usage" /><style xmlns="" type="text/css">
4
4
      body { margin-left:2%; margin-right:2%; font-family:serif; }
5
5
.toc, .list-of-tables, .list-of-examples { font-family:sans-serif; }
6
6
h1, h2, h3, h4, h5, h6 { font-family:sans-serif; }
7
 
em.replaceable code { font-family:sans-serif; }
8
7
p { text-align:justify; }
9
8
div.table p.title, div.example p.title { font-size:smaller; font-family:sans-serif; }
10
9
.email, .email a { font-family:monospace; }
11
 
div.table-contents table { border-collapse:collapse; border:1px solid #c0c0c0; }
12
 
div.table-contents table td, div.table-contents table th { padding:5px; text-align:left; }
13
 
div.table-contents table th {
 
10
div.table-contents table, div.informaltable table { border-collapse:collapse; border:1px solid #c0c0c0; }
 
11
div.table-contents table td, div.informaltable td, div.table-contents table th, div.informaltable table th { padding:5px; text-align:left; }
 
12
div.table-contents table th, div.informaltable table th {
14
13
    font-family:sans-serif;
15
14
    background:#d0d0d0;
16
15
    font-weight:normal;
17
16
    vertical-align:top;
18
17
}
19
 
pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; }
 
18
div.cmdsynopsis { border-left:1px solid #707070; padding-left:5px; }
 
19
li div.cmdsynopsis { border-left:none; padding-left:0px; }
 
20
pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; margin-left:2%; margin-right:2%; }
 
21
div.example p.title { margin-left:2%; }
20
22
div.note h3 { font-size:small; font-style:italic; font-variant: small-caps; }
21
23
div.note h3:after { content: ":" }
22
24
div.note { margin-bottom: 5px; }
 
25
strong.command { font-family: monospace; font-weight: normal; }
 
26
tr { vertical-align: top; }
23
27
 
24
 
    </style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gettingstarted.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="advancedusage.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="configuration"></a>Chapter 3. Configuration</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="configuration.html#configuration-files">1. Location of initialization files</a></span></dt><dt><span class="sect1"><a href="configuration.html#muttrc-syntax">2. Syntax of Initialization Files</a></span></dt><dt><span class="sect1"><a href="configuration.html#addrgroup">3. Address groups</a></span></dt><dt><span class="sect1"><a href="configuration.html#alias">4. Defining/Using aliases</a></span></dt><dt><span class="sect1"><a href="configuration.html#bind">5. Changing the default key bindings</a></span></dt><dt><span class="sect1"><a href="configuration.html#charset-hook">6. Defining aliases for character sets </a></span></dt><dt><span class="sect1"><a href="configuration.html#folder-hook">7. Setting variables based upon mailbox</a></span></dt><dt><span class="sect1"><a href="configuration.html#macro">8. Keyboard macros</a></span></dt><dt><span class="sect1"><a href="configuration.html#color">9. Using color and mono video attributes</a></span></dt><dt><span class="sect1"><a href="configuration.html#ignore">10. Message header display</a></span></dt><dt><span class="sect1"><a href="configuration.html#alternates">11. Alternative addresses</a></span></dt><dt><span class="sect1"><a href="configuration.html#lists">12. Mailing lists</a></span></dt><dt><span class="sect1"><a href="configuration.html#mbox-hook">13. Using Multiple spool mailboxes</a></span></dt><dt><span class="sect1"><a href="configuration.html#mailboxes">14. Monitoring incoming mail</a></span></dt><dt><span class="sect1"><a href="configuration.html#my-hdr">15. User defined headers</a></span></dt><dt><span class="sect1"><a href="configuration.html#save-hook">16. Specify default save mailbox</a></span></dt><dt><span class="sect1"><a href="configuration.html#fcc-hook">17. Specify default Fcc: mailbox when composing</a></span></dt><dt><span class="sect1"><a href="configuration.html#fcc-save-hook">18. Specify default save filename and default Fcc: mailbox at once</a></span></dt><dt><span class="sect1"><a href="configuration.html#send-hook">19. Change settings based upon message recipients</a></span></dt><dt><span class="sect1"><a href="configuration.html#message-hook">20. Change settings before formatting a message</a></span></dt><dt><span class="sect1"><a href="configuration.html#crypt-hook">21. Choosing the cryptographic key of the recipient</a></span></dt><dt><span class="sect1"><a href="configuration.html#push">22. Adding key sequences to the keyboard buffer</a></span></dt><dt><span class="sect1"><a href="configuration.html#exec">23. Executing functions</a></span></dt><dt><span class="sect1"><a href="configuration.html#score-command">24. Message Scoring</a></span></dt><dt><span class="sect1"><a href="configuration.html#spam">25. Spam detection</a></span></dt><dt><span class="sect1"><a href="configuration.html#set">26. Setting and Querying Variables</a></span></dt><dd><dl><dt><span class="sect2"><a href="configuration.html#set-commands">26.1. Commands</a></span></dt><dt><span class="sect2"><a href="configuration.html#set-myvar">26.2. User-defined variables</a></span></dt></dl></dd><dt><span class="sect1"><a href="configuration.html#source">27. Reading initialization commands from another file</a></span></dt><dt><span class="sect1"><a href="configuration.html#unhook">28. Removing hooks</a></span></dt><dt><span class="sect1"><a href="configuration.html#formatstrings">29. Format Strings</a></span></dt><dd><dl><dt><span class="sect2"><a href="configuration.html#formatstrings-basics">29.1. Basic usage</a></span></dt><dt><span class="sect2"><a href="configuration.html#formatstrings-filters">29.2. Filters</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="configuration-files"></a>1. Location of initialization files</h2></div></div></div><p>
 
28
    </style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gettingstarted.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="advancedusage.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="configuration"></a>Chapter 3. Configuration</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="configuration.html#configuration-files">1. Location of Initialization Files</a></span></dt><dt><span class="sect1"><a href="configuration.html#muttrc-syntax">2. Syntax of Initialization Files</a></span></dt><dt><span class="sect1"><a href="configuration.html#addrgroup">3. Address Groups</a></span></dt><dt><span class="sect1"><a href="configuration.html#alias">4. Defining/Using Aliases</a></span></dt><dt><span class="sect1"><a href="configuration.html#bind">5. Changing the Default Key Bindings</a></span></dt><dt><span class="sect1"><a href="configuration.html#charset-hook">6. Defining Aliases for Character Sets</a></span></dt><dt><span class="sect1"><a href="configuration.html#folder-hook">7. Setting Variables Based Upon Mailbox</a></span></dt><dt><span class="sect1"><a href="configuration.html#macro">8. Keyboard Macros</a></span></dt><dt><span class="sect1"><a href="configuration.html#color">9. Using Color and Mono Video Attributes</a></span></dt><dt><span class="sect1"><a href="configuration.html#msg-hdr-display">10. Message Header Display</a></span></dt><dd><dl><dt><span class="sect2"><a href="configuration.html#ignore">10.1. Selecting Headers</a></span></dt><dt><span class="sect2"><a href="configuration.html#hdr-order">10.2. Ordering Displayed Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="configuration.html#alternates">11. Alternative Addresses</a></span></dt><dt><span class="sect1"><a href="configuration.html#lists">12. Mailing Lists</a></span></dt><dt><span class="sect1"><a href="configuration.html#mbox-hook">13. Using Multiple Spool Mailboxes</a></span></dt><dt><span class="sect1"><a href="configuration.html#mailboxes">14. Monitoring Incoming Mail</a></span></dt><dt><span class="sect1"><a href="configuration.html#my-hdr">15. User-Defined Headers</a></span></dt><dt><span class="sect1"><a href="configuration.html#save-hook">16. Specify Default Save Mailbox</a></span></dt><dt><span class="sect1"><a href="configuration.html#fcc-hook">17. Specify Default Fcc: Mailbox When Composing</a></span></dt><dt><span class="sect1"><a href="configuration.html#fcc-save-hook">18. Specify Default Save Filename and Default Fcc: Mailbox at Once</a></span></dt><dt><span class="sect1"><a href="configuration.html#send-hook">19. Change Settings Based Upon Message Recipients</a></span></dt><dt><span class="sect1"><a href="configuration.html#message-hook">20. Change Settings Before Formatting a Message</a></span></dt><dt><span class="sect1"><a href="configuration.html#crypt-hook">21. Choosing the Cryptographic Key of the Recipient</a></span></dt><dt><span class="sect1"><a href="configuration.html#push">22. Adding Key Sequences to the Keyboard Buffer</a></span></dt><dt><span class="sect1"><a href="configuration.html#exec">23. Executing Functions</a></span></dt><dt><span class="sect1"><a href="configuration.html#score-command">24. Message Scoring</a></span></dt><dt><span class="sect1"><a href="configuration.html#spam">25. Spam Detection</a></span></dt><dt><span class="sect1"><a href="configuration.html#set">26. Setting and Querying Variables</a></span></dt><dd><dl><dt><span class="sect2"><a href="configuration.html#var-types">26.1. Variable Types</a></span></dt><dt><span class="sect2"><a href="configuration.html#set-commands">26.2. Commands</a></span></dt><dt><span class="sect2"><a href="configuration.html#set-myvar">26.3. User-Defined Variables</a></span></dt></dl></dd><dt><span class="sect1"><a href="configuration.html#source">27. Reading Initialization Commands From Another File</a></span></dt><dt><span class="sect1"><a href="configuration.html#unhook">28. Removing Hooks</a></span></dt><dt><span class="sect1"><a href="configuration.html#formatstrings">29. Format Strings</a></span></dt><dd><dl><dt><span class="sect2"><a href="configuration.html#formatstrings-basics">29.1. Basic usage</a></span></dt><dt><span class="sect2"><a href="configuration.html#formatstrings-conditionals">29.2. Conditionals</a></span></dt><dt><span class="sect2"><a href="configuration.html#formatstrings-filters">29.3. Filters</a></span></dt><dt><span class="sect2"><a href="configuration.html#formatstrings-padding">29.4. Padding</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="configuration-files"></a>1. Location of Initialization Files</h2></div></div></div><p>
25
29
While the default configuration (or “<span class="quote">preferences</span>”) make Mutt
26
30
usable right out of the box, it is often desirable to tailor Mutt to
27
31
suit your own tastes. When Mutt is first invoked, it will attempt to
28
32
read the “<span class="quote">system</span>” configuration file (defaults set by your local
29
 
system administrator), unless the “<span class="quote">-n</span>” <a class="link" href="reference.html#commandline" title="1. Command line options">command line</a> option is specified.  This file is typically
 
33
system administrator), unless the “<span class="quote">-n</span>” <a class="link" href="reference.html#commandline" title="1. Command-Line Options">command line</a> option is specified.  This file is typically
30
34
<code class="literal">/usr/local/share/mutt/Muttrc</code> or <code class="literal">/etc/Muttrc</code>. Mutt
31
35
will next look for a file named <code class="literal">.muttrc</code> in your home
32
36
directory.  If this file does not exist and your home directory has
33
 
a subdirectory named <code class="literal">.mutt</code>, mutt try to load a file named
 
37
a subdirectory named <code class="literal">.mutt</code>, Mutt tries to load a file named
34
38
<code class="literal">.mutt/muttrc</code>.
35
39
</p><p>
36
40
<code class="literal">.muttrc</code> is the file where you will usually place your <a class="link" href="reference.html#commands" title="2. Configuration Commands">commands</a> to configure Mutt.
37
41
</p><p>
38
 
In addition, mutt supports version specific configuration files that are
 
42
In addition, Mutt supports version specific configuration files that are
39
43
parsed instead of the default files as explained above.  For instance, if
40
44
your system has a <code class="literal">Muttrc-0.88</code> file in the system configuration
41
 
directory, and you are running version 0.88 of mutt, this file will be
 
45
directory, and you are running version 0.88 of Mutt, this file will be
42
46
sourced instead of the <code class="literal">Muttrc</code> file.  The same is true of the user
43
47
configuration file, if you have a file <code class="literal">.muttrc-0.88.6</code> in your home
44
 
directory, when you run mutt version 0.88.6, it will source this file
 
48
directory, when you run Mutt version 0.88.6, it will source this file
45
49
instead of the default <code class="literal">.muttrc</code> file.  The version number is the
46
 
same which is visible using the “<span class="quote">-v</span>” <a class="link" href="reference.html#commandline" title="1. Command line options">command line</a> switch or using the <code class="literal">show-version</code> key (default:
 
50
same which is visible using the “<span class="quote">-v</span>” <a class="link" href="reference.html#commandline" title="1. Command-Line Options">command line</a> switch or using the <code class="literal">show-version</code> key (default:
47
51
V) from the index menu.
48
52
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="muttrc-syntax"></a>2. Syntax of Initialization Files</h2></div></div></div><p>
49
53
An initialization file consists of a series of <a class="link" href="reference.html#commands" title="2. Configuration Commands">commands</a>.  Each line of the file may contain one or more commands.
50
54
When multiple commands are used, they must be separated by a semicolon
51
 
(;).
 
55
(“<span class="quote">;</span>”).
52
56
</p><div class="example"><a id="ex-rc-multiple-cmds"></a><p class="title"><b>Example 3.1. Multiple configuration commands per line</b></p><div class="example-contents"><pre class="screen">
53
57
set realname='Mutt user' ; ignore x-
54
58
</pre></div></div><br class="example-break" /><p>
55
59
The hash mark, or pound sign
56
60
(“<span class="quote">#</span>”), is used as a “<span class="quote">comment</span>” character. You can use it to
57
61
annotate your initialization file. All text after the comment character
58
 
to the end of the line is ignored. For example,
 
62
to the end of the line is ignored.
59
63
</p><div class="example"><a id="ex-ec-comment"></a><p class="title"><b>Example 3.2. Commenting configuration files</b></p><div class="example-contents"><pre class="screen">
60
64
my_hdr X-Disclaimer: Why are you listening to me? # This is a comment
61
65
</pre></div></div><br class="example-break" /><p>
62
 
Single quotes (') and double quotes (") can be used to quote strings
 
66
Single quotes (“<span class="quote">'</span>”) and double quotes (“<span class="quote">"</span>”) can be used to quote strings
63
67
which contain spaces or other special characters.  The difference between
64
68
the two types of quotes is similar to that of many popular shell programs,
65
69
namely that a single quote is used to specify a literal string (one that is
66
70
not interpreted for shell variables or quoting with a backslash [see
67
71
next paragraph]), while double quotes indicate a string for which
68
72
should be evaluated.  For example, backticks are evaluated inside of double
69
 
quotes, but <span class="bold"><strong>not</strong></span> for single quotes.
 
73
quotes, but <span class="emphasis"><em>not</em></span> for single quotes.
70
74
</p><p>
71
 
\ quotes the next character, just as in shells such as bash and zsh.
 
75
“<span class="quote">\</span>” quotes the next character, just as in shells such as bash and zsh.
72
76
For example, if want to put quotes “<span class="quote">"</span>” inside of a string, you can use
73
77
“<span class="quote">\</span>” to force the next character to be a literal instead of interpreted
74
78
character.
79
83
“<span class="quote">\n</span>” and “<span class="quote">\r</span>” have their usual C meanings of linefeed and
80
84
carriage-return, respectively.
81
85
</p><p>
82
 
A \ at the end of a line can be used to split commands over
83
 
multiple lines, provided that the split points don't appear in the
84
 
middle of command names.
85
 
</p><p>
 
86
A “<span class="quote">\</span>” at the end of a line can be used to split commands over
 
87
multiple lines as it “<span class="quote">escapes</span>” the line end, provided that the split points don't appear in the
 
88
middle of command names. Lines are first concatenated before
 
89
interpretation so that a multi-line can be commented by commenting out
 
90
the first line only.
 
91
</p><div class="example"><a id="ex-rc-split"></a><p class="title"><b>Example 3.4. Splitting long configuration commands over several lines</b></p><div class="example-contents"><pre class="screen">
 
92
set status_format="some very \
 
93
long value split \
 
94
over several lines"
 
95
</pre></div></div><br class="example-break" /><p>
86
96
It is also possible to substitute the output of a Unix command in an
87
97
initialization file.  This is accomplished by enclosing the command in
88
 
backticks (``).  For example,
89
 
</p><div class="example"><a id="ex-rc-backtick"></a><p class="title"><b>Example 3.4. Using external command's output in configuration files</b></p><div class="example-contents"><pre class="screen">
90
 
my_hdr X-Operating-System: `uname -a`
91
 
</pre></div></div><br class="example-break" /><p>
92
 
The output of the Unix command “<span class="quote">uname -a</span>” will be substituted before the
 
98
backticks (``). In <a class="xref" href="configuration.html#ex-rc-backtick" title="Example 3.5. Using external command's output in configuration files">Example 3.5, “Using external command's output in configuration files”</a>, the output of the
 
99
Unix command “<span class="quote">uname -a</span>” will be substituted before the
93
100
line is parsed.
94
 
</p><div class="note"><h3 class="title">Note</h3><p>
95
101
Since initialization files are line oriented, only
96
102
the first line of output from the Unix command will be substituted.
97
 
</p></div><p>
98
 
Both environment variables and mutt variables can be accessed by
 
103
</p><div class="example"><a id="ex-rc-backtick"></a><p class="title"><b>Example 3.5. Using external command's output in configuration files</b></p><div class="example-contents"><pre class="screen">
 
104
my_hdr X-Operating-System: `uname -a`
 
105
</pre></div></div><br class="example-break" /><p>
 
106
Both environment variables and Mutt variables can be accessed by
99
107
prepending “<span class="quote">$</span>” to the name of the variable. For example,
100
 
</p><div class="example"><a id="ex-rc-env"></a><p class="title"><b>Example 3.5. Using environment variables in configuration files</b></p><div class="example-contents"><pre class="screen">
 
108
</p><div class="example"><a id="ex-rc-env"></a><p class="title"><b>Example 3.6. Using environment variables in configuration files</b></p><div class="example-contents"><pre class="screen">
101
109
set record=+sent_on_$HOSTNAME
102
110
</pre></div></div><br class="example-break" /><p>
103
 
will cause mutt to save outgoing messages to a folder named
104
 
“<span class="quote">sent_on_kremvax</span>” if the environment variable HOSTNAME is set to
105
 
“<span class="quote">kremvax.</span>” (See <a class="link" href="reference.html#record" title="3.240. record">$record</a> for
 
111
will cause Mutt to save outgoing messages to a folder named
 
112
“<span class="quote">sent_on_kremvax</span>” if the environment variable <code class="literal">$HOSTNAME</code> is set to
 
113
“<span class="quote">kremvax.</span>” (See <a class="link" href="reference.html#record" title="3.211. record">$record</a> for
106
114
details.)
107
115
</p><p>
108
116
Mutt expands the variable when it is assigned, not when it is used. If
110
118
changes after the assignment, the variable on the left-hand side will
111
119
not be affected.
112
120
</p><p>
113
 
The commands understood by mutt are explained in the next paragraphs.
 
121
The commands understood by Mutt are explained in the next paragraphs.
114
122
For a complete list, see the <a class="link" href="reference.html#commands" title="2. Configuration Commands">command reference</a>.
115
123
</p><p>
116
124
All configuration files are expected to be in the current locale as
119
127
If a configuration file is not encoded in the same character set the
120
128
<a class="link" href="reference.html#config-charset" title="3.30. config_charset">$config_charset</a>
121
129
variable should be used: all lines starting with the next are recoded
122
 
from $config_charset to $charset.
 
130
from <a class="link" href="reference.html#config-charset" title="3.30. config_charset">$config_charset</a>
 
131
to <a class="link" href="reference.html#charset" title="3.25. charset">$charset</a>.
123
132
</p><p>
124
133
This mechanism should be avoided if possible as it has the
125
134
following implications:
126
135
</p><div class="itemizedlist"><ul type="disc"><li><p>These variables should be set early in a configuration
127
 
file with $charset preceding $config_charset so Mutt
128
 
know what character set to convert to.</p></li><li><p>If $config_charset is set, it should be set
 
136
file with <a class="link" href="reference.html#charset" title="3.25. charset">$charset</a> preceding
 
137
<a class="link" href="reference.html#config-charset" title="3.30. config_charset">$config_charset</a> so Mutt
 
138
knows what character set to convert to.</p></li><li><p>If <a class="link" href="reference.html#config-charset" title="3.30. config_charset">$config_charset</a> is set, it should be set
129
139
in each configuration file because the value is global and <span class="emphasis"><em>not</em></span>
130
140
per configuration file.</p></li><li><p>Because Mutt first recodes a line before it attempts to parse it,
131
141
a conversion introducing question marks or other characters as
132
142
part of errors (unconvertable characters, transliteration) may introduce syntax
133
143
errors or silently change the meaning of certain tokens (e.g. inserting
134
 
question marks into regular expressions).</p></li></ul></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="addrgroup"></a>3. Address groups</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">group</code>  [
 
144
question marks into regular expressions).</p></li></ul></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="addrgroup"></a>3. Address Groups</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">group</code>  [
135
145
<code class="option">-group</code>
136
146
<em class="replaceable"><code>name</code></em>
137
147
...] { 
140
150
...  |   
141
151
<code class="option">-addr</code>
142
152
<em class="replaceable"><code>expr</code></em>
143
 
... }</p></div><div class="cmdsynopsis"><p><code class="command">ungroup</code>  [
 
153
... }<br /><code class="command">ungroup</code>  [
144
154
<code class="option">-group</code>
145
155
<em class="replaceable"><code>name</code></em>
146
156
...] { 
152
162
<code class="option">-addr</code>
153
163
<em class="replaceable"><code>expr</code></em>
154
164
... }</p></div><p>
155
 
<code class="literal">group</code> is used to directly add either addresses or
 
165
<span class="command"><strong>group</strong></span> is used to directly add either addresses or
156
166
regular expressions to the specified group or groups. The different
157
 
categories of arguments to the <code class="literal">group</code> command can be
 
167
categories of arguments to the <span class="command"><strong>group</strong></span> command can be
158
168
in any order. The flags <code class="literal">-rx</code> and
159
169
<code class="literal">-addr</code> specify what the following strings (that cannot
160
170
begin with a hyphen) should be interpreted as: either a regular
161
171
expression or an email address, respectively.
162
172
</p><p>
163
173
These address groups can also be created implicitly by the
164
 
<a class="link" href="configuration.html#alias" title="4. Defining/Using aliases">alias</a>, <a class="link" href="configuration.html#lists" title="12. Mailing lists">lists</a>,
165
 
<a class="link" href="configuration.html#lists" title="12. Mailing lists">subscribe</a> and
166
 
<a class="link" href="configuration.html#alternates" title="11. Alternative addresses">alternates</a> commands by specifying the
 
174
<a class="link" href="configuration.html#alias" title="4. Defining/Using Aliases"><span class="command"><strong>alias</strong></span></a>, <a class="link" href="configuration.html#lists" title="12. Mailing Lists">lists</a>,
 
175
<a class="link" href="configuration.html#lists" title="12. Mailing Lists">subscribe</a> and
 
176
<a class="link" href="configuration.html#alternates" title="11. Alternative Addresses"><span class="command"><strong>alternates</strong></span></a> commands by specifying the
167
177
optional <code class="literal">-group</code> option.
168
178
</p><p>
169
179
Once defined, these address groups can be used in
170
180
<a class="link" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> to search for and limit the
171
181
display to messages matching a group.
172
182
</p><p>
173
 
<code class="literal">ungroup</code> is used to remove addresses or regular
 
183
<span class="command"><strong>ungroup</strong></span> is used to remove addresses or regular
174
184
expressions from the specified group or groups. The syntax is similar to
175
 
the <code class="literal">group</code> command, however the special character
 
185
the <span class="command"><strong>group</strong></span> command, however the special character
176
186
<code class="literal">*</code> can be used to empty a group of all of its
177
187
contents.
178
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alias"></a>4. Defining/Using aliases</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">alias</code>  [
 
188
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alias"></a>4. Defining/Using Aliases</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">alias</code>  [
179
189
<code class="option">-group</code>
180
190
<em class="replaceable"><code>name</code></em>
181
191
...]  
184
194
<em class="replaceable"><code>address</code></em>
185
195
  [
186
196
<em class="replaceable"><code>address</code></em>
187
 
...]</p></div><p>
 
197
...]<br /><code class="command">unalias</code>  [
 
198
<code class="option">-group</code>
 
199
<em class="replaceable"><code>name</code></em>
 
200
...] { 
 
201
<em class="replaceable"><code>*</code></em>
 
202
  |   
 
203
<em class="replaceable"><code>key</code></em>
 
204
... }</p></div><p>
188
205
It's usually very cumbersome to remember or type out the address of someone
189
206
you are communicating with.  Mutt allows you to create “<span class="quote">aliases</span>” which map
190
207
a short string to a full address.
191
208
</p><div class="note"><h3 class="title">Note</h3><p>
192
209
If you want to create an alias for more than
193
 
one address, you <span class="bold"><strong>must</strong></span> separate the addresses with a comma (“<span class="quote">,</span>”).
 
210
one address, you <span class="emphasis"><em>must</em></span> separate the addresses with a comma (“<span class="quote">,</span>”).
194
211
</p></div><p>
195
212
The optional <code class="literal">-group</code> argument to
196
 
<code class="literal">alias</code> causes the aliased address(es) to be added to
 
213
<span class="command"><strong>alias</strong></span> causes the aliased address(es) to be added to
197
214
the named <span class="emphasis"><em>group</em></span>.
198
215
</p><p>
199
216
To remove an alias or aliases (“<span class="quote">*</span>” means all aliases):
200
 
</p><div class="cmdsynopsis"><p><code class="command">unalias</code>  [
201
 
<code class="option">-group</code>
202
 
<em class="replaceable"><code>name</code></em>
203
 
...] { 
204
 
<em class="replaceable"><code>*</code></em>
205
 
  |   
206
 
<em class="replaceable"><code>key</code></em>
207
 
... }</p></div><pre class="screen">
 
217
</p><pre class="screen">
208
218
alias muttdude me@cs.hmc.edu (Michael Elkins)
209
219
alias theguys manny, moe, jack
210
220
</pre><p>
211
221
Unlike other mailers, Mutt doesn't require aliases to be defined
212
 
in a special file.  The <code class="literal">alias</code> command can appear anywhere in
213
 
a configuration file, as long as this file is <a class="link" href="configuration.html#source" title="27. Reading initialization commands from another file">sourced</a>.  Consequently, you can have multiple alias files, or
214
 
you can have all aliases defined in your muttrc.
 
222
in a special file.  The <span class="command"><strong>alias</strong></span> command can appear anywhere in
 
223
a configuration file, as long as this file is <a class="link" href="configuration.html#source" title="27. Reading Initialization Commands From Another File"><span class="command"><strong>source</strong></span>d</a>.  Consequently, you can have multiple alias files, or
 
224
you can have all aliases defined in your <code class="literal">.muttrc</code>.
215
225
</p><p>
216
226
On the other hand, the <a class="link" href="gettingstarted.html#create-alias"><code class="literal">&lt;create-alias&gt;</code></a>
217
227
function can use only one file, the one pointed to by the <a class="link" href="reference.html#alias-file" title="3.3. alias_file">$alias_file</a> variable (which is
218
228
<code class="literal">˜/.muttrc</code> by default). This file is not special either,
219
229
in the sense that Mutt will happily append aliases to any file, but in
220
 
order for the new aliases to take effect you need to explicitly <a class="link" href="configuration.html#source" title="27. Reading initialization commands from another file">source</a> this file too.
221
 
</p><p>
222
 
For example:
223
 
</p><div class="example"><a id="ex-alias-external"></a><p class="title"><b>Example 3.6. Configuring external alias files</b></p><div class="example-contents"><pre class="screen">
 
230
order for the new aliases to take effect you need to explicitly <a class="link" href="configuration.html#source" title="27. Reading Initialization Commands From Another File"><span class="command"><strong>source</strong></span></a> this file too.
 
231
</p><div class="example"><a id="ex-alias-external"></a><p class="title"><b>Example 3.7. Configuring external alias files</b></p><div class="example-contents"><pre class="screen">
224
232
source /usr/local/share/Mutt.aliases
225
233
source ~/.mail_aliases
226
234
set alias_file=~/.mail_aliases
227
235
</pre></div></div><br class="example-break" /><p>
228
 
To use aliases, you merely use the alias at any place in mutt where mutt
 
236
To use aliases, you merely use the alias at any place in Mutt where Mutt
229
237
prompts for addresses, such as the <span class="emphasis"><em>To:</em></span> or <span class="emphasis"><em>Cc:</em></span> prompt.  You can
230
238
also enter aliases in your editor at the appropriate headers if you have the
231
 
<a class="link" href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable set.
 
239
<a class="link" href="reference.html#edit-headers" title="3.57. edit_headers">$edit_headers</a> variable set.
232
240
</p><p>
233
241
In addition, at the various address prompts, you can use the tab character
234
242
to expand a partial alias to the full alias.  If there are multiple matches,
235
 
mutt will bring up a menu with the matching aliases.  In order to be
236
 
presented with the full list of aliases, you must hit tab with out a partial
 
243
Mutt will bring up a menu with the matching aliases.  In order to be
 
244
presented with the full list of aliases, you must hit tab without a partial
237
245
alias, such as at the beginning of the prompt or after a comma denoting
238
246
multiple addresses.
239
247
</p><p>
240
248
In the alias menu, you can select as many aliases as you want with the
241
249
<code class="literal">select-entry</code> key (default: &lt;Return&gt;), and use the
242
250
<span class="emphasis"><em>exit</em></span> key (default: q) to return to the address prompt.
243
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="bind"></a>5. Changing the default key bindings</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">bind</code>   
 
251
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="bind"></a>5. Changing the Default Key Bindings</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">bind</code>   
244
252
<em class="replaceable"><code>map</code></em>
245
253
   
246
254
<em class="replaceable"><code>key</code></em>
258
266
menus except for the pager and editor modes.  If a key is not defined in
259
267
another menu, Mutt will look for a binding to use in this menu.  This allows
260
268
you to bind a key to a certain function in multiple menus instead of having
261
 
multiple bind statements to accomplish the same task.
 
269
multiple <span class="command"><strong>bind</strong></span> statements to accomplish the same task.
262
270
</p></dd><dt><span class="term">alias</span></dt><dd><p>
263
271
The alias menu is the list of your personal aliases as defined in your
264
 
muttrc.  It is the mapping from a short alias name to the full email
 
272
<code class="literal">.muttrc</code>.  It is the mapping from a short alias name to the full email
265
273
address(es) of the recipient(s).
266
274
</p></dd><dt><span class="term">attach</span></dt><dd><p>
267
275
The attachment menu is used to access the attachments on received messages.
288
296
recalling a message the user was composing, but saved until later.
289
297
</p></dd><dt><span class="term">query</span></dt><dd><p>
290
298
The query menu is the browser for results returned by
291
 
<a class="link" href="reference.html#query-command" title="3.232. query_command">$query_command</a>.
 
299
<a class="link" href="reference.html#query-command" title="3.203. query_command">$query_command</a>.
292
300
</p></dd><dt><span class="term">mix</span></dt><dd><p>
293
301
The mixmaster screen is used to select remailer options for outgoing
294
302
messages (if Mutt is compiled with Mixmaster support).
309
317
<span class="emphasis"><em>function</em></span> specifies which action to take when <span class="emphasis"><em>key</em></span> is pressed.
310
318
For a complete list of functions, see the <a class="link" href="reference.html#functions" title="4. Functions">reference</a>.  The special function <code class="literal">&lt;noop&gt;</code> unbinds the specified key
311
319
sequence.
312
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="charset-hook"></a>6. Defining aliases for character sets </h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">charset-hook</code>   
 
320
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="charset-hook"></a>6. Defining Aliases for Character Sets</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">charset-hook</code>   
313
321
<em class="replaceable"><code>alias</code></em>
314
322
   
315
323
<em class="replaceable"><code>charset</code></em>
316
 
 </p></div><div class="cmdsynopsis"><p><code class="command">iconv-hook</code>   
 
324
 <br /><code class="command">iconv-hook<a id="iconv-hook"></a></code>   
317
325
<em class="replaceable"><code>charset</code></em>
318
326
   
319
327
<em class="replaceable"><code>local-charset</code></em>
320
328
 </p></div><p>
321
 
The <code class="literal">charset-hook</code> command defines an alias for a character set.
 
329
The <span class="command"><strong>charset-hook</strong></span> command defines an alias for a character set.
322
330
This is useful to properly display messages which are tagged with a
323
 
character set name not known to mutt.
 
331
character set name not known to Mutt.
324
332
</p><p>
325
 
The <code class="literal">iconv-hook</code> command defines a system-specific name for a
 
333
The <span class="command"><strong>iconv-hook</strong></span> command defines a system-specific name for a
326
334
character set.  This is helpful when your systems character
327
335
conversion library insists on using strange, system-specific names
328
336
for character sets.
329
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="folder-hook"></a>7. Setting variables based upon mailbox</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">folder-hook</code>   
 
337
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="folder-hook"></a>7. Setting Variables Based Upon Mailbox</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">folder-hook</code>   
330
338
<em class="replaceable"><code>[!]regexp</code></em>
331
339
   
332
340
<em class="replaceable"><code>command</code></em>
333
341
 </p></div><p>
334
342
It is often desirable to change settings based on which mailbox you are
335
 
reading.  The folder-hook command provides a method by which you can execute
 
343
reading.  The <span class="command"><strong>folder-hook</strong></span> command provides a method by which you can execute
336
344
any configuration command.  <span class="emphasis"><em>regexp</em></span> is a regular expression specifying
337
345
in which mailboxes to execute <span class="emphasis"><em>command</em></span> before loading.  If a mailbox
338
 
matches multiple folder-hook's, they are executed in the order given in the
339
 
muttrc.
 
346
matches multiple <span class="command"><strong>folder-hook</strong></span>s, they are executed in the order given in the
 
347
<code class="literal">.muttrc</code>.
340
348
</p><div class="note"><h3 class="title">Note</h3><p>
341
 
If you use the “<span class="quote">!</span>” shortcut for <a class="link" href="reference.html#spoolfile" title="3.277. spoolfile">$spoolfile</a> at the beginning of the pattern, you must place it
 
349
If you use the “<span class="quote">!</span>” shortcut for <a class="link" href="reference.html#spoolfile" title="3.269. spoolfile">$spoolfile</a> at the beginning of the pattern, you must place it
342
350
inside of double or single quotes in order to distinguish it from the
343
351
logical <span class="emphasis"><em>not</em></span> operator for the expression.
344
352
</p></div><div class="note"><h3 class="title">Note</h3><p>
345
353
Settings are <span class="emphasis"><em>not</em></span> restored when you leave the mailbox.
346
354
For example, a command action to perform is to change the sorting method
347
355
based upon the mailbox being read:
348
 
</p></div><pre class="screen">
349
 
folder-hook mutt set sort=threads
350
 
</pre><p>
 
356
 
 
357
</p><pre class="screen">
 
358
folder-hook mutt "set sort=threads"</pre><p>
 
359
 
351
360
However, the sorting method is not restored to its previous value when
352
361
reading a different mailbox.  To specify a <span class="emphasis"><em>default</em></span> command, use the
353
 
pattern “<span class="quote">.</span>” before other folder-hooks adjusting a value on a per-folder basis
354
 
because folder-hooks are evaluated in the order given in the configuration file.
355
 
The following example will set the <a class="link" href="reference.html#sort" title="3.271. sort">sort</a> variable
 
362
pattern “<span class="quote">.</span>” before other <span class="command"><strong>folder-hook</strong></span>s adjusting a value on a per-folder basis
 
363
because <span class="command"><strong>folder-hook</strong></span>s are evaluated in the order given in the
 
364
configuration file.
 
365
</p></div><p>
 
366
The following example will set the <a class="link" href="reference.html#sort" title="3.263. sort">sort</a> variable
356
367
to <code class="literal">date-sent</code> for all folders but to <code class="literal">threads</code>
357
368
for all folders containing “<span class="quote">mutt</span>” in their name.
358
 
</p><div class="example"><a id="ex-folder-sorting"></a><p class="title"><b>Example 3.7. Setting sort method based on mailbox name</b></p><div class="example-contents"><pre class="screen">
359
 
folder-hook . set sort=date-sent
360
 
folder-hook mutt set sort=threads
361
 
</pre></div></div><br class="example-break" /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="macro"></a>8. Keyboard macros</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">macro</code>   
 
369
</p><div class="example"><a id="ex-folder-sorting"></a><p class="title"><b>Example 3.8. Setting sort method based on mailbox name</b></p><div class="example-contents"><pre class="screen">
 
370
folder-hook . "set sort=date-sent"
 
371
folder-hook mutt "set sort=threads"
 
372
</pre></div></div><br class="example-break" /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="macro"></a>8. Keyboard Macros</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">macro</code>   
362
373
<em class="replaceable"><code>menu</code></em>
363
374
   
364
375
<em class="replaceable"><code>key</code></em>
379
390
commas separating them.
380
391
</p><p>
381
392
<span class="emphasis"><em>key</em></span> and <span class="emphasis"><em>sequence</em></span> are expanded by the same rules as the
382
 
<a class="link" href="configuration.html#bind" title="5. Changing the default key bindings">key bindings</a> with some additions.  The
 
393
<a class="link" href="configuration.html#bind" title="5. Changing the Default Key Bindings">key bindings</a> with some additions.  The
383
394
first is that control characters in <span class="emphasis"><em>sequence</em></span> can also be specified
384
395
as <span class="emphasis"><em>^x</em></span>.  In order to get a caret (“<span class="quote">^</span>”) you need to use
385
396
<span class="emphasis"><em>^^</em></span>.  Secondly, to specify a certain key such as <span class="emphasis"><em>up</em></span>
386
397
or to invoke a function directly, you can use the format
387
398
<span class="emphasis"><em>&lt;key name&gt;</em></span> and <span class="emphasis"><em>&lt;function name&gt;</em></span>.  For a listing of key
388
 
names see the section on <a class="link" href="configuration.html#bind" title="5. Changing the default key bindings">key bindings</a>.  Functions
 
399
names see the section on <a class="link" href="configuration.html#bind" title="5. Changing the Default Key Bindings">key bindings</a>.  Functions
389
400
are listed in the <a class="link" href="reference.html#functions" title="4. Functions">reference</a>.
390
401
</p><p>
391
402
The advantage with using function names directly is that the macros will
395
406
than one user (e.g., the system Muttrc).
396
407
</p><p>
397
408
Optionally you can specify a descriptive text after <span class="emphasis"><em>sequence</em></span>,
398
 
which is shown in the help screens.
 
409
which is shown in the help screens if they contain a description.
399
410
</p><div class="note"><h3 class="title">Note</h3><p>
400
411
Macro definitions (if any) listed in the help screen(s), are
401
412
silently truncated at the screen width, and are not wrapped.
402
 
</p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="color"></a>9. Using color and mono video attributes</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">color</code>   
 
413
</p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="color"></a>9. Using Color and Mono Video Attributes</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">color</code>   
403
414
<em class="replaceable"><code>object</code></em>
404
415
   
405
416
<em class="replaceable"><code>foreground</code></em>
406
417
   
407
418
<em class="replaceable"><code>background</code></em>
408
 
 </p></div><div class="cmdsynopsis"><p><code class="command">color</code>  { 
 
419
 <br /><code class="command">color</code>  { 
409
420
<code class="option">header</code>
410
421
  |   
411
422
<code class="option">body</code>
415
426
<em class="replaceable"><code>background</code></em>
416
427
   
417
428
<em class="replaceable"><code>regexp</code></em>
418
 
 </p></div><div class="cmdsynopsis"><p><code class="command">color</code>   
 
429
 <br /><code class="command">color</code>   
419
430
<code class="option">index</code>
420
431
   
421
432
<em class="replaceable"><code>foreground</code></em>
423
434
<em class="replaceable"><code>background</code></em>
424
435
   
425
436
<em class="replaceable"><code>pattern</code></em>
426
 
 </p></div><div class="cmdsynopsis"><p><code class="command">uncolor</code>   
 
437
 <br /><code class="command">uncolor</code>  { 
427
438
<code class="option">index</code>
428
 
  { 
 
439
  |   
 
440
<code class="option">header</code>
 
441
  |   
 
442
<code class="option">body</code>
 
443
 } { 
429
444
<em class="replaceable"><code>*</code></em>
430
445
  |   
431
446
<em class="replaceable"><code>pattern</code></em>
432
447
... }</p></div><p>
433
448
If your terminal supports color, you can spice up Mutt by creating your own
434
449
color scheme.  To define the color of an object (type of information), you
435
 
must specify both a foreground color <span class="bold"><strong>and</strong></span> a background color (it is not
 
450
must specify both a foreground color <span class="emphasis"><em>and</em></span> a background color (it is not
436
451
possible to only specify one or the other).
437
452
</p><p>
438
453
<span class="emphasis"><em>header</em></span> and <span class="emphasis"><em>body</em></span> match <span class="emphasis"><em>regexp</em></span>
440
455
(see <a class="xref" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">Section 2, “Patterns: Searching, Limiting and Tagging”</a>) in the message index.
441
456
</p><p>
442
457
<span class="emphasis"><em>object</em></span> can be one of:
443
 
</p><div class="itemizedlist"><ul type="disc"><li><p>attachment</p></li><li><p>bold (hiliting bold patterns in the body of messages)</p></li><li><p>error (error messages printed by Mutt)</p></li><li><p>hdrdefault (default color of the message header in the pager)</p></li><li><p>indicator (arrow or bar used to indicate the current item in a menu)</p></li><li><p>markers (the “<span class="quote">+</span>” markers at the beginning of wrapped lines in the pager)</p></li><li><p>message (informational messages)</p></li><li><p>normal</p></li><li><p>quoted (text matching <a class="link" href="reference.html#quote-regexp" title="3.235. quote_regexp">$quote_regexp</a> in the body of a message)</p></li><li><p>quoted1, quoted2, ..., quoted<span class="bold"><strong>N</strong></span> (higher levels of quoting)</p></li><li><p>search (hiliting of words in the pager)</p></li><li><p>signature</p></li><li><p>status (mode lines used to display info about the mailbox or message)</p></li><li><p>tilde (the “<span class="quote">˜</span>” used to pad blank lines in the pager)</p></li><li><p>tree (thread tree drawn in the message index and attachment menu)</p></li><li><p>underline (hiliting underlined patterns in the body of messages)</p></li></ul></div><p>
 
458
</p><div class="itemizedlist"><ul type="disc"><li><p>attachment</p></li><li><p>bold (hiliting bold patterns in the body of messages)</p></li><li><p>error (error messages printed by Mutt)</p></li><li><p>hdrdefault (default color of the message header in the pager)</p></li><li><p>indicator (arrow or bar used to indicate the current item in a menu)</p></li><li><p>markers (the “<span class="quote">+</span>” markers at the beginning of wrapped lines in the pager)</p></li><li><p>message (informational messages)</p></li><li><p>normal</p></li><li><p>quoted (text matching <a class="link" href="reference.html#quote-regexp" title="3.206. quote_regexp">$quote_regexp</a> in the body of a message)</p></li><li><p>quoted1, quoted2, ..., quoted<span class="emphasis"><em>N</em></span> (higher levels of quoting)</p></li><li><p>search (hiliting of words in the pager)</p></li><li><p>signature</p></li><li><p>status (mode lines used to display info about the mailbox or message)</p></li><li><p>tilde (the “<span class="quote">˜</span>” used to pad blank lines in the pager)</p></li><li><p>tree (thread tree drawn in the message index and attachment menu)</p></li><li><p>underline (hiliting underlined patterns in the body of messages)</p></li></ul></div><p>
444
459
<span class="emphasis"><em>foreground</em></span> and <span class="emphasis"><em>background</em></span> can be one of the following:
445
460
</p><div class="itemizedlist"><ul type="disc"><li><p>white</p></li><li><p>black</p></li><li><p>green</p></li><li><p>magenta</p></li><li><p>blue</p></li><li><p>cyan</p></li><li><p>yellow</p></li><li><p>red</p></li><li><p>default</p></li><li><p>color<span class="emphasis"><em>x</em></span></p></li></ul></div><p>
446
461
<span class="emphasis"><em>foreground</em></span> can optionally be prefixed with the keyword <code class="literal">bright</code> to make
449
464
If your terminal supports it, the special keyword <span class="emphasis"><em>default</em></span> can be
450
465
used as a transparent color.  The value <span class="emphasis"><em>brightdefault</em></span> is also valid.
451
466
If Mutt is linked against the <span class="emphasis"><em>S-Lang</em></span> library, you also need to set
452
 
the <span class="emphasis"><em>COLORFGBG</em></span> environment variable to the default colors of your
 
467
the <code class="literal">$COLORFGBG</code> environment variable to the default colors of your
453
468
terminal for this to work; for example (for Bourne-like shells):
454
469
</p><pre class="screen">
455
470
set COLORFGBG="green;black"
459
474
and <span class="emphasis"><em>brown</em></span> keywords instead of <span class="emphasis"><em>white</em></span> and <span class="emphasis"><em>yellow</em></span> when
460
475
setting this variable.
461
476
</p></div><div class="note"><h3 class="title">Note</h3><p>
462
 
The uncolor command can be applied to the index object only.  It
463
 
removes entries from the list. You <span class="bold"><strong>must</strong></span> specify the same pattern
464
 
specified in the color command for it to be removed.  The pattern “<span class="quote">*</span>” is
465
 
a special token which means to clear the color index list of all entries.
 
477
The <span class="command"><strong>uncolor</strong></span> command can be applied to the index, header and body objects only.  It
 
478
removes entries from the list. You <span class="emphasis"><em>must</em></span> specify the same pattern
 
479
specified in the <span class="command"><strong>color</strong></span> command for it to be removed.  The pattern “<span class="quote">*</span>” is
 
480
a special token which means to clear the color list of all entries.
466
481
</p></div><p>
467
482
Mutt also recognizes the keywords <span class="emphasis"><em>color0</em></span>, <span class="emphasis"><em>color1</em></span>, …,
468
 
<span class="emphasis"><em>color</em></span><span class="bold"><strong>N-1</strong></span> (<span class="bold"><strong>N</strong></span> being the number of colors supported
 
483
<span class="emphasis"><em>color</em></span><span class="emphasis"><em>N-1</em></span> (<span class="emphasis"><em>N</em></span> being the number of colors supported
469
484
by your terminal).  This is useful when you remap the colors for your
470
485
display (for example by changing the color associated with <span class="emphasis"><em>color2</em></span>
471
486
for your xterm), since color names may then lose their normal meaning.
472
 
</p><p>
 
487
</p><a id="mono"></a><p>
473
488
If your terminal does not support color, it is still possible change the video
474
 
attributes through the use of the “<span class="quote">mono</span>” command:
475
 
</p><a id="mono"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">mono</code>   
 
489
attributes through the use of the “<span class="quote">mono</span>” command. Usage:
 
490
</p><div class="cmdsynopsis"><p><code class="command">mono</code>   
476
491
<em class="replaceable"><code>object</code></em>
477
492
   
478
493
<em class="replaceable"><code>attribute</code></em>
479
 
 </p></div><div class="cmdsynopsis"><p><code class="command">mono</code>  { 
 
494
 <br /><code class="command">mono</code>  { 
480
495
<code class="option">header</code>
481
496
  |   
482
497
<code class="option">body</code>
484
499
<em class="replaceable"><code>attribute</code></em>
485
500
   
486
501
<em class="replaceable"><code>regexp</code></em>
487
 
 </p></div><div class="cmdsynopsis"><p><code class="command">mono</code>   
 
502
 <br /><code class="command">mono</code>   
488
503
<code class="option">index</code>
489
504
   
490
505
<em class="replaceable"><code>attribute</code></em>
491
506
   
492
507
<em class="replaceable"><code>pattern</code></em>
493
 
 </p></div><div class="cmdsynopsis"><p><code class="command">unmono</code>   
 
508
 <br /><code class="command">unmono</code>  { 
494
509
<code class="option">index</code>
495
 
  { 
 
510
  |   
 
511
<code class="option">header</code>
 
512
  |   
 
513
<code class="option">body</code>
 
514
 } { 
496
515
<em class="replaceable"><code>*</code></em>
497
516
  |   
498
517
<em class="replaceable"><code>pattern</code></em>
499
518
... }</p></div><p>
500
 
For <span class="emphasis"><em>object</em></span>, see the color command. <span class="emphasis"><em>attribute</em></span>
 
519
For <span class="emphasis"><em>object</em></span>, see the <span class="command"><strong>color</strong></span> command. <span class="emphasis"><em>attribute</em></span>
501
520
can be one of the following:
502
 
</p><div class="itemizedlist"><ul type="disc"><li><p>none</p></li><li><p>bold</p></li><li><p>underline</p></li><li><p>reverse</p></li><li><p>standout</p></li></ul></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="ignore"></a>10. Message header display</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">ignore</code>   
 
521
</p><div class="itemizedlist"><ul type="disc"><li><p>none</p></li><li><p>bold</p></li><li><p>underline</p></li><li><p>reverse</p></li><li><p>standout</p></li></ul></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="msg-hdr-display"></a>10. Message Header Display</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ignore"></a>10.1. Selecting Headers</h3></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">ignore</code>   
503
522
<em class="replaceable"><code>pattern</code></em>
504
523
  [
505
524
<em class="replaceable"><code>pattern</code></em>
506
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unignore</code>  { 
 
525
...]<br /><code class="command">unignore</code>  { 
507
526
<em class="replaceable"><code>*</code></em>
508
527
  |   
509
528
<em class="replaceable"><code>pattern</code></em>
521
540
For example, if you do “<span class="quote">ignore x-</span>” it is possible to “<span class="quote">unignore x-mailer</span>”.
522
541
</p><p>
523
542
“<span class="quote">unignore *</span>” will remove all tokens from the ignore list.
524
 
</p><p>
525
 
For example:
526
 
</p><div class="example"><a id="ex-header-weeding"></a><p class="title"><b>Example 3.8. Header weeding</b></p><div class="example-contents"><pre class="screen">
 
543
</p><div class="example"><a id="ex-header-weeding"></a><p class="title"><b>Example 3.9. Header weeding</b></p><div class="example-contents"><pre class="screen">
527
544
# Sven's draconian header weeding
528
545
ignore *
529
546
unignore from date subject to cc
530
547
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
531
548
unignore posted-to:
532
 
</pre></div></div><br class="example-break" /><a id="hdr-order"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">hdr_order</code>   
 
549
</pre></div></div><br class="example-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="hdr-order"></a>10.2. Ordering Displayed Headers</h3></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">hdr_order</code>   
533
550
<em class="replaceable"><code>header</code></em>
534
551
  [
535
552
<em class="replaceable"><code>header</code></em>
536
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unhdr_order</code>  { 
 
553
...]<br /><code class="command">unhdr_order</code>  { 
537
554
<em class="replaceable"><code>*</code></em>
538
555
  |   
539
556
<em class="replaceable"><code>header</code></em>
540
557
... }</p></div><p>
541
 
With the <code class="literal">hdr_order</code> command you can specify an order in
542
 
which mutt will attempt to present these headers to you when viewing messages.
 
558
With the <span class="command"><strong>hdr_order</strong></span> command you can specify an order in
 
559
which Mutt will attempt to present these headers to you when viewing messages.
543
560
</p><p>
544
 
“<span class="quote">unhdr_order *</span>” will clear all previous headers from the order list,
 
561
“<span class="quote"><span class="command"><strong>unhdr_order</strong></span> *</span>” will clear all previous headers from the order list,
545
562
thus removing the header order effects set by the system-wide startup file.
546
 
</p><div class="example"><a id="ex-hdr-order"></a><p class="title"><b>Example 3.9. Configuring header display order</b></p><div class="example-contents"><pre class="screen">
 
563
</p><div class="example"><a id="ex-hdr-order"></a><p class="title"><b>Example 3.10. Configuring header display order</b></p><div class="example-contents"><pre class="screen">
547
564
hdr_order From Date: From: To: Cc: Subject:
548
 
</pre></div></div><br class="example-break" /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alternates"></a>11. Alternative addresses</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">alternates</code>  [
 
565
</pre></div></div><br class="example-break" /></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alternates"></a>11. Alternative Addresses</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">alternates</code>  [
549
566
<code class="option">-group</code>
550
567
<em class="replaceable"><code>name</code></em>
551
568
...]  
552
569
<em class="replaceable"><code>regexp</code></em>
553
570
  [
554
571
<em class="replaceable"><code>regexp</code></em>
555
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unalternates</code>  [
 
572
...]<br /><code class="command">unalternates</code>  [
556
573
<code class="option">-group</code>
557
574
<em class="replaceable"><code>name</code></em>
558
575
...] { 
560
577
  |   
561
578
<em class="replaceable"><code>regexp</code></em>
562
579
... }</p></div><p>
563
 
With various functions, mutt will treat messages differently,
 
580
With various functions, Mutt will treat messages differently,
564
581
depending on whether you sent them or whether you received them from
565
582
someone else.  For instance, when replying to a message that you
566
 
sent to a different party, mutt will automatically suggest to send
567
 
the response to the original message's recipients -- responding to
568
 
yourself won't make much sense in many cases.  (See <a class="link" href="reference.html#reply-to" title="3.243. reply_to">$reply_to</a>.)
 
583
sent to a different party, Mutt will automatically suggest to send
 
584
the response to the original message's recipients — responding to
 
585
yourself won't make much sense in many cases.  (See <a class="link" href="reference.html#reply-to" title="3.214. reply_to">$reply_to</a>.)
569
586
</p><p>
570
587
Many users receive e-mail under a number of different addresses. To
571
 
fully use mutt's features here, the program must be able to
 
588
fully use Mutt's features here, the program must be able to
572
589
recognize what e-mail addresses you receive mail under. That's the
573
 
purpose of the <code class="literal">alternates</code> command: It takes a list of regular
 
590
purpose of the <span class="command"><strong>alternates</strong></span> command: It takes a list of regular
574
591
expressions, each of which can identify an address under which you
575
592
receive e-mail.
576
593
</p><p>
580
597
</p><pre class="screen">
581
598
alternates user@example
582
599
</pre><p>
583
 
mutt will consider “<span class="quote"><code class="literal">some-user@example</code></span>” as
 
600
Mutt will consider “<span class="quote"><code class="literal">some-user@example</code></span>” as
584
601
being your address, too which may not be desired. As a solution, in such
585
602
cases addresses should be specified as:
586
603
</p><pre class="screen">
589
606
The <code class="literal">-group</code> flag causes all of the subsequent regular expressions
590
607
to be added to the named group.
591
608
</p><p>
592
 
The <code class="literal">unalternates</code> command can be used to write exceptions to
593
 
<code class="literal">alternates</code> patterns. If an address matches something in an
594
 
<code class="literal">alternates</code> command, but you nonetheless do not think it is
595
 
from you, you can list a more precise pattern under an <code class="literal">unalternates</code>
 
609
The <span class="command"><strong>unalternates</strong></span> command can be used to write exceptions to
 
610
<span class="command"><strong>alternates</strong></span> patterns. If an address matches something in an
 
611
<span class="command"><strong>alternates</strong></span> command, but you nonetheless do not think it is
 
612
from you, you can list a more precise pattern under an <span class="command"><strong>unalternates</strong></span>
596
613
command.
597
614
</p><p>
598
 
To remove a regular expression from the <code class="literal">alternates</code> list, use the
599
 
<code class="literal">unalternates</code> command with exactly the same <span class="emphasis"><em>regexp</em></span>.
600
 
Likewise, if the <span class="emphasis"><em>regexp</em></span> for an <code class="literal">alternates</code> command matches
601
 
an entry on the <code class="literal">unalternates</code> list, that <code class="literal">unalternates</code>
602
 
entry will be removed. If the <span class="emphasis"><em>regexp</em></span> for <code class="literal">unalternates</code>
603
 
is “<span class="quote">*</span>”, <span class="emphasis"><em>all entries</em></span> on <code class="literal">alternates</code> will be removed.
604
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="lists"></a>12. Mailing lists</h2></div></div></div><a id="subscribe"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">lists</code>  [
 
615
To remove a regular expression from the <span class="command"><strong>alternates</strong></span> list, use the
 
616
<span class="command"><strong>unalternates</strong></span> command with exactly the same <span class="emphasis"><em>regexp</em></span>.
 
617
Likewise, if the <span class="emphasis"><em>regexp</em></span> for an <span class="command"><strong>alternates</strong></span> command matches
 
618
an entry on the <span class="command"><strong>unalternates</strong></span> list, that <span class="command"><strong>unalternates</strong></span>
 
619
entry will be removed. If the <span class="emphasis"><em>regexp</em></span> for <span class="command"><strong>unalternates</strong></span>
 
620
is “<span class="quote">*</span>”, <span class="emphasis"><em>all entries</em></span> on <span class="command"><strong>alternates</strong></span> will be removed.
 
621
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="lists"></a>12. Mailing Lists</h2></div></div></div><a id="subscribe"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">lists</code>  [
605
622
<code class="option">-group</code>
606
623
<em class="replaceable"><code>name</code></em>
607
624
...]  
608
625
<em class="replaceable"><code>regexp</code></em>
609
626
  [
610
627
<em class="replaceable"><code>regexp</code></em>
611
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unlists</code>  [
 
628
...]<br /><code class="command">unlists</code>  [
612
629
<code class="option">-group</code>
613
630
<em class="replaceable"><code>name</code></em>
614
631
...] { 
615
632
<em class="replaceable"><code>*</code></em>
616
633
  |   
617
634
<em class="replaceable"><code>regexp</code></em>
618
 
... }</p></div><div class="cmdsynopsis"><p><code class="command">subscribe</code>  [
 
635
... }<br /><code class="command">subscribe</code>  [
619
636
<code class="option">-group</code>
620
637
<em class="replaceable"><code>name</code></em>
621
638
...]  
622
639
<em class="replaceable"><code>regexp</code></em>
623
640
  [
624
641
<em class="replaceable"><code>regexp</code></em>
625
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unsubscribe</code>  [
 
642
...]<br /><code class="command">unsubscribe</code>  [
626
643
<code class="option">-group</code>
627
644
<em class="replaceable"><code>name</code></em>
628
645
...] { 
632
649
... }</p></div><p>
633
650
Mutt has a few nice features for <a class="link" href="advancedusage.html#using-lists" title="8. Handling Mailing Lists">handling mailing lists</a>.  In order to take advantage of them, you must
634
651
specify which addresses belong to mailing lists, and which mailing
635
 
lists you are subscribed to.  Once you have done this, the <a class="link" href="gettingstarted.html#list-reply"><code class="literal">&lt;list-reply&gt;</code></a> function will work for all known lists.
636
 
Additionally, when you send a message to a subscribed list, mutt will
 
652
lists you are subscribed to. Mutt also has limited support for
 
653
auto-detecting mailing lists: it supports parsing
 
654
<code class="literal">mailto:</code> links in the common
 
655
<code class="literal">List-Post:</code> header which has the same effect as
 
656
specifying the list address via the <span class="command"><strong>lists</strong></span> command
 
657
(except the group feature). Once you have done this, the
 
658
<a class="link" href="gettingstarted.html#list-reply"><code class="literal">&lt;list-reply&gt;</code></a>
 
659
function will work for all known lists.
 
660
Additionally, when you send a message to a subscribed list, Mutt will
637
661
add a Mail-Followup-To header to tell other users' mail user agents
638
662
not to send copies of replies to your personal address.
639
663
</p><div class="note"><h3 class="title">Note</h3><p>
641
665
supported by all mail user agents.  Adding it is not bullet-proof against
642
666
receiving personal CCs of list messages.  Also note that the generation
643
667
of the Mail-Followup-To header is controlled by the
644
 
<a class="link" href="reference.html#followup-to" title="3.60. followup_to">$followup_to</a>
645
 
configuration variable.
 
668
<a class="link" href="reference.html#followup-to" title="3.68. followup_to">$followup_to</a>
 
669
configuration variable since it's common practice on some mailing lists
 
670
to send Cc upons replies (which is more a group- than a list-reply).
646
671
</p></div><p>
647
672
More precisely, Mutt maintains lists of patterns for the addresses
648
673
of known and subscribed mailing lists.  Every subscribed mailing
649
 
list is known. To mark a mailing list as known, use the “<span class="quote">lists</span>”
650
 
command.  To mark it as subscribed, use “<span class="quote">subscribe</span>”.
 
674
list is known. To mark a mailing list as known, use the <span class="command"><strong>list</strong></span>
 
675
command.  To mark it as subscribed, use <span class="command"><strong>subscribe</strong></span>.
651
676
</p><p>
652
 
You can use regular expressions with both commands.  To mark all
653
 
messages sent to a specific bug report's address on mutt's bug
 
677
You can use regular expressions with both commands. To mark all
 
678
messages sent to a specific bug report's address on Debian's bug
654
679
tracking system as list mail, for instance, you could say
655
 
“<span class="quote">subscribe [0-9]*@bugs.guug.de</span>”.  Often, it's sufficient to just
656
 
give a portion of the list's e-mail address.
 
680
</p><pre class="screen">
 
681
subscribe [0-9]*.*@bugs.debian.org</pre><p>
 
682
as it's often, it's sufficient to just give a portion of the list's e-mail address.
657
683
</p><p>
658
684
Specify as much of the address as you need to to remove ambiguity.  For
659
685
example, if you've subscribed to the Mutt mailing list, you will receive mail
660
 
addressed to <span class="emphasis"><em>mutt-users@mutt.org</em></span>.  So, to tell Mutt
661
 
that this is a mailing list, you could add “<span class="quote">lists mutt-users@</span>” to your
662
 
initialization file.  To tell mutt that you are subscribed to it,
663
 
add “<span class="quote">subscribe mutt-users</span>” to your initialization file instead.
 
686
addressed to <code class="literal">mutt-users@mutt.org</code>.  So, to tell Mutt
 
687
that this is a mailing list, you could add <code class="literal">lists mutt-users@</code> to your
 
688
initialization file.  To tell Mutt that you are subscribed to it,
 
689
add <code class="literal"><span class="command"><strong>subscribe</strong></span> mutt-users</code> to your initialization file instead.
664
690
If you also happen to get mail from someone whose address is
665
 
<span class="emphasis"><em>mutt-users@example.com</em></span>, you could use
666
 
“<span class="quote">lists ^mutt-users@mutt\\.org$</span>”
667
 
or “<span class="quote">subscribe ^mutt-users@mutt\\.org$</span>” to
 
691
<code class="literal">mutt-users@example.com</code>, you could use
 
692
<code class="literal"><span class="command"><strong>lists</strong></span> ^mutt-users@mutt\\.org$</code>
 
693
or <code class="literal"><span class="command"><strong>subscribe</strong></span> ^mutt-users@mutt\\.org$</code> to
668
694
match only mail from the actual list.
669
695
</p><p>
670
696
The <code class="literal">-group</code> flag adds all of the subsequent regular expressions
675
701
tokens.
676
702
</p><p>
677
703
To remove a mailing list from the list of subscribed mailing lists,
678
 
but keep it on the list of known mailing lists, use “<span class="quote">unsubscribe</span>”.
679
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="mbox-hook"></a>13. Using Multiple spool mailboxes</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">mbox-hook</code>   
 
704
but keep it on the list of known mailing lists, use <span class="command"><strong>unsubscribe</strong></span>.
 
705
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="mbox-hook"></a>13. Using Multiple Spool Mailboxes</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">mbox-hook</code>   
680
706
<em class="replaceable"><code>[!]pattern</code></em>
681
707
   
682
708
<em class="replaceable"><code>mailbox</code></em>
690
716
Unlike some of the other <span class="emphasis"><em>hook</em></span> commands, only the <span class="emphasis"><em>first</em></span> matching
691
717
pattern is used (it is not possible to save read mail in more than a single
692
718
mailbox).
693
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="mailboxes"></a>14. Monitoring incoming mail</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">mailboxes</code>   
 
719
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="mailboxes"></a>14. Monitoring Incoming Mail</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">mailboxes</code>   
694
720
<em class="replaceable"><code>mailbox</code></em>
695
721
  [
696
722
<em class="replaceable"><code>mailbox</code></em>
697
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unmailboxes</code>  { 
 
723
...]<br /><code class="command">unmailboxes</code>  { 
698
724
<em class="replaceable"><code>*</code></em>
699
725
  |   
700
726
<em class="replaceable"><code>mailbox</code></em>
705
731
<span class="emphasis"><em>folder</em></span> can either be a local file or directory
706
732
(Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP
707
733
support, <span class="emphasis"><em>folder</em></span> can also be a POP/IMAP folder
708
 
URL. The URL syntax is described in <a class="xref" href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a>,
 
734
URL. The URL syntax is described in <a class="xref" href="optionalfeatures.html#url-syntax" title="1.2. URL Syntax">Section 1.2, “URL Syntax”</a>,
709
735
POP and IMAP are described in <a class="xref" href="optionalfeatures.html#pop" title="3. POP3 Support">Section 3, “POP3 Support”</a> and <a class="xref" href="optionalfeatures.html#imap" title="4. IMAP Support">Section 4, “IMAP Support”</a>
710
736
respectively.
711
737
</p><p>
718
744
of folders which receive mail. Use “<span class="quote">unmailboxes *</span>” to remove all
719
745
tokens.
720
746
</p><div class="note"><h3 class="title">Note</h3><p>
721
 
The folders in the <code class="literal">mailboxes</code> command are resolved when
 
747
The folders in the <span class="command"><strong>mailboxes</strong></span> command are resolved when
722
748
the command is executed, so if these names contain <a class="link" href="advancedusage.html#shortcuts" title="7. Mailbox Shortcuts">shortcut characters</a> (such as “<span class="quote">=</span>” and “<span class="quote">!</span>”), any variable
723
 
definition that affects these characters (like <a class="link" href="reference.html#folder" title="3.58. folder">$folder</a> and <a class="link" href="reference.html#spoolfile" title="3.277. spoolfile">$spoolfile</a>)
724
 
should be set before the <code class="literal">mailboxes</code> command. If
 
749
definition that affects these characters (like <a class="link" href="reference.html#folder" title="3.66. folder">$folder</a> and <a class="link" href="reference.html#spoolfile" title="3.269. spoolfile">$spoolfile</a>)
 
750
should be set before the <span class="command"><strong>mailboxes</strong></span> command. If
725
751
none of these shorcuts are used, a local path should be absolute as
726
 
otherwise mutt tries to find it relative to the directory
727
 
from where mutt was started which may not always be desired.
 
752
otherwise Mutt tries to find it relative to the directory
 
753
from where Mutt was started which may not always be desired.
728
754
</p></div><p>
729
755
For Mbox and Mmdf folders, new mail is detected by comparing access and/or
730
756
modification times of files: Mutt assumes a folder has new mail if it wasn't
737
763
</p><p>
738
764
In cases where new mail detection for Mbox or Mmdf folders appears to be
739
765
unreliable, the
740
 
<a class="link" href="reference.html#check-mbox-size" title="3.24. check_mbox_size">$check_mbox_size</a>
 
766
<a class="link" href="reference.html#check-mbox-size" title="3.26. check_mbox_size">$check_mbox_size</a>
741
767
option can be used to make Mutt track and consult file sizes for new
742
 
mail detection instead.
743
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="my-hdr"></a>15. User defined headers</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">my_hdr</code>   
 
768
mail detection instead which won't work for size-neutral changes.
 
769
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="my-hdr"></a>15. User-Defined Headers</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">my_hdr</code>   
744
770
<em class="replaceable"><code>string</code></em>
745
 
 </p></div><div class="cmdsynopsis"><p><code class="command">unmy_hdr</code>  { 
 
771
 <br /><code class="command">unmy_hdr</code>  { 
746
772
<em class="replaceable"><code>*</code></em>
747
773
  |   
748
774
<em class="replaceable"><code>field</code></em>
749
775
... }</p></div><p>
750
 
The <code class="literal">my_hdr</code> command allows you to create your own header
751
 
fields which will be added to every message you send.
 
776
The <span class="command"><strong>my_hdr</strong></span> command allows you to create your own header
 
777
fields which will be added to every message you send and appear in the
 
778
editor if <a class="link" href="reference.html#edit-headers" title="3.57. edit_headers">$edit_headers</a> is set.
752
779
</p><p>
753
780
For example, if you would like to add an “<span class="quote">Organization:</span>” header field to
754
 
all of your outgoing messages, you can put the command
755
 
</p><div class="example"><a id="ex-my-hdr"></a><p class="title"><b>Example 3.10. Defining custom headers</b></p><div class="example-contents"><pre class="screen">
 
781
all of your outgoing messages, you can put the command something like
 
782
shown in <a class="xref" href="configuration.html#ex-my-hdr" title="Example 3.11. Defining custom headers">Example 3.11, “Defining custom headers”</a> in your <code class="literal">.muttrc</code>.
 
783
</p><div class="example"><a id="ex-my-hdr"></a><p class="title"><b>Example 3.11. Defining custom headers</b></p><div class="example-contents"><pre class="screen">
756
784
my_hdr Organization: A Really Big Company, Anytown, USA
757
 
</pre></div></div><br class="example-break" /><p>
758
 
in your <code class="literal">.muttrc</code>.
759
 
</p><div class="note"><h3 class="title">Note</h3><p>
 
785
</pre></div></div><br class="example-break" /><div class="note"><h3 class="title">Note</h3><p>
760
786
Space characters are <span class="emphasis"><em>not</em></span> allowed between the keyword and
761
787
the colon (“<span class="quote">:</span>”). The standard for electronic mail (RFC2822) says that
762
788
space is illegal there, so Mutt enforces the rule.
763
789
</p></div><p>
764
790
If you would like to add a header field to a single message, you should
765
 
either set the <a class="link" href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable,
 
791
either set the <a class="link" href="reference.html#edit-headers" title="3.57. edit_headers">$edit_headers</a> variable,
766
792
or use the <code class="literal">&lt;edit-headers&gt;</code> function (default: “<span class="quote">E</span>”) in the compose menu so
767
793
that you can edit the header of your message along with the body.
768
794
</p><p>
769
 
To remove user defined header fields, use the <code class="literal">unmy_hdr</code>
 
795
To remove user defined header fields, use the <span class="command"><strong>unmy_hdr</strong></span>
770
796
command. You may specify an asterisk (“<span class="quote">*</span>”) to remove all header
771
797
fields, or the fields to remove. For example, to remove all “<span class="quote">To</span>” and
772
798
“<span class="quote">Cc</span>” header fields, you could use:
773
799
</p><pre class="screen">
774
800
unmy_hdr to cc
775
 
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="save-hook"></a>16. Specify default save mailbox</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">save-hook</code>   
 
801
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="save-hook"></a>16. Specify Default Save Mailbox</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">save-hook</code>   
776
802
<em class="replaceable"><code>[!]pattern</code></em>
777
803
   
778
804
<em class="replaceable"><code>mailbox</code></em>
783
809
on the exact format.
784
810
</p><p>
785
811
To provide more flexibility and good defaults, Mutt applies the
786
 
expandos of <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> to
 
812
expandos of <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> to
787
813
<span class="emphasis"><em>mailbox</em></span> after it was expanded.
788
 
</p><p>
789
 
Examples:
790
 
</p><div class="example"><a id="ex-save-hook-exando"></a><p class="title"><b>Example 3.11. Using %-expandos in <code class="literal">save-hook</code></b></p><div class="example-contents"><pre class="screen">
 
814
</p><div class="example"><a id="ex-save-hook-exando"></a><p class="title"><b>Example 3.12. Using %-expandos in <span class="command">save-hook</span></b></p><div class="example-contents"><pre class="screen">
791
815
# default: save all to ~/Mail/&lt;author name&gt;
792
816
save-hook . ~/Mail/%F
793
817
 
797
821
# save from aol.com to $folder/spam
798
822
save-hook aol\\.com$ +spam
799
823
</pre></div></div><br class="example-break" /><p>
800
 
Also see the <a class="link" href="configuration.html#fcc-save-hook" title="18. Specify default save filename and default Fcc: mailbox at once">fcc-save-hook</a> command.
801
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fcc-hook"></a>17. Specify default Fcc: mailbox when composing</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">fcc-hook</code>   
 
824
Also see the <a class="link" href="configuration.html#fcc-save-hook" title="18. Specify Default Save Filename and Default Fcc: Mailbox at Once"><span class="command"><strong>fcc-save-hook</strong></span></a> command.
 
825
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fcc-hook"></a>17. Specify Default Fcc: Mailbox When Composing</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">fcc-hook</code>   
802
826
<em class="replaceable"><code>[!]pattern</code></em>
803
827
   
804
828
<em class="replaceable"><code>mailbox</code></em>
805
829
 </p></div><p>
806
830
This command is used to save outgoing mail in a mailbox other than
807
 
<a class="link" href="reference.html#record" title="3.240. record">$record</a>.  Mutt searches the initial list of
 
831
<a class="link" href="reference.html#record" title="3.211. record">$record</a>.  Mutt searches the initial list of
808
832
message recipients for the first matching <span class="emphasis"><em>regexp</em></span> and uses <span class="emphasis"><em>mailbox</em></span>
809
833
as the default Fcc: mailbox.  If no match is found the message will be saved
810
 
to <a class="link" href="reference.html#record" title="3.240. record">$record</a> mailbox.
 
834
to <a class="link" href="reference.html#record" title="3.211. record">$record</a> mailbox.
811
835
</p><p>
812
836
To provide more flexibility and good defaults, Mutt applies the
813
 
expandos of <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> to
 
837
expandos of <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> to
814
838
<span class="emphasis"><em>mailbox</em></span> after it was expanded.
815
839
</p><p>
816
840
See <a class="xref" href="advancedusage.html#pattern-hook" title="4.1. Message Matching in Hooks">Message Matching in Hooks</a> for information on the exact format of <span class="emphasis"><em>pattern</em></span>.
817
 
</p><p>
818
 
Example: <code class="literal">fcc-hook [@.]aol\\.com$ +spammers</code>
819
 
</p><p>
820
 
The above will save a copy of all messages going to the aol.com domain to
821
 
the `+spammers' mailbox by default.  Also see the <a class="link" href="configuration.html#fcc-save-hook" title="18. Specify default save filename and default Fcc: mailbox at once">fcc-save-hook</a> command.
822
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fcc-save-hook"></a>18. Specify default save filename and default Fcc: mailbox at once</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">fcc-save-hook</code>   
 
841
</p><pre class="screen">fcc-hook [@.]aol\\.com$ +spammers</pre><p>
 
842
...will save a copy of all messages going to the aol.com domain to
 
843
the `+spammers' mailbox by default.  Also see the <a class="link" href="configuration.html#fcc-save-hook" title="18. Specify Default Save Filename and Default Fcc: Mailbox at Once"><span class="command"><strong>fcc-save-hook</strong></span></a> command.
 
844
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fcc-save-hook"></a>18. Specify Default Save Filename and Default Fcc: Mailbox at Once</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">fcc-save-hook</code>   
823
845
<em class="replaceable"><code>[!]pattern</code></em>
824
846
   
825
847
<em class="replaceable"><code>mailbox</code></em>
826
848
 </p></div><p>
827
 
This command is a shortcut, equivalent to doing both a <a class="link" href="configuration.html#fcc-hook" title="17. Specify default Fcc: mailbox when composing">fcc-hook</a>
828
 
and a <a class="link" href="configuration.html#save-hook" title="16. Specify default save mailbox">save-hook</a> with its arguments,
 
849
This command is a shortcut, equivalent to doing both a <a class="link" href="configuration.html#fcc-hook" title="17. Specify Default Fcc: Mailbox When Composing"><span class="command"><strong>fcc-hook</strong></span></a>
 
850
and a <a class="link" href="configuration.html#save-hook" title="16. Specify Default Save Mailbox"><span class="command"><strong>save-hook</strong></span></a> with its arguments,
829
851
including %-expansion on <span class="emphasis"><em>mailbox</em></span> according
830
 
to <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a>.
831
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="send-hook"></a>19. Change settings based upon message recipients</h2></div></div></div><a id="reply-hook"></a><a id="send2-hook"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">reply-hook</code>   
832
 
<em class="replaceable"><code>[!]pattern</code></em>
833
 
   
834
 
<em class="replaceable"><code>command</code></em>
835
 
 </p></div><div class="cmdsynopsis"><p><code class="command">send-hook</code>   
836
 
<em class="replaceable"><code>[!]pattern</code></em>
837
 
   
838
 
<em class="replaceable"><code>command</code></em>
839
 
 </p></div><div class="cmdsynopsis"><p><code class="command">send2-hook</code>   
 
852
to <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a>.
 
853
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="send-hook"></a>19. Change Settings Based Upon Message Recipients</h2></div></div></div><a id="reply-hook"></a><a id="send2-hook"></a><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">reply-hook</code>   
 
854
<em class="replaceable"><code>[!]pattern</code></em>
 
855
   
 
856
<em class="replaceable"><code>command</code></em>
 
857
 <br /><code class="command">send-hook</code>   
 
858
<em class="replaceable"><code>[!]pattern</code></em>
 
859
   
 
860
<em class="replaceable"><code>command</code></em>
 
861
 <br /><code class="command">send2-hook</code>   
840
862
<em class="replaceable"><code>[!]pattern</code></em>
841
863
   
842
864
<em class="replaceable"><code>command</code></em>
846
868
the message, see <a class="xref" href="advancedusage.html#pattern-hook" title="4.1. Message Matching in Hooks">Message Matching in Hooks</a> for details. <span class="emphasis"><em>command</em></span>
847
869
is executed when <span class="emphasis"><em>pattern</em></span> matches.
848
870
</p><p>
849
 
<code class="literal">reply-hook</code> is matched against the message you are <span class="emphasis"><em>replying to</em></span>,
850
 
instead of the message you are <span class="emphasis"><em>sending</em></span>.  <code class="literal">send-hook</code> is
 
871
<span class="command"><strong>reply-hook</strong></span> is matched against the message you are <span class="emphasis"><em>replying to</em></span>,
 
872
instead of the message you are <span class="emphasis"><em>sending</em></span>.  <span class="command"><strong>send-hook</strong></span> is
851
873
matched against all messages, both <span class="emphasis"><em>new</em></span>
852
874
and <span class="emphasis"><em>replies</em></span>.
853
875
</p><div class="note"><h3 class="title">Note</h3><p>
854
 
<code class="literal">reply-hook</code>s are matched <span class="bold"><strong>before</strong></span> the <code class="literal">send-hook</code>, <span class="bold"><strong>regardless</strong></span>
 
876
<span class="command"><strong>reply-hook</strong></span>s are matched <span class="emphasis"><em>before</em></span> the <span class="command"><strong>send-hook</strong></span>, <span class="emphasis"><em>regardless</em></span>
855
877
of the order specified in the user's configuration file.
856
878
</p></div><p>
857
 
<code class="literal">send2-hook</code> is matched every time a message is changed, either
 
879
<span class="command"><strong>send2-hook</strong></span> is matched every time a message is changed, either
858
880
by editing it, or by using the compose menu to change its recipients
859
 
or subject.  <code class="literal">send2-hook</code> is executed after <code class="literal">send-hook</code>, and
860
 
can, e.g., be used to set parameters such as the <a class="link" href="reference.html#sendmail" title="3.258. sendmail">$sendmail</a> variable depending on the message's sender
 
881
or subject.  <span class="command"><strong>send2-hook</strong></span> is executed after <span class="command"><strong>send-hook</strong></span>, and
 
882
can, e.g., be used to set parameters such as the <a class="link" href="reference.html#sendmail" title="3.230. sendmail">$sendmail</a> variable depending on the message's sender
861
883
address.
862
884
</p><p>
863
 
For each type of <code class="literal">send-hook</code> or <code class="literal">reply-hook</code>, when multiple matches
864
 
occur, commands are executed in the order they are specified in the muttrc
 
885
For each type of <span class="command"><strong>send-hook</strong></span> or <span class="command"><strong>reply-hook</strong></span>, when multiple matches
 
886
occur, commands are executed in the order they are specified in the <code class="literal">.muttrc</code>
865
887
(for that type of hook).
866
888
</p><p>
867
 
Example: <code class="literal">send-hook mutt "set mime_forward signature=''"</code>
 
889
Example: <code class="literal"><span class="command"><strong>send-hook</strong></span> mutt "<span class="command"><strong>set</strong></span> mime_forward signature=''"</code>
868
890
</p><p>
869
891
Another typical use for this command is to change the values of the
870
 
<a class="link" href="reference.html#attribution" title="3.16. attribution">$attribution</a>, <a class="link" href="reference.html#signature" title="3.263. signature">$signature</a> and <a class="link" href="reference.html#locale" title="3.104. locale">$locale</a>
 
892
<a class="link" href="reference.html#attribution" title="3.16. attribution">$attribution</a>, <a class="link" href="reference.html#signature" title="3.235. signature">$signature</a> and <a class="link" href="reference.html#locale" title="3.117. locale">$locale</a>
871
893
variables in order to change the language of the attributions and
872
894
signatures based upon the recipients.
873
895
</p><div class="note"><h3 class="title">Note</h3><p>
874
 
send-hook's are only executed once after getting the initial
875
 
list of recipients.  Adding a recipient after replying or editing the
876
 
message will not cause any send-hook to be executed.  Also note that
877
 
<code class="literal">my_hdr</code> commands which modify recipient headers, or the message's
878
 
subject, don't have any effect on the current message when executed
879
 
from a send-hook.
880
 
</p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="message-hook"></a>20. Change settings before formatting a message</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">message-hook</code>   
 
896
<span class="command"><strong>send-hook</strong></span>'s are only executed once after getting the
 
897
initial list of recipients.  Adding a recipient after replying or
 
898
editing the message will not cause any <span class="command"><strong>send-hook</strong></span> to be executed,
 
899
similarily if <a class="link" href="reference.html#autoedit" title="3.18. autoedit">$autoedit</a> is set
 
900
(as then the initial list of recipients is empty). Also note that <a class="link" href="configuration.html#my-hdr" title="15. User-Defined Headers"><span class="command"><strong>my_hdr</strong></span></a> commands which
 
901
modify recipient headers, or the message's subject, don't have any
 
902
effect on the current message when executed from a
 
903
<span class="command"><strong>send-hook</strong></span>.
 
904
</p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="message-hook"></a>20. Change Settings Before Formatting a Message</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">message-hook</code>   
881
905
<em class="replaceable"><code>[!]pattern</code></em>
882
906
   
883
907
<em class="replaceable"><code>command</code></em>
886
910
before viewing or formatting a message based upon information about the message.
887
911
<span class="emphasis"><em>command</em></span> is executed if the <span class="emphasis"><em>pattern</em></span> matches the message to be
888
912
displayed. When multiple matches occur, commands are executed in the order
889
 
they are specified in the muttrc.
 
913
they are specified in the <code class="literal">.muttrc</code>.
890
914
</p><p>
891
915
See <a class="xref" href="advancedusage.html#pattern-hook" title="4.1. Message Matching in Hooks">Message Matching in Hooks</a> for
892
916
information on the exact format of <span class="emphasis"><em>pattern</em></span>.
895
919
</p><pre class="screen">
896
920
message-hook ~A 'set pager=builtin'
897
921
message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject: .*\""'
898
 
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="crypt-hook"></a>21. Choosing the cryptographic key of the recipient</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">crypt-hook</code>   
 
922
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="crypt-hook"></a>21. Choosing the Cryptographic Key of the Recipient</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">crypt-hook</code>   
899
923
<em class="replaceable"><code>pattern</code></em>
900
924
   
901
925
<em class="replaceable"><code>keyid</code></em>
904
928
key with a given e-mail address automatically, either because the
905
929
recipient's public key can't be deduced from the destination address,
906
930
or because, for some reasons, you need to override the key Mutt would
907
 
normally use.  The <code class="literal">crypt-hook</code> command provides a
 
931
normally use.  The <span class="command"><strong>crypt-hook</strong></span> command provides a
908
932
method by which you can specify the ID of the public key to be used
909
933
when encrypting messages to a certain recipient.
910
934
</p><p>
911
935
The meaning of <span class="emphasis"><em>keyid</em></span> is to be taken broadly in this context:  You
912
936
can either put a numerical key ID here, an e-mail address, or even
913
937
just a real name.
914
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="push"></a>22. Adding key sequences to the keyboard buffer</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">push</code>   
 
938
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="push"></a>22. Adding Key Sequences to the Keyboard Buffer</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">push</code>   
915
939
<em class="replaceable"><code>string</code></em>
916
940
 </p></div><p>
917
941
This command adds the named string to the keyboard buffer. The string may
918
942
contain control characters, key names and function names like the sequence
919
 
string in the <a class="link" href="configuration.html#macro" title="8. Keyboard macros">macro</a> command. You may use it to
 
943
string in the <a class="link" href="configuration.html#macro" title="8. Keyboard Macros">macro</a> command. You may use it to
920
944
automatically run a sequence of commands at startup, or when entering
921
 
certain folders. For example, the following command will automatically
922
 
collapse all threads when entering a folder:
923
 
</p><div class="example"><a id="ex-folder-hook-push"></a><p class="title"><b>Example 3.12. Embedding <code class="literal">push</code> in <code class="literal">folder-hook</code></b></p><div class="example-contents"><pre class="screen">
 
945
certain folders. For example, <a class="xref" href="configuration.html#ex-folder-hook-push" title="Example 3.13. Embedding push in folder-hook">Example 3.13, “Embedding push in folder-hook”</a>
 
946
shows how to automatically collapse all threads when entering a folder.
 
947
</p><div class="example"><a id="ex-folder-hook-push"></a><p class="title"><b>Example 3.13. Embedding <span class="command">push</span> in <span class="command">folder-hook</span></b></p><div class="example-contents"><pre class="screen">
924
948
folder-hook . 'push &lt;collapse-all&gt;'
925
 
</pre></div></div><br class="example-break" /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="exec"></a>23. Executing functions</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">exec</code>   
 
949
</pre></div></div><br class="example-break" /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="exec"></a>23. Executing Functions</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">exec</code>   
926
950
<em class="replaceable"><code>function</code></em>
927
951
  [
928
952
<em class="replaceable"><code>function</code></em>
929
953
...]</p></div><p>
930
954
This command can be used to execute any function. Functions are
931
955
listed in the <a class="link" href="reference.html#functions" title="4. Functions">function reference</a>.
932
 
“<span class="quote">exec function</span>” is equivalent to “<span class="quote">push &lt;function&gt;</span>”.
 
956
“<span class="quote"><span class="command"><strong>exec</strong></span><code class="literal">function</code></span>” is equivalent to
 
957
“<span class="quote"><code class="literal">push &lt;function&gt;</code></span>”.
933
958
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="score-command"></a>24. Message Scoring</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">score</code>   
934
959
<em class="replaceable"><code>pattern</code></em>
935
960
   
936
961
<em class="replaceable"><code>value</code></em>
937
 
 </p></div><div class="cmdsynopsis"><p><code class="command">unscore</code>  { 
 
962
 <br /><code class="command">unscore</code>  { 
938
963
<em class="replaceable"><code>*</code></em>
939
964
  |   
940
965
<em class="replaceable"><code>pattern</code></em>
941
966
... }</p></div><p>
942
 
The <code class="literal">score</code> commands adds <span class="emphasis"><em>value</em></span> to a message's score if <span class="emphasis"><em>pattern</em></span>
 
967
The <span class="command"><strong>score</strong></span> commands adds <span class="emphasis"><em>value</em></span> to a message's score if <span class="emphasis"><em>pattern</em></span>
943
968
matches it.  <span class="emphasis"><em>pattern</em></span> is a string in the format described in the <a class="link" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> section (note: For efficiency reasons, patterns
944
969
which scan information not available in the index, such as <code class="literal">˜b</code>,
945
970
<code class="literal">˜B</code> or <code class="literal">˜h</code>, may not be used).  <span class="emphasis"><em>value</em></span> is a
946
971
positive or negative integer.  A message's final score is the sum total of all
947
 
matching <code class="literal">score</code> entries.  However, you may optionally prefix <span class="emphasis"><em>value</em></span> with
948
 
an equal sign (=) to cause evaluation to stop at a particular entry if there is
 
972
matching <span class="command"><strong>score</strong></span> entries.  However, you may optionally prefix <span class="emphasis"><em>value</em></span> with
 
973
an equal sign (“<span class="quote">=</span>”) to cause evaluation to stop at a particular entry if there is
949
974
a match.  Negative final scores are rounded up to 0.
950
975
</p><p>
951
 
The <code class="literal">unscore</code> command removes score entries from the list.  You <span class="bold"><strong>must</strong></span>
952
 
specify the same pattern specified in the <code class="literal">score</code> command for it to be
 
976
The <span class="command"><strong>unscore</strong></span> command removes score entries from the list.  You <span class="emphasis"><em>must</em></span>
 
977
specify the same pattern specified in the <span class="command"><strong>score</strong></span> command for it to be
953
978
removed.  The pattern “<span class="quote">*</span>” is a special token which means to clear the list
954
979
of all score entries.
955
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="spam"></a>25. Spam detection</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">spam</code>   
 
980
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="spam"></a>25. Spam Detection</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">spam</code>   
956
981
<em class="replaceable"><code>pattern</code></em>
957
982
   
958
983
<em class="replaceable"><code>format</code></em>
959
 
 </p></div><div class="cmdsynopsis"><p><code class="command">nospam</code>  { 
 
984
 <br /><code class="command">nospam</code>  { 
960
985
<em class="replaceable"><code>*</code></em>
961
986
  |   
962
987
<em class="replaceable"><code>pattern</code></em>
963
988
 }</p></div><p>
964
989
Mutt has generalized support for external spam-scoring filters.
965
 
By defining your spam patterns with the <code class="literal">spam</code> and <code class="literal">nospam</code>
 
990
By defining your spam patterns with the <span class="command"><strong>spam</strong></span> and <code class="literal">nospam</code>
966
991
commands, you can <span class="emphasis"><em>limit</em></span>, <span class="emphasis"><em>search</em></span>, and <span class="emphasis"><em>sort</em></span> your
967
992
mail based on its spam attributes, as determined by the external
968
993
filter. You also can display the spam attributes in your index
969
 
display using the <code class="literal">%H</code> selector in the <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> variable. (Tip: try <code class="literal">%?H?[%H] ?</code>
 
994
display using the <code class="literal">%H</code> selector in the <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> variable. (Tip: try <code class="literal">%?H?[%H] ?</code>
970
995
to display spam tags only when they are defined for a given message.)
971
996
</p><p>
972
997
Your first step is to define your external filter's spam patterns using
973
 
the <code class="literal">spam</code> command. <span class="emphasis"><em>pattern</em></span> should be a regular expression
 
998
the <span class="command"><strong>spam</strong></span> command. <span class="emphasis"><em>pattern</em></span> should be a regular expression
974
999
that matches a header in a mail message. If any message in the mailbox
975
1000
matches this regular expression, it will receive a “<span class="quote">spam tag</span>” or
976
 
“<span class="quote">spam attribute</span>” (unless it also matches a <code class="literal">nospam</code> pattern -- see
 
1001
“<span class="quote">spam attribute</span>” (unless it also matches a <span class="command"><strong>nospam</strong></span> pattern — see
977
1002
below.) The appearance of this attribute is entirely up to you, and is
978
1003
governed by the <span class="emphasis"><em>format</em></span> parameter. <span class="emphasis"><em>format</em></span> can be any static
979
1004
text, but it also can include back-references from the <span class="emphasis"><em>pattern</em></span>
981
1006
sub-expression contained within parentheses.) <code class="literal">%1</code> is replaced with
982
1007
the first back-reference in the regex, <code class="literal">%2</code> with the second, etc.
983
1008
</p><p>
 
1009
To match spam tags, mutt needs the corresponding header information
 
1010
which is always the case for local and POP folders but not for IMAP in
 
1011
the default configuration. Depending on the spam header to be analyzed,
 
1012
<a class="link" href="reference.html#imap-headers" title="3.99. imap_headers">$imap_headers</a> may need
 
1013
to be adjusted.
 
1014
</p><p>
984
1015
If you're using multiple spam filters, a message can have more than
985
 
one spam-related header. You can define <code class="literal">spam</code> patterns for each
 
1016
one spam-related header. You can define <span class="command"><strong>spam</strong></span> patterns for each
986
1017
filter you use. If a message matches two or more of these patterns, and
987
 
the $spam_separator variable is set to a string, then the
 
1018
the <a class="link" href="reference.html#spam-separator" title="3.268. spam_separator">$spam_separator</a> variable is set to a string, then the
988
1019
message's spam tag will consist of all the <span class="emphasis"><em>format</em></span> strings joined
989
 
together, with the value of $spam_separator separating
 
1020
together, with the value of <a class="link" href="reference.html#spam-separator" title="3.268. spam_separator">$spam_separator</a> separating
990
1021
them.
991
1022
</p><p>
992
 
For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
993
 
define these spam settings:
994
 
</p><div class="example"><a id="ex-spam"></a><p class="title"><b>Example 3.13. Configuring spam detection</b></p><div class="example-contents"><pre class="screen">
 
1023
For example, suppose one uses DCC, SpamAssassin, and PureMessage, then
 
1024
the configuration might look like in <a class="xref" href="configuration.html#ex-spam" title="Example 3.14. Configuring spam detection">Example 3.14, “Configuring spam detection”</a>.
 
1025
</p><div class="example"><a id="ex-spam"></a><p class="title"><b>Example 3.14. Configuring spam detection</b></p><div class="example-contents"><pre class="screen">
995
1026
spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
996
1027
spam "X-Spam-Status: Yes"                     "90+/SA"
997
1028
spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
998
1029
set spam_separator=", "
999
1030
</pre></div></div><br class="example-break" /><p>
1000
 
If I then received a message that DCC registered with “<span class="quote">many</span>” hits
 
1031
If then a message is received that DCC registered with “<span class="quote">many</span>” hits
1001
1032
under the “<span class="quote">Fuz2</span>” checksum, and that PureMessage registered with a
1002
1033
97% probability of being spam, that message's spam tag would read
1003
1034
<code class="literal">90+/DCC-Fuz2, 97/PM</code>. (The four characters before “<span class="quote">=many</span>” in a
1004
 
DCC report indicate the checksum used -- in this case, “<span class="quote">Fuz2</span>”.)
 
1035
DCC report indicate the checksum used — in this case, “<span class="quote">Fuz2</span>”.)
1005
1036
</p><p>
1006
 
If the $spam_separator variable is unset, then each
 
1037
If the <a class="link" href="reference.html#spam-separator" title="3.268. spam_separator">$spam_separator</a> variable is unset, then each
1007
1038
spam pattern match supersedes the previous one. Instead of getting
1008
1039
joined <span class="emphasis"><em>format</em></span> strings, you'll get only the last one to match.
1009
1040
</p><p>
1010
1041
The spam tag is what will be displayed in the index when you use
1011
 
<code class="literal">%H</code> in the <code class="literal">$index_format</code> variable. It's also the
 
1042
<code class="literal">%H</code> in the <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> variable. It's also the
1012
1043
string that the <code class="literal">˜H</code> pattern-matching expression matches against for
1013
1044
<code class="literal">&lt;search&gt;</code> and <code class="literal">&lt;limit&gt;</code> functions. And it's what sorting by spam
1014
1045
attribute will use as a sort key.
1015
1046
</p><p>
1016
1047
That's a pretty complicated example, and most people's actual
1017
1048
environments will have only one spam filter. The simpler your
1018
 
configuration, the more effective mutt can be, especially when it comes
 
1049
configuration, the more effective Mutt can be, especially when it comes
1019
1050
to sorting.
1020
1051
</p><p>
1021
 
Generally, when you sort by spam tag, mutt will sort <span class="emphasis"><em>lexically</em></span> --
 
1052
Generally, when you sort by spam tag, Mutt will sort <span class="emphasis"><em>lexically</em></span> —
1022
1053
that is, by ordering strings alphanumerically. However, if a spam tag
1023
 
begins with a number, mutt will sort numerically first, and lexically
 
1054
begins with a number, Mutt will sort numerically first, and lexically
1024
1055
only when two numbers are equal in value. (This is like UNIX's
1025
 
<code class="literal">sort -n</code>.) A message with no spam attributes at all -- that is, one
1026
 
that didn't match <span class="emphasis"><em>any</em></span> of your <code class="literal">spam</code> patterns -- is sorted at
 
1056
<code class="literal">sort -n</code>.) A message with no spam attributes at all — that is, one
 
1057
that didn't match <span class="emphasis"><em>any</em></span> of your <span class="command"><strong>spam</strong></span> patterns — is sorted at
1027
1058
lowest priority. Numbers are sorted next, beginning with 0 and ranging
1028
1059
upward. Finally, non-numeric strings are sorted, with “<span class="quote">a</span>” taking lower
1029
1060
priority than “<span class="quote">z</span>”. Clearly, in general, sorting by spam tags is most
1030
1061
effective when you can coerce your filter to give you a raw number. But
1031
 
in case you can't, mutt can still do something useful.
 
1062
in case you can't, Mutt can still do something useful.
1032
1063
</p><p>
1033
 
The <code class="literal">nospam</code> command can be used to write exceptions to <code class="literal">spam</code>
1034
 
patterns. If a header pattern matches something in a <code class="literal">spam</code> command,
 
1064
The <span class="command"><strong>nospam</strong></span> command can be used to write exceptions to <span class="command"><strong>spam</strong></span>
 
1065
patterns. If a header pattern matches something in a <span class="command"><strong>spam</strong></span> command,
1035
1066
but you nonetheless do not want it to receive a spam tag, you can list a
1036
 
more precise pattern under a <code class="literal">nospam</code> command.
 
1067
more precise pattern under a <span class="command"><strong>nospam</strong></span> command.
1037
1068
</p><p>
1038
 
If the <span class="emphasis"><em>pattern</em></span> given to <code class="literal">nospam</code> is exactly the same as the
1039
 
<span class="emphasis"><em>pattern</em></span> on an existing <code class="literal">spam</code> list entry, the effect will be to
 
1069
If the <span class="emphasis"><em>pattern</em></span> given to <span class="command"><strong>nospam</strong></span> is exactly the same as the
 
1070
<span class="emphasis"><em>pattern</em></span> on an existing <span class="command"><strong>spam</strong></span> list entry, the effect will be to
1040
1071
remove the entry from the spam list, instead of adding an exception.
1041
 
Likewise, if the <span class="emphasis"><em>pattern</em></span> for a <code class="literal">spam</code> command matches an entry
1042
 
on the <code class="literal">nospam</code> list, that <code class="literal">nospam</code> entry will be removed. If the
1043
 
<span class="emphasis"><em>pattern</em></span> for <code class="literal">nospam</code> is “<span class="quote">*</span>”, <span class="emphasis"><em>all entries on both lists</em></span>
1044
 
will be removed. This might be the default action if you use <code class="literal">spam</code>
1045
 
and <code class="literal">nospam</code> in conjunction with a <code class="literal">folder-hook</code>.
 
1072
Likewise, if the <span class="emphasis"><em>pattern</em></span> for a <span class="command"><strong>spam</strong></span> command matches an entry
 
1073
on the <span class="command"><strong>nospam</strong></span> list, that nospam entry will be removed. If the
 
1074
<span class="emphasis"><em>pattern</em></span> for <span class="command"><strong>nospam</strong></span> is “<span class="quote">*</span>”, <span class="emphasis"><em>all entries on both lists</em></span>
 
1075
will be removed. This might be the default action if you use <span class="command"><strong>spam</strong></span>
 
1076
and <span class="command"><strong>nospam</strong></span> in conjunction with a <span class="command"><strong>folder-hook</strong></span>.
1046
1077
</p><p>
1047
 
You can have as many <code class="literal">spam</code> or <code class="literal">nospam</code> commands as you like.
1048
 
You can even do your own primitive spam detection within mutt -- for
 
1078
You can have as many <span class="command"><strong>spam</strong></span> or <span class="command"><strong>nospam</strong></span> commands as you like.
 
1079
You can even do your own primitive <span class="command"><strong>spam</strong></span> detection within Mutt — for
1049
1080
example, if you consider all mail from <code class="literal">MAILER-DAEMON</code> to be spam,
1050
 
you can use a <code class="literal">spam</code> command like this:
 
1081
you can use a <span class="command"><strong>spam</strong></span> command like this:
1051
1082
</p><pre class="screen">
1052
1083
spam "^From: .*MAILER-DAEMON"       "999"
1053
 
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="set"></a>26. Setting and Querying Variables</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="set-commands"></a>26.1. Commands</h3></div></div></div><p>
 
1084
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="set"></a>26. Setting and Querying Variables</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="var-types"></a>26.1. Variable Types</h3></div></div></div><p>
 
1085
Mutt supports these types of configuration variables:
 
1086
</p><div class="variablelist"><dl><dt><span class="term">boolean</span></dt><dd><p>
 
1087
A boolean expression, either “<span class="quote">yes</span>” or “<span class="quote">no</span>”.
 
1088
</p></dd><dt><span class="term">number</span></dt><dd><p>
 
1089
A signed integer number in the range -32768 to 32767.
 
1090
</p></dd><dt><span class="term">string</span></dt><dd><p>
 
1091
Arbitrary text.
 
1092
</p></dd><dt><span class="term">path</span></dt><dd><p>
 
1093
A specialized string for representing paths including support for
 
1094
mailbox shortcuts (see <a class="xref" href="advancedusage.html#shortcuts" title="7. Mailbox Shortcuts">Section 7, “Mailbox Shortcuts”</a>) as well as tilde
 
1095
(“<span class="quote">˜</span>”) for a user's home directory and more.
 
1096
</p></dd><dt><span class="term">quadoption</span></dt><dd><p>
 
1097
Like a boolean but triggers a prompt when set to “<span class="quote">ask-yes</span>”
 
1098
or “<span class="quote">ask-no</span>” with “<span class="quote">yes</span>” and “<span class="quote">no</span>”
 
1099
preselected respectively.
 
1100
</p></dd><dt><span class="term">sort order</span></dt><dd><p>
 
1101
A specialized string allowing only particular words as values depending
 
1102
on the variable.
 
1103
</p></dd><dt><span class="term">regular expression</span></dt><dd><p>
 
1104
A regular expression, see <a class="xref" href="advancedusage.html#regexp" title="1. Regular Expressions">Section 1, “Regular Expressions”</a> for an introduction.
 
1105
</p></dd><dt><span class="term">folder magic</span></dt><dd><p>
 
1106
Specifies the type of folder to use: <span class="emphasis"><em>mbox</em></span>,
 
1107
<span class="emphasis"><em>mmdf</em></span>, <span class="emphasis"><em>mh</em></span>
 
1108
or <span class="emphasis"><em>maildir</em></span>.
 
1109
Currently only used to determine the type for newly created folders.
 
1110
</p></dd><dt><span class="term">e-mail address</span></dt><dd><p>
 
1111
An e-mail address either with or without
 
1112
realname. The older “<span class="quote"><code class="literal">user@example.org (Joe User)</code></span>”
 
1113
form is supported but strongly deprecated.
 
1114
</p></dd><dt><span class="term">user-defined</span></dt><dd><p>
 
1115
Arbitrary text, see <a class="xref" href="configuration.html#set-myvar" title="26.3. User-Defined Variables">Section 26.3, “User-Defined Variables”</a> for details.
 
1116
</p></dd></dl></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="set-commands"></a>26.2. Commands</h3></div></div></div><p>
1054
1117
The following commands are available to manipulate and query variables:
1055
1118
</p><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">set</code>  { 
1056
1119
[ <code class="option">no</code>  |   <code class="option">inv</code> ]
1057
1120
<em class="replaceable"><code>variable</code></em>
1058
1121
  |   
1059
1122
<em class="replaceable"><code>variable=value</code></em>
1060
 
 } [...]</p></div><div class="cmdsynopsis"><p><code class="command">toggle</code>   
1061
 
<em class="replaceable"><code>variable</code></em>
1062
 
  [
1063
 
<em class="replaceable"><code>variable</code></em>
1064
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">unset</code>   
1065
 
<em class="replaceable"><code>variable</code></em>
1066
 
  [
1067
 
<em class="replaceable"><code>variable</code></em>
1068
 
...]</p></div><div class="cmdsynopsis"><p><code class="command">reset</code>   
 
1123
 } [...]<br /><code class="command">toggle</code>   
 
1124
<em class="replaceable"><code>variable</code></em>
 
1125
  [
 
1126
<em class="replaceable"><code>variable</code></em>
 
1127
...]<br /><code class="command">unset</code>   
 
1128
<em class="replaceable"><code>variable</code></em>
 
1129
  [
 
1130
<em class="replaceable"><code>variable</code></em>
 
1131
...]<br /><code class="command">reset</code>   
1069
1132
<em class="replaceable"><code>variable</code></em>
1070
1133
  [
1071
1134
<em class="replaceable"><code>variable</code></em>
1072
1135
...]</p></div><p>
1073
 
This command is used to set (and unset) <a class="link" href="reference.html#variables" title="3. Configuration variables">configuration variables</a>.  There are four basic types of variables:
 
1136
This command is used to set (and unset) <a class="link" href="reference.html#variables" title="3. Configuration Variables">configuration variables</a>.  There are four basic types of variables:
1074
1137
boolean, number, string and quadoption.  <span class="emphasis"><em>boolean</em></span> variables can be
1075
1138
<span class="emphasis"><em>set</em></span> (true) or <span class="emphasis"><em>unset</em></span> (false).  <span class="emphasis"><em>number</em></span> variables can be
1076
1139
assigned a positive integer value.
1085
1148
<span class="emphasis"><em>ask-yes</em></span> will cause a prompt with a default answer of “<span class="quote">yes</span>” and
1086
1149
<span class="emphasis"><em>ask-no</em></span> will provide a default answer of “<span class="quote">no.</span>”
1087
1150
</p><p>
1088
 
Prefixing a variable with “<span class="quote">no</span>” will unset it.  Example: <code class="literal">set noaskbcc</code>.
 
1151
Prefixing a variable with “<span class="quote">no</span>” will unset it.  Example: <code class="literal"><span class="command"><strong>set</strong></span> noaskbcc</code>.
1089
1152
</p><p>
1090
1153
For <span class="emphasis"><em>boolean</em></span> variables, you may optionally prefix the variable name with
1091
1154
<code class="literal">inv</code> to toggle the value (on or off).  This is useful when writing
1092
 
macros.  Example: <code class="literal">set invsmart_wrap</code>.
 
1155
macros.  Example: <code class="literal"><span class="command"><strong>set</strong></span> invsmart_wrap</code>.
1093
1156
</p><p>
1094
 
The <code class="literal">toggle</code> command automatically prepends the <code class="literal">inv</code> prefix to all
 
1157
The <span class="command"><strong>toggle</strong></span> command automatically prepends the <code class="literal">inv</code> prefix to all
1095
1158
specified variables.
1096
1159
</p><p>
1097
 
The <code class="literal">unset</code> command automatically prepends the <code class="literal">no</code> prefix to all
 
1160
The <span class="command"><strong>unset</strong></span> command automatically prepends the <code class="literal">no</code> prefix to all
1098
1161
specified variables.
1099
1162
</p><p>
1100
1163
Using the <code class="literal">&lt;enter-command&gt;</code> function in the <span class="emphasis"><em>index</em></span> menu, you can query the
1106
1169
The question mark is actually only required for boolean and quadoption
1107
1170
variables.
1108
1171
</p><p>
1109
 
The <code class="literal">reset</code> command resets all given variables to the compile time
 
1172
The <span class="command"><strong>reset</strong></span> command resets all given variables to the compile time
1110
1173
defaults (hopefully mentioned in this manual). If you use the command
1111
 
<code class="literal">set</code> and prefix the variable with “<span class="quote">&amp;</span>” this has the same
1112
 
behavior as the reset command.
 
1174
<span class="command"><strong>set</strong></span> and prefix the variable with “<span class="quote">&amp;</span>” this has the same
 
1175
behavior as the <span class="command"><strong>reset</strong></span> command.
1113
1176
</p><p>
1114
 
With the <code class="literal">reset</code> command there exists the special variable “<span class="quote">all</span>”,
 
1177
With the <span class="command"><strong>reset</strong></span> command there exists the special variable “<span class="quote">all</span>”,
1115
1178
which allows you to reset all variables to their system defaults.
1116
 
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="set-myvar"></a>26.2. User-defined variables</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="set-myvar-intro"></a>26.2.1. Introduction</h4></div></div></div><p>
 
1179
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="set-myvar"></a>26.3. User-Defined Variables</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="set-myvar-intro"></a>26.3.1. Introduction</h4></div></div></div><p>
1117
1180
Along with the variables listed in the
1118
 
<a class="link" href="reference.html#variables" title="3. Configuration variables">Configuration variables</a> section, mutt
 
1181
<a class="link" href="reference.html#variables" title="3. Configuration Variables">Configuration variables</a> section, Mutt
1119
1182
supports user-defined variables with names starting
1120
1183
with <code class="literal">my_</code> as in, for
1121
1184
example, <code class="literal">my_cfgdir</code>.
1122
1185
</p><p>
1123
 
The <code class="literal">set</code> command either creates a
 
1186
The <span class="command"><strong>set</strong></span> command either creates a
1124
1187
custom <code class="literal">my_</code> variable or changes its
1125
 
value if it does exist already. The <code class="literal">unset</code> and <code class="literal">reset</code>
 
1188
value if it does exist already. The <span class="command"><strong>unset</strong></span> and <span class="command"><strong>reset</strong></span>
1126
1189
commands remove the variable entirely.
1127
1190
</p><p>
1128
1191
Since user-defined variables are expanded in the same way that
1130
1193
the <a class="link" href="gettingstarted.html#shell-escape">shell-escape</a> command and
1131
1194
backtick expansion), this feature can be used to make configuration
1132
1195
files more readable.
1133
 
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="set-myvar-examples"></a>26.2.2. Examples</h4></div></div></div><p>
 
1196
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="set-myvar-examples"></a>26.3.2. Examples</h4></div></div></div><p>
1134
1197
The following example defines and uses the variable <code class="literal">my_cfgdir</code>
1135
 
to abbreviate the calls of the <a class="link" href="configuration.html#source" title="27. Reading initialization commands from another file">source</a> command:
1136
 
</p><div class="example"><a id="ex-myvar1"></a><p class="title"><b>Example 3.14. Using user-defined variables for config file readability</b></p><div class="example-contents"><pre class="screen">
 
1198
to abbreviate the calls of the <a class="link" href="configuration.html#source" title="27. Reading Initialization Commands From Another File"><span class="command"><strong>source</strong></span></a> command:
 
1199
</p><div class="example"><a id="ex-myvar1"></a><p class="title"><b>Example 3.15. Using user-defined variables for config file readability</b></p><div class="example-contents"><pre class="screen">
1137
1200
set my_cfgdir = $HOME/mutt/config
1138
1201
 
1139
1202
source $my_cfgdir/hooks
1142
1205
</pre></div></div><br class="example-break" /><p>
1143
1206
A custom variable can also be used in macros to backup the current value
1144
1207
of another variable. In the following example, the value of the
1145
 
<a class="link" href="reference.html#delete" title="3.42. delete">$delete</a> is changed temporarily
 
1208
<a class="link" href="reference.html#delete" title="3.49. delete">$delete</a> is changed temporarily
1146
1209
while its original value is saved as <code class="literal">my_delete</code>.
1147
 
After the macro has executed all commands, the original value of <a class="link" href="reference.html#delete" title="3.42. delete">$delete</a> is restored.
1148
 
</p><div class="example"><a id="ex-myvar2"></a><p class="title"><b>Example 3.15. Using user-defined variables for backing up other config option values</b></p><div class="example-contents"><pre class="screen">
 
1210
After the macro has executed all commands, the original value of <a class="link" href="reference.html#delete" title="3.49. delete">$delete</a> is restored.
 
1211
</p><div class="example"><a id="ex-myvar2"></a><p class="title"><b>Example 3.16. Using user-defined variables for backing up other config option values</b></p><div class="example-contents"><pre class="screen">
1149
1212
macro pager ,x '\
1150
1213
&lt;enter-command&gt;set my_delete=$delete&lt;enter&gt;\
1151
1214
&lt;enter-command&gt;set delete=yes&lt;enter&gt;\
1152
1215
...\
1153
1216
&lt;enter-command&gt;set delete=$my_delete&lt;enter&gt;'
1154
1217
</pre></div></div><br class="example-break" /><p>
1155
 
Since mutt expands such values already when parsing the configuration
 
1218
Since Mutt expands such values already when parsing the configuration
1156
1219
file(s), the value of <code class="literal">$my_delete</code> in the
1157
 
last example would be the value of <code class="literal">$delete</code> exactly
 
1220
last example would be the value of <a class="link" href="reference.html#delete" title="3.49. delete">$delete</a> exactly
1158
1221
as it was at that point during parsing the configuration file. If
1159
 
another statement would change the value for <code class="literal">$delete</code>
 
1222
another statement would change the value for <a class="link" href="reference.html#delete" title="3.49. delete">$delete</a>
1160
1223
later in the same or another file, it would have no effect on
1161
1224
<code class="literal">$my_delete</code>. However, the expansion can
1162
1225
be deferred to runtime, as shown in the next example, when escaping the
1163
1226
dollar sign.
1164
 
</p><div class="example"><a id="ex-myvar3"></a><p class="title"><b>Example 3.16. Deferring user-defined variable expansion to runtime</b></p><div class="example-contents"><pre class="screen">
 
1227
</p><div class="example"><a id="ex-myvar3"></a><p class="title"><b>Example 3.17. Deferring user-defined variable expansion to runtime</b></p><div class="example-contents"><pre class="screen">
1165
1228
macro pager &lt;PageDown&gt; "\
1166
1229
&lt;enter-command&gt; set my_old_pager_stop=\$pager_stop pager_stop&lt;Enter&gt;\
1167
1230
&lt;next-page&gt;\
1170
1233
</pre></div></div><br class="example-break" /><p>
1171
1234
Note that there is a space
1172
1235
between <code class="literal">&lt;enter-command&gt;</code> and
1173
 
the <code class="literal">set</code> configuration command, preventing mutt from
1174
 
recording the macro's commands into its history.
1175
 
</p></div></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="source"></a>27. Reading initialization commands from another file</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">source</code>   
 
1236
the <span class="command"><strong>set</strong></span> configuration command, preventing Mutt from
 
1237
recording the <span class="command"><strong>macro</strong></span>'s commands into its history.
 
1238
</p></div></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="source"></a>27. Reading Initialization Commands From Another File</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">source</code>   
1176
1239
<em class="replaceable"><code>filename</code></em>
1177
1240
 </p></div><p>
1178
1241
This command allows the inclusion of initialization commands
1183
1246
If the filename begins with a tilde (“<span class="quote">˜</span>”), it will be expanded to the
1184
1247
path of your home directory.
1185
1248
</p><p>
1186
 
If the filename ends with a vertical bar (|), then <span class="emphasis"><em>filename</em></span> is
 
1249
If the filename ends with a vertical bar (“<span class="quote">|</span>”), then <span class="emphasis"><em>filename</em></span> is
1187
1250
considered to be an executable program from which to read input (eg.
1188
 
<code class="literal">source ˜/bin/myscript|</code>).
1189
 
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="unhook"></a>28. Removing hooks</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">unhook</code>  { 
 
1251
<code class="literal"><span class="command"><strong>source</strong></span> ˜/bin/myscript|</code>).
 
1252
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="unhook"></a>28. Removing Hooks</h2></div></div></div><p>Usage:</p><div class="cmdsynopsis"><p><code class="command">unhook</code>  { 
1190
1253
<em class="replaceable"><code>*</code></em>
1191
1254
  |   
1192
1255
<em class="replaceable"><code>hook-type</code></em>
1194
1257
This command permits you to flush hooks you have previously defined.
1195
1258
You can either remove all hooks by giving the “<span class="quote">*</span>” character as an
1196
1259
argument, or you can remove all hooks of a specific type by saying
1197
 
something like <code class="literal">unhook send-hook</code>.
 
1260
something like <code class="literal"><span class="command"><strong>unhook</strong></span> send-hook</code>.
1198
1261
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="formatstrings"></a>29. Format Strings</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="formatstrings-basics"></a>29.1. Basic usage</h3></div></div></div><p>
1199
1262
Format strings are a general concept you'll find in several locations
1200
 
through the mutt configuration, especially in the
1201
 
<a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a>,
1202
 
<a class="link" href="reference.html#pager-format" title="3.140. pager_format">$pager_format</a>,
1203
 
<a class="link" href="reference.html#status-format" title="3.279. status_format">$status_format</a>,
1204
 
and other “<span class="quote">*_format</span>” variables. These can be very straightforward,
 
1263
through the Mutt configuration, especially in the
 
1264
<a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a>,
 
1265
<a class="link" href="reference.html#pager-format" title="3.150. pager_format">$pager_format</a>,
 
1266
<a class="link" href="reference.html#status-format" title="3.282. status_format">$status_format</a>,
 
1267
and other related variables. These can be very straightforward,
1205
1268
and it's quite possible you already know how to use them.
1206
1269
</p><p>
1207
1270
The most basic format string element is a percent symbol followed
1208
1271
by another character. For example, <code class="literal">%s</code>
1209
 
represents a message's Subject: header in the <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> variable. The
 
1272
represents a message's Subject: header in the <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> variable. The
1210
1273
“<span class="quote">expandos</span>” available are documented with each format variable, but
1211
1274
there are general modifiers available with all formatting expandos,
1212
1275
too. Those are our concern here.
1213
1276
</p><p>
1214
1277
Some of the modifiers are borrowed right out of C (though you might
1215
1278
know them from Perl, Python, shell, or another language). These are
1216
 
the [-]m.n modifiers, as in <code class="literal">%-12.12s</code>. As with
 
1279
the <code class="literal">[-]m.n</code> modifiers, as in <code class="literal">%-12.12s</code>. As with
1217
1280
such programming languages, these modifiers allow you to specify the
1218
1281
minimum and maximum size of the resulting string, as well as its
1219
1282
justification. If the “<span class="quote">-</span>” sign follows the percent, the string will
1220
1283
be left-justified instead of right-justified. If there's a number
1221
1284
immediately following that, it's the minimum amount of space the
1222
 
formatted string will occupy -- if it's naturally smaller than that, it
 
1285
formatted string will occupy — if it's naturally smaller than that, it
1223
1286
will be padded out with spaces.  If a decimal point and another number
1224
 
follow, that's the maximum space allowable -- the string will not be
 
1287
follow, that's the maximum space allowable — the string will not be
1225
1288
permitted to exceed that width, no matter its natural size. Each of
1226
1289
these three elements is optional, so that all these are legal format
1227
 
strings:
1228
 
<code class="literal">%-12s</code>
1229
 
<code class="literal">%4c</code>
1230
 
<code class="literal">%.15F</code>
1231
 
<code class="literal">%-12.15L</code>
 
1290
strings: <code class="literal">%-12s</code>, <code class="literal">%4c</code>,
 
1291
<code class="literal">%.15F</code> and <code class="literal">%-12.15L</code>.
1232
1292
</p><p>
1233
1293
Mutt adds some other modifiers to format strings. If you use an equals
1234
1294
symbol (<code class="literal">=</code>) as a numeric prefix (like the minus
1235
1295
above), it will force the string to be centered within its minimum
1236
1296
space range. For example, <code class="literal">%=14y</code> will reserve 14
1237
 
characters for the %y expansion -- that's the X-Label: header, in
1238
 
<code class="literal">$index_format</code>. If the expansion
 
1297
characters for the %y expansion — that's the X-Label: header, in
 
1298
<a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a>. If the expansion
1239
1299
results in a string less than 14 characters, it will be centered in a
1240
 
14-character space.  If the X-Label for a message were "test", that
1241
 
expansion would look like “<span class="quote">     test     </span>”.
 
1300
14-character space.  If the X-Label for a message were “<span class="quote">test</span>”, that
 
1301
expansion would look like “<span class="quote">     test     </span>”.
1242
1302
</p><p>
1243
1303
There are two very little-known modifiers that affect the way that an
1244
1304
expando is replaced. If there is an underline (“<span class="quote">_</span>”) character
1245
1305
between any format modifiers (as above) and the expando letter, it will
1246
1306
expands in all lower case. And if you use a colon (“<span class="quote">:</span>”), it will
1247
1307
replace all decimal points with underlines.
1248
 
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="formatstrings-filters"></a>29.2. Filters</h3></div></div></div><p>
 
1308
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="formatstrings-conditionals"></a>29.2. Conditionals</h3></div></div></div><p>
 
1309
Depending on the format string variable, some of its sequences can be
 
1310
used to optionally print a string if their value is nonzero. For
 
1311
example, you may only want to see the number of flagged messages if such
 
1312
messages exist, since zero is not particularly meaningful. To optionally
 
1313
print a string based upon one of the above sequences, the following
 
1314
construct is used:
 
1315
</p><pre class="screen">
 
1316
%?&lt;sequence_char&gt;?&lt;optional_string&gt;?</pre><p>
 
1317
where <span class="emphasis"><em>sequence_char</em></span> is an expando, and
 
1318
<span class="emphasis"><em>optional_string</em></span> is the string you would like printed if
 
1319
<span class="emphasis"><em>sequence_char</em></span> is nonzero.
 
1320
<span class="emphasis"><em>optional_string</em></span> may contain other
 
1321
sequences as well as normal text, but you may not nest optional
 
1322
strings.
 
1323
</p><p>
 
1324
Here is an example illustrating how to optionally print the number of
 
1325
new messages in a mailbox in
 
1326
<a class="link" href="reference.html#status-format" title="3.282. status_format">$status_format</a>:
 
1327
</p><pre class="screen">
 
1328
%?n?%n new messages.?</pre><p>
 
1329
You can also switch between two strings using the following construct:
 
1330
</p><pre class="screen">
 
1331
%?&lt;sequence_char&gt;?&lt;if_string&gt;&amp;&lt;else_string&gt;?</pre><p>
 
1332
If the value of <span class="emphasis"><em>sequence_char</em></span> is
 
1333
non-zero, <span class="emphasis"><em>if_string</em></span> will be expanded,
 
1334
otherwise <span class="emphasis"><em>else_string</em></span> will be expanded.
 
1335
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="formatstrings-filters"></a>29.3. Filters</h3></div></div></div><p>
1249
1336
Any format string ending in a vertical bar (“<span class="quote">|</span>”) will be
1250
1337
expanded and piped through the first word in the string, using spaces
1251
1338
as separator. The string returned will be used for display.
1255
1342
</p><p>
1256
1343
All % expandos in a format string are expanded before the script
1257
1344
is called so that:
1258
 
</p><div class="example"><a id="ex-fmtpipe"></a><p class="title"><b>Example 3.17. Using external filters in format strings</b></p><div class="example-contents"><pre class="screen">
 
1345
</p><div class="example"><a id="ex-fmtpipe"></a><p class="title"><b>Example 3.18. Using external filters in format strings</b></p><div class="example-contents"><pre class="screen">
1259
1346
set status_format="script.sh '%r %f (%L)'|"
1260
1347
</pre></div></div><br class="example-break" /><p>
1261
 
will make mutt expand <code class="literal">%r</code>,
 
1348
will make Mutt expand <code class="literal">%r</code>,
1262
1349
<code class="literal">%f</code> and <code class="literal">%L</code>
1263
1350
before calling the script. The example also shows that arguments can be
1264
1351
quoted: the script will receive the expanded string between the single quotes
1266
1353
</p><p>
1267
1354
A practical example is the <code class="literal">mutt_xtitle</code>
1268
1355
script installed in the <code class="literal">samples</code>
1269
 
subdirectory of the mutt documentation: it can be used as filter for
1270
 
<code class="literal">$status_format</code> to set the current
 
1356
subdirectory of the Mutt documentation: it can be used as filter for
 
1357
<a class="link" href="reference.html#status-format" title="3.282. status_format">$status_format</a> to set the current
1271
1358
terminal's title, if supported.
1272
 
</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gettingstarted.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="advancedusage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Getting Started </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. Advanced Usage</td></tr></table></div></body></html>
 
1359
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="formatstrings-padding"></a>29.4. Padding</h3></div></div></div><p>
 
1360
In most format strings, Mutt supports different types of padding using
 
1361
special %-expandos:
 
1362
</p><div class="variablelist"><dl><dt><span class="term"><code class="literal">%|X</code></span></dt><dd><p>
 
1363
When this occurs, Mutt will fill the rest of the
 
1364
line with the character <code class="literal">X</code>. For
 
1365
example, filling the rest of the line with dashes is
 
1366
done by setting:
 
1367
</p><pre class="screen">
 
1368
set status_format = "%v on %h: %B: %?n?%n&amp;no? new messages %|-"</pre></dd><dt><span class="term">
 
1369
<code class="literal">%&gt;X</code>
 
1370
</span></dt><dd><p>
 
1371
Since the previous expando stops at the end of line, there must be a way
 
1372
to fill the gap between two items via the <code class="literal">%&gt;X</code>
 
1373
expando: it puts as many characters <code class="literal">X</code> in between two
 
1374
items so that the rest of the line will be right-justified. For example,
 
1375
to not put the version string and hostname the above example on the left
 
1376
but on the right and fill the gap with spaces, one might use (note the
 
1377
space after <code class="literal">%&gt;</code>):
 
1378
</p><pre class="screen">
 
1379
set status_format = "%B: %?n?%n&amp;no? new messages %&gt; (%v on %h)"</pre></dd><dt><span class="term"><code class="literal">%*X</code>
 
1380
</span></dt><dd><p>
 
1381
Normal right-justification will print everything to the left of the
 
1382
<code class="literal">%&gt;</code>, displaying padding and whatever lies to the
 
1383
right only if there's room. By contrast, “<span class="quote">soft-fill</span>” gives
 
1384
priority to the right-hand side, guaranteeing space to display it and
 
1385
showing padding only if there's still room. If necessary, soft-fill will
 
1386
eat text leftwards to make room for rightward text. For example, to
 
1387
right-justify the subject making sure as much as possible of it fits on
 
1388
screen, one might use (note two spaces after <code class="literal">%*
 
1389
</code>: the second ensures there's a space between the truncated
 
1390
right-hand side and the subject):
 
1391
</p><pre class="screen">
 
1392
set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&amp;%4c?)%*  %s"</pre></dd></dl></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gettingstarted.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="advancedusage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Getting Started </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. Advanced Usage</td></tr></table></div></body></html>