110
160
begin with a hyphen) should be interpreted as: either a regular
111
161
expression or an email address, respectively.
113
These address groups can also be created implicitely by the
114
<a href="configuration.html#alias" title="3. Defining/Using aliases">alias</a>, <a href="configuration.html#lists" title="11. Mailing lists">lists</a>,
115
<a href="configuration.html#lists" title="11. Mailing lists">subscribe</a> and
116
<a href="configuration.html#alternates" title="10. Alternative addresses">alternates</a> commands by specifying the
163
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
117
167
optional <code class="literal">-group</code> option.
119
169
Once defined, these address groups can be used in
120
<a href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> to search for and limit the
170
<a class="link" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> to search for and limit the
121
171
display to messages matching a group.
123
Usage: <code class="literal">ungroup</code> [ <code class="literal">-group</code> <span class="emphasis"><em>name</em></span> [ ... ] ] [ * | [ [ <code class="literal">-rx</code> <span class="emphasis"><em>EXPR</em></span> [ ... ] ] [ <code class="literal">-addr</code> <span class="emphasis"><em>EXPR</em></span> [ ... ] ] ]
125
173
<code class="literal">ungroup</code> is used to remove addresses or regular
126
174
expressions from the specified group or groups. The syntax is similar to
127
175
the <code class="literal">group</code> command, however the special character
128
176
<code class="literal">*</code> can be used to empty a group of all of its
130
</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>3. Defining/Using aliases</h2></div></div></div><p>
131
Usage: <code class="literal">alias</code> [ <code class="literal">-group</code> <span class="emphasis"><em>name</em></span> [ ... ] ] <span class="emphasis"><em>key</em></span> <span class="emphasis"><em>address</em></span> [ , <span class="emphasis"><em>address</em></span>, ... ]
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> [
179
<code class="option">-group</code>
180
<em class="replaceable"><code>name</code></em>
182
<em class="replaceable"><code>key</code></em>
184
<em class="replaceable"><code>address</code></em>
186
<em class="replaceable"><code>address</code></em>
133
188
It's usually very cumbersome to remember or type out the address of someone
134
you are communicating with. Mutt allows you to create ``aliases'' which map
189
you are communicating with. Mutt allows you to create “<span class="quote">aliases</span>” which map
135
190
a short string to a full address.
137
<span class="bold"><strong>Note:</strong></span> if you want to create an alias for more than
138
one address, you <span class="bold"><strong>must</strong></span> separate the addresses with a comma (``,'').
191
</p><div class="note"><h3 class="title">Note</h3><p>
192
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>”).
140
195
The optional <code class="literal">-group</code> argument to
141
196
<code class="literal">alias</code> causes the aliased address(es) to be added to
142
197
the named <span class="emphasis"><em>group</em></span>.
144
To remove an alias or aliases (``*'' means all aliases):
146
<code class="literal">unalias</code> [ * | <span class="emphasis"><em>key</em></span> <span class="emphasis"><em>...</em></span> ]
149
</p><pre class="screen">
199
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>
204
<em class="replaceable"><code>*</code></em>
206
<em class="replaceable"><code>key</code></em>
207
... }</p></div><pre class="screen">
150
208
alias muttdude me@cs.hmc.edu (Michael Elkins)
151
209
alias theguys manny, moe, jack
155
211
Unlike other mailers, Mutt doesn't require aliases to be defined
156
212
in a special file. The <code class="literal">alias</code> command can appear anywhere in
157
a configuration file, as long as this file is <a href="configuration.html#source" title="27. Reading initialization commands from another file">sourced</a>. Consequently, you can have multiple alias files, or
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
158
214
you can have all aliases defined in your muttrc.
160
On the other hand, the <a href="gettingstarted.html#create-alias">create-alias</a>
161
function can use only one file, the one pointed to by the <a href="reference.html#alias-file" title="3.3. alias_file">$alias_file</a> variable (which is
216
On the other hand, the <a class="link" href="gettingstarted.html#create-alias"><code class="literal"><create-alias></code></a>
217
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
162
218
<code class="literal">˜/.muttrc</code> by default). This file is not special either,
163
219
in the sense that Mutt will happily append aliases to any file, but in
164
order for the new aliases to take effect you need to explicitly <a href="configuration.html#source" title="27. Reading initialization commands from another file">source</a> this file too.
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.
169
</p><pre class="screen">
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">
170
224
source /usr/local/share/Mutt.aliases
171
225
source ~/.mail_aliases
172
226
set alias_file=~/.mail_aliases
227
</pre></div></div><br class="example-break" /><p>
176
228
To use aliases, you merely use the alias at any place in mutt where mutt
177
229
prompts for addresses, such as the <span class="emphasis"><em>To:</em></span> or <span class="emphasis"><em>Cc:</em></span> prompt. You can
178
230
also enter aliases in your editor at the appropriate headers if you have the
179
<a href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable set.
231
<a class="link" href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable set.
181
233
In addition, at the various address prompts, you can use the tab character
182
234
to expand a partial alias to the full alias. If there are multiple matches,
446
471
for your xterm), since color names may then lose their normal meaning.
448
473
If your terminal does not support color, it is still possible change the video
449
attributes through the use of the ``mono'' command:
451
</p><div class="literallayout"><p><br />
452
Usage: <code class="literal">mono</code> <span class="emphasis"><em><object> <attribute></em></span> [ <span class="emphasis"><em>regexp</em></span> ]<br />
453
Usage: <code class="literal">mono</code> index <span class="emphasis"><em>attribute</em></span> <span class="emphasis"><em>pattern</em></span><br />
454
Usage: <code class="literal">unmono</code> index <span class="emphasis"><em>pattern</em></span> [ <span class="emphasis"><em>pattern</em></span> ... ]<br />
457
where <span class="emphasis"><em>attribute</em></span> is one of the following:
460
</p><div class="itemizedlist"><ul type="disc"><li><p>
470
</p></li></ul></div><p>
472
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="ignore"></a>9. Ignoring (weeding) unwanted message headers</h2></div></div></div><p>
473
Usage: <code class="literal">[un]ignore</code> <span class="emphasis"><em>pattern</em></span> [ <span class="emphasis"><em>pattern</em></span> ... ]
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>
476
<em class="replaceable"><code>object</code></em>
478
<em class="replaceable"><code>attribute</code></em>
479
</p></div><div class="cmdsynopsis"><p><code class="command">mono</code> {
480
<code class="option">header</code>
482
<code class="option">body</code>
484
<em class="replaceable"><code>attribute</code></em>
486
<em class="replaceable"><code>regexp</code></em>
487
</p></div><div class="cmdsynopsis"><p><code class="command">mono</code>
488
<code class="option">index</code>
490
<em class="replaceable"><code>attribute</code></em>
492
<em class="replaceable"><code>pattern</code></em>
493
</p></div><div class="cmdsynopsis"><p><code class="command">unmono</code>
494
<code class="option">index</code>
496
<em class="replaceable"><code>*</code></em>
498
<em class="replaceable"><code>pattern</code></em>
500
For <span class="emphasis"><em>object</em></span>, see the color command. <span class="emphasis"><em>attribute</em></span>
501
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>
503
<em class="replaceable"><code>pattern</code></em>
505
<em class="replaceable"><code>pattern</code></em>
506
...]</p></div><div class="cmdsynopsis"><p><code class="command">unignore</code> {
507
<em class="replaceable"><code>*</code></em>
509
<em class="replaceable"><code>pattern</code></em>
475
511
Messages often have many header fields added by automatic processing systems,
476
512
or which may not seem useful to display on the screen. This command allows
477
you to specify header fields which you don't normally want to see.
513
you to specify header fields which you don't normally want to see in the pager.
479
515
You do not need to specify the full header field name. For example,
480
``ignore content-'' will ignore all header fields that begin with the pattern
481
``content-''. ``ignore *'' will ignore all headers.
483
To remove a previously added token from the list, use the ``unignore'' command.
484
The ``unignore'' command will make Mutt display headers with the given pattern.
485
For example, if you do ``ignore x-'' it is possible to ``unignore x-mailer''.
487
``unignore *'' will remove all tokens from the ignore list.
516
“<span class="quote">ignore content-</span>” will ignore all header fields that begin with the pattern
517
“<span class="quote">content-</span>”. “<span class="quote">ignore *</span>” will ignore all headers.
519
To remove a previously added token from the list, use the “<span class="quote">unignore</span>” command.
520
The “<span class="quote">unignore</span>” command will make Mutt display headers with the given pattern.
521
For example, if you do “<span class="quote">ignore x-</span>” it is possible to “<span class="quote">unignore x-mailer</span>”.
523
“<span class="quote">unignore *</span>” will remove all tokens from the ignore list.
491
</p><pre class="screen">
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">
492
527
# Sven's draconian header weeding
494
529
unignore from date subject to cc
495
530
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
496
531
unignore posted-to:
499
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alternates"></a>10. Alternative addresses</h2></div></div></div><p>
500
Usage: <code class="literal">[un]alternates</code> [ <code class="literal">-group</code> <span class="emphasis"><em>name</em></span> [ ... ] ] <span class="emphasis"><em>regexp</em></span> [ <span class="emphasis"><em>regexp</em></span> ... ]
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>
533
<em class="replaceable"><code>header</code></em>
535
<em class="replaceable"><code>header</code></em>
536
...]</p></div><div class="cmdsynopsis"><p><code class="command">unhdr_order</code> {
537
<em class="replaceable"><code>*</code></em>
539
<em class="replaceable"><code>header</code></em>
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.
544
“<span class="quote">unhdr_order *</span>” will clear all previous headers from the order list,
545
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">
547
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> [
549
<code class="option">-group</code>
550
<em class="replaceable"><code>name</code></em>
552
<em class="replaceable"><code>regexp</code></em>
554
<em class="replaceable"><code>regexp</code></em>
555
...]</p></div><div class="cmdsynopsis"><p><code class="command">unalternates</code> [
556
<code class="option">-group</code>
557
<em class="replaceable"><code>name</code></em>
559
<em class="replaceable"><code>*</code></em>
561
<em class="replaceable"><code>regexp</code></em>
503
563
With various functions, mutt will treat messages differently,
504
564
depending on whether you sent them or whether you received them from
505
565
someone else. For instance, when replying to a message that you
506
566
sent to a different party, mutt will automatically suggest to send
507
567
the response to the original message's recipients -- responding to
508
yourself won't make much sense in many cases. (See <a href="reference.html#reply-to" title="3.242. reply_to">$reply_to</a>.)
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>.)
510
570
Many users receive e-mail under a number of different addresses. To
511
571
fully use mutt's features here, the program must be able to
540
600
Likewise, if the <span class="emphasis"><em>regexp</em></span> for an <code class="literal">alternates</code> command matches
541
601
an entry on the <code class="literal">unalternates</code> list, that <code class="literal">unalternates</code>
542
602
entry will be removed. If the <span class="emphasis"><em>regexp</em></span> for <code class="literal">unalternates</code>
543
is ``*'', <span class="emphasis"><em>all entries</em></span> on <code class="literal">alternates</code> will be removed.
544
</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>11. Mailing lists</h2></div></div></div><p>
545
</p><div class="literallayout"><p><br />
546
Usage: <code class="literal">[un]lists</code> [ <code class="literal">-group</code> <span class="emphasis"><em>name</em></span> [ ... ] ] <span class="emphasis"><em>regexp</em></span> [ <span class="emphasis"><em>regexp</em></span> ... ]<br />
547
Usage: <code class="literal">[un]subscribe</code> [ <code class="literal">-group</code> <span class="emphasis"><em>name</em></span> [ ... ] ] <span class="emphasis"><em>regexp</em></span> [ <span class="emphasis"><em>regexp</em></span> ... ]<br />
550
Mutt has a few nice features for <a href="advancedusage.html#using-lists" title="8. Handling Mailing Lists">handling mailing lists</a>. In order to take advantage of them, you must
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> [
605
<code class="option">-group</code>
606
<em class="replaceable"><code>name</code></em>
608
<em class="replaceable"><code>regexp</code></em>
610
<em class="replaceable"><code>regexp</code></em>
611
...]</p></div><div class="cmdsynopsis"><p><code class="command">unlists</code> [
612
<code class="option">-group</code>
613
<em class="replaceable"><code>name</code></em>
615
<em class="replaceable"><code>*</code></em>
617
<em class="replaceable"><code>regexp</code></em>
618
... }</p></div><div class="cmdsynopsis"><p><code class="command">subscribe</code> [
619
<code class="option">-group</code>
620
<em class="replaceable"><code>name</code></em>
622
<em class="replaceable"><code>regexp</code></em>
624
<em class="replaceable"><code>regexp</code></em>
625
...]</p></div><div class="cmdsynopsis"><p><code class="command">unsubscribe</code> [
626
<code class="option">-group</code>
627
<em class="replaceable"><code>name</code></em>
629
<em class="replaceable"><code>*</code></em>
631
<em class="replaceable"><code>regexp</code></em>
633
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
551
634
specify which addresses belong to mailing lists, and which mailing
552
lists you are subscribed to. Once you have done this, the <a href="gettingstarted.html#list-reply">list-reply</a> function will work for all known lists.
635
lists you are subscribed to. Once you have done this, the <a class="link" href="gettingstarted.html#list-reply"><code class="literal"><list-reply></code></a> function will work for all known lists.
553
636
Additionally, when you send a message to a subscribed list, mutt will
554
637
add a Mail-Followup-To header to tell other users' mail user agents
555
not to send copies of replies to your personal address. Note that
556
the Mail-Followup-To header is a non-standard extension which is not
638
not to send copies of replies to your personal address.
639
</p><div class="note"><h3 class="title">Note</h3><p>
640
The Mail-Followup-To header is a non-standard extension which is not
557
641
supported by all mail user agents. Adding it is not bullet-proof against
558
642
receiving personal CCs of list messages. Also note that the generation
559
of the Mail-Followup-To header is controlled by the <a href="reference.html#followup-to" title="3.60. followup_to">$followup_to</a> configuration variable.
643
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.
561
647
More precisely, Mutt maintains lists of patterns for the addresses
562
648
of known and subscribed mailing lists. Every subscribed mailing
563
list is known. To mark a mailing list as known, use the ``lists''
564
command. To mark it as subscribed, use ``subscribe''.
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>”.
566
652
You can use regular expressions with both commands. To mark all
567
653
messages sent to a specific bug report's address on mutt's bug
568
654
tracking system as list mail, for instance, you could say
569
``subscribe [0-9]*@bugs.guug.de''. Often, it's sufficient to just
655
“<span class="quote">subscribe [0-9]*@bugs.guug.de</span>”. Often, it's sufficient to just
570
656
give a portion of the list's e-mail address.
572
658
Specify as much of the address as you need to to remove ambiguity. For
573
659
example, if you've subscribed to the Mutt mailing list, you will receive mail
574
660
addressed to <span class="emphasis"><em>mutt-users@mutt.org</em></span>. So, to tell Mutt
575
that this is a mailing list, you could add ``lists mutt-users@'' to your
661
that this is a mailing list, you could add “<span class="quote">lists mutt-users@</span>” to your
576
662
initialization file. To tell mutt that you are subscribed to it,
577
add ``subscribe mutt-users'' to your initialization file instead.
663
add “<span class="quote">subscribe mutt-users</span>” to your initialization file instead.
578
664
If you also happen to get mail from someone whose address is
579
665
<span class="emphasis"><em>mutt-users@example.com</em></span>, you could use
580
``lists ^mutt-users@mutt\\.org$''
581
or ``subscribe ^mutt-users@mutt\\.org$'' to
666
“<span class="quote">lists ^mutt-users@mutt\\.org$</span>”
667
or “<span class="quote">subscribe ^mutt-users@mutt\\.org$</span>” to
582
668
match only mail from the actual list.
584
670
The <code class="literal">-group</code> flag adds all of the subsequent regular expressions
585
671
to the named group.
587
The ``unlists'' command is used to remove a token from the list of
588
known and subscribed mailing-lists. Use ``unlists *'' to remove all
673
The “<span class="quote">unlists</span>” command is used to remove a token from the list of
674
known and subscribed mailing-lists. Use “<span class="quote">unlists *</span>” to remove all
591
677
To remove a mailing list from the list of subscribed mailing lists,
592
but keep it on the list of known mailing lists, use ``unsubscribe''.
593
</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>12. Using Multiple spool mailboxes</h2></div></div></div><p>
594
Usage: <code class="literal">mbox-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>mailbox</em></span>
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>
680
<em class="replaceable"><code>[!]pattern</code></em>
682
<em class="replaceable"><code>mailbox</code></em>
596
684
This command is used to move read messages from a specified mailbox to a
597
685
different mailbox automatically when you quit or change folders.
598
686
<span class="emphasis"><em>pattern</em></span> is a regular expression specifying the mailbox to treat as a
599
``spool'' mailbox and <span class="emphasis"><em>mailbox</em></span> specifies where mail should be saved when
687
“<span class="quote">spool</span>” mailbox and <span class="emphasis"><em>mailbox</em></span> specifies where mail should be saved when
602
690
Unlike some of the other <span class="emphasis"><em>hook</em></span> commands, only the <span class="emphasis"><em>first</em></span> matching
603
691
pattern is used (it is not possible to save read mail in more than a single
605
</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>13. Monitoring incoming mail</h2></div></div></div><p>
606
Usage: <code class="literal">[un]mailboxes</code> <span class="emphasis"><em>folder</em></span> [ <span class="emphasis"><em>folder</em></span> ... ]
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>
694
<em class="replaceable"><code>mailbox</code></em>
696
<em class="replaceable"><code>mailbox</code></em>
697
...]</p></div><div class="cmdsynopsis"><p><code class="command">unmailboxes</code> {
698
<em class="replaceable"><code>*</code></em>
700
<em class="replaceable"><code>mailbox</code></em>
608
702
This command specifies folders which can receive mail and
609
which will be checked for new messages. By default, the
610
main menu status bar displays how many of these folders have
703
which will be checked for new messages periodically.
613
<code class="literal">folder</code> can either be a local file or directory
705
<span class="emphasis"><em>folder</em></span> can either be a local file or directory
614
706
(Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP
615
support, <code class="literal">folder</code> can also be a POP/IMAP folder
616
URL. The URL syntax is described in <a href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a>,
617
POP and IMAP are described in <a href="optionalfeatures.html#pop" title="3. POP3 Support">Section 3, “POP3 Support”</a> and <a href="optionalfeatures.html#imap" title="4. IMAP Support">Section 4, “IMAP Support”</a>
707
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>,
709
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>
620
When changing folders, pressing <span class="emphasis"><em>space</em></span> will cycle
621
through folders with new mail.
623
Pressing TAB in the directory browser will bring up a menu showing the files
624
specified by the <code class="literal">mailboxes</code> command, and indicate which contain new
625
messages. Mutt will automatically enter this mode when invoked from the
626
command line with the <code class="literal">-y</code> option.
628
The ``unmailboxes'' command is used to remove a token from the list
629
of folders which receive mail. Use ``unmailboxes *'' to remove all
712
Mutt provides a number of advanced features for handling (possibly many)
713
folders and new mail within them, please refer to
714
<a class="xref" href="advancedusage.html#handling-folders" title="9. Handling multiple folders">Section 9, “Handling multiple folders”</a> for details (including in what
715
situations and how often Mutt checks for new mail).
717
The “<span class="quote">unmailboxes</span>” command is used to remove a token from the list
718
of folders which receive mail. Use “<span class="quote">unmailboxes *</span>” to remove all
632
<span class="bold"><strong>Note:</strong></span> the folders in the <code class="literal">mailboxes</code> command are resolved when
633
the command is executed, so if these names contain <a href="advancedusage.html#shortcuts" title="7. Mailbox Shortcuts">shortcut characters</a> (such as ``='' and ``!''), any variable
634
definition that affect these characters (like <a href="reference.html#folder" title="3.58. folder">$folder</a> and <a href="reference.html#spoolfile" title="3.276. spoolfile">$spoolfile</a>)
635
should be executed before the <code class="literal">mailboxes</code> command. If
720
</p><div class="note"><h3 class="title">Note</h3><p>
721
The folders in the <code class="literal">mailboxes</code> command are resolved when
722
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
636
725
none of these shorcuts are used, a local path should be absolute as
637
otherwise mutt tries to find it within the current working directory
726
otherwise mutt tries to find it relative to the directory
638
727
from where mutt was started which may not always be desired.
640
For local folders, new mail is detected by comparing access and/or
641
modification times of files and folders. The interval in which Mutt
642
checks for new mail is defined by
643
<a href="reference.html#mail-check" title="3.104. mail_check">$mail_check</a>.
645
Special care is required with Mbox and Mmdf
646
folders as Mutt assumes such a folder has new mail if it wasn't
729
For Mbox and Mmdf folders, new mail is detected by comparing access and/or
730
modification times of files: Mutt assumes a folder has new mail if it wasn't
647
731
accessed after it was last modified. Utilities like <code class="literal">biff</code> or
648
732
<code class="literal">frm</code> or any other program which accesses the mailbox might cause
649
733
Mutt to never detect new mail for that mailbox if they do not properly reset the
650
access time. Backup tools are another common reason for updated access times.
651
</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>14. User defined headers</h2></div></div></div><p>
654
<code class="literal">my_hdr</code> <span class="emphasis"><em>string</em></span>
656
<code class="literal">unmy_hdr</code> <span class="emphasis"><em>field</em></span> [ <span class="emphasis"><em>field</em></span> ... ]
734
access time. Other possible causes of Mutt not detecting new mail in these folders
735
are backup tools (updating access times) or filesystems mounted without
736
access time update support.
658
The ``my_hdr'' command allows you to create your own header
738
In cases where new mail detection for Mbox or Mmdf folders appears to be
740
<a class="link" href="reference.html#check-mbox-size" title="3.24. check_mbox_size">$check_mbox_size</a>
741
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>
744
<em class="replaceable"><code>string</code></em>
745
</p></div><div class="cmdsynopsis"><p><code class="command">unmy_hdr</code> {
746
<em class="replaceable"><code>*</code></em>
748
<em class="replaceable"><code>field</code></em>
750
The <code class="literal">my_hdr</code> command allows you to create your own header
659
751
fields which will be added to every message you send.
661
For example, if you would like to add an ``Organization:'' header field to
753
For example, if you would like to add an “<span class="quote">Organization:</span>” header field to
662
754
all of your outgoing messages, you can put the command
664
“<span class="quote">my_hdr Organization: A Really Big Company, Anytown, USA</span>”
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">
756
my_hdr Organization: A Really Big Company, Anytown, USA
757
</pre></div></div><br class="example-break" /><p>
666
758
in your <code class="literal">.muttrc</code>.
668
<span class="bold"><strong>Note:</strong></span> space characters are <span class="emphasis"><em>not</em></span> allowed between the keyword and
669
the colon (``:''). The standard for electronic mail (RFC822) says that
759
</p><div class="note"><h3 class="title">Note</h3><p>
760
Space characters are <span class="emphasis"><em>not</em></span> allowed between the keyword and
761
the colon (“<span class="quote">:</span>”). The standard for electronic mail (RFC2822) says that
670
762
space is illegal there, so Mutt enforces the rule.
672
764
If you would like to add a header field to a single message, you should
673
either set the <a href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable,
674
or use the <span class="emphasis"><em>edit-headers</em></span> function (default: ``E'') in the send-menu so
765
either set the <a class="link" href="reference.html#edit-headers" title="3.50. edit_headers">$edit_headers</a> variable,
766
or use the <code class="literal"><edit-headers></code> function (default: “<span class="quote">E</span>”) in the compose menu so
675
767
that you can edit the header of your message along with the body.
677
To remove user defined header fields, use the ``unmy_hdr''
678
command. You may specify an asterisk (``*'') to remove all header
679
fields, or the fields to remove. For example, to remove all ``To'' and
680
``Cc'' header fields, you could use:
682
“<span class="quote">unmy_hdr to cc</span>”
683
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="hdr-order"></a>15. Defining the order of headers when viewing messages</h2></div></div></div><p>
684
Usage: <code class="literal">hdr_order</code> <span class="emphasis"><em>header1</em></span> <span class="emphasis"><em>header2</em></span> <span class="emphasis"><em>header3</em></span>
686
With this command, you can specify an order in which mutt will attempt
687
to present headers to you when viewing messages.
689
``unhdr_order *'' will clear all previous headers from the order list,
690
thus removing the header order effects set by the system-wide startup
769
To remove user defined header fields, use the <code class="literal">unmy_hdr</code>
770
command. You may specify an asterisk (“<span class="quote">*</span>”) to remove all header
771
fields, or the fields to remove. For example, to remove all “<span class="quote">To</span>” and
772
“<span class="quote">Cc</span>” header fields, you could use:
694
773
</p><pre class="screen">
695
hdr_order From Date: From: To: Cc: Subject:
698
</p></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>
699
Usage: <code class="literal">save-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>mailbox</em></span>
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>
776
<em class="replaceable"><code>[!]pattern</code></em>
778
<em class="replaceable"><code>mailbox</code></em>
701
780
This command is used to override the default mailbox used when saving
702
781
messages. <span class="emphasis"><em>mailbox</em></span> will be used as the default if the message
703
matches <span class="emphasis"><em>pattern</em></span>, see <a href="advancedusage.html#pattern-hook">Message Matching in Hooks</a> for information
782
matches <span class="emphasis"><em>pattern</em></span>, see <a class="xref" href="advancedusage.html#pattern-hook" title="4.1. Message Matching in Hooks">Message Matching in Hooks</a> for information
704
783
on the exact format.
706
785
To provide more flexibility and good defaults, Mutt applies the
707
expandos of <a href="reference.html#index-format" title="3.100. index_format">$index_format</a> to
786
expandos of <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> to
708
787
<span class="emphasis"><em>mailbox</em></span> after it was expanded.
713
</p><pre class="screen">
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">
714
791
# default: save all to ~/Mail/<author name>
715
792
save-hook . ~/Mail/%F
716
# save from me@turing.cs.hmc.edu/me@cs.hmc.edu to $folder/elinks
794
# save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins
717
795
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
718
797
# save from aol.com to $folder/spam
719
798
save-hook aol\\.com$ +spam
723
Also see the <a href="configuration.html#fcc-save-hook" title="18. Specify default save filename and default Fcc: mailbox at once">fcc-save-hook</a> command.
724
</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>
725
Usage: <code class="literal">fcc-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>mailbox</em></span>
799
</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>
802
<em class="replaceable"><code>[!]pattern</code></em>
804
<em class="replaceable"><code>mailbox</code></em>
727
806
This command is used to save outgoing mail in a mailbox other than
728
<a href="reference.html#record" title="3.239. record">$record</a>. Mutt searches the initial list of
807
<a class="link" href="reference.html#record" title="3.240. record">$record</a>. Mutt searches the initial list of
729
808
message recipients for the first matching <span class="emphasis"><em>regexp</em></span> and uses <span class="emphasis"><em>mailbox</em></span>
730
809
as the default Fcc: mailbox. If no match is found the message will be saved
731
to <a href="reference.html#record" title="3.239. record">$record</a> mailbox.
810
to <a class="link" href="reference.html#record" title="3.240. record">$record</a> mailbox.
733
812
To provide more flexibility and good defaults, Mutt applies the
734
expandos of <a href="reference.html#index-format" title="3.100. index_format">$index_format</a> to
813
expandos of <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> to
735
814
<span class="emphasis"><em>mailbox</em></span> after it was expanded.
737
See <a href="advancedusage.html#pattern-hook">Message Matching in Hooks</a> for information on the exact format of <span class="emphasis"><em>pattern</em></span>.
816
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>.
739
818
Example: <code class="literal">fcc-hook [@.]aol\\.com$ +spammers</code>
741
820
The above will save a copy of all messages going to the aol.com domain to
742
the `+spammers' mailbox by default. Also see the <a href="configuration.html#fcc-save-hook" title="18. Specify default save filename and default Fcc: mailbox at once">fcc-save-hook</a> command.
743
</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>
744
Usage: <code class="literal">fcc-save-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>mailbox</em></span>
746
This command is a shortcut, equivalent to doing both a <a href="configuration.html#fcc-hook" title="17. Specify default Fcc: mailbox when composing">fcc-hook</a>
747
and a <a href="configuration.html#save-hook" title="16. Specify default save mailbox">save-hook</a> with its arguments,
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>
823
<em class="replaceable"><code>[!]pattern</code></em>
825
<em class="replaceable"><code>mailbox</code></em>
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,
748
829
including %-expansion on <span class="emphasis"><em>mailbox</em></span> according
749
to <a href="reference.html#index-format" title="3.100. index_format">$index_format</a>.
750
</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><p>
751
</p><div class="literallayout"><p><br />
752
Usage: <code class="literal">reply-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>command</em></span><br />
753
Usage: <code class="literal">send-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>command</em></span><br />
754
Usage: <code class="literal">send2-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>command</em></span><br />
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>
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>
838
<em class="replaceable"><code>command</code></em>
839
</p></div><div class="cmdsynopsis"><p><code class="command">send2-hook</code>
840
<em class="replaceable"><code>[!]pattern</code></em>
842
<em class="replaceable"><code>command</code></em>
757
844
These commands can be used to execute arbitrary configuration commands based
758
upon recipients of the message. <span class="emphasis"><em>pattern</em></span> is a regular expression
759
matching the desired address. <span class="emphasis"><em>command</em></span> is executed when <span class="emphasis"><em>regexp</em></span>
760
matches recipients of the message.
845
upon recipients of the message. <span class="emphasis"><em>pattern</em></span> is used to match
846
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
is executed when <span class="emphasis"><em>pattern</em></span> matches.
762
<code class="literal">reply-hook</code> is matched against the message you are <span class="emphasis"><em>replying</em></span>
763
<span class="bold"><strong>to</strong></span>, instead of the message you are <span class="emphasis"><em>sending</em></span>. <code class="literal">send-hook</code> is
764
matched against all messages, both <span class="emphasis"><em>new</em></span> and <span class="emphasis"><em>replies</em></span>. <span class="bold"><strong>Note:</strong></span>
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
851
matched against all messages, both <span class="emphasis"><em>new</em></span>
852
and <span class="emphasis"><em>replies</em></span>.
853
</p><div class="note"><h3 class="title">Note</h3><p>
765
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>
766
855
of the order specified in the user's configuration file.
768
857
<code class="literal">send2-hook</code> is matched every time a message is changed, either
769
858
by editing it, or by using the compose menu to change its recipients
770
859
or subject. <code class="literal">send2-hook</code> is executed after <code class="literal">send-hook</code>, and
771
can, e.g., be used to set parameters such as the <a href="reference.html#sendmail" title="3.257. sendmail">$sendmail</a> variable depending on the message's sender
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
774
863
For each type of <code class="literal">send-hook</code> or <code class="literal">reply-hook</code>, when multiple matches
775
864
occur, commands are executed in the order they are specified in the muttrc
776
865
(for that type of hook).
778
See <a href="advancedusage.html#pattern-hook">Message Matching in Hooks</a> for information on the exact format of <span class="emphasis"><em>pattern</em></span>.
780
867
Example: <code class="literal">send-hook mutt "set mime_forward signature=''"</code>
782
869
Another typical use for this command is to change the values of the
783
<a href="reference.html#attribution" title="3.16. attribution">$attribution</a>, <a href="reference.html#signature" title="3.262. signature">$signature</a> and <a href="reference.html#locale" title="3.103. locale">$locale</a>
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>
784
871
variables in order to change the language of the attributions and
785
872
signatures based upon the recipients.
787
<span class="bold"><strong>Note:</strong></span> the send-hook's are only executed ONCE after getting the initial
873
</p><div class="note"><h3 class="title">Note</h3><p>
874
send-hook's are only executed once after getting the initial
788
875
list of recipients. Adding a recipient after replying or editing the
789
message will NOT cause any send-hook to be executed. Also note that
790
my_hdr commands which modify recipient headers, or the message's
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
791
878
subject, don't have any effect on the current message when executed
792
879
from a send-hook.
793
</p></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>
794
Usage: <code class="literal">message-hook</code> [!]<span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>command</em></span>
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>
881
<em class="replaceable"><code>[!]pattern</code></em>
883
<em class="replaceable"><code>command</code></em>
796
885
This command can be used to execute arbitrary configuration commands
797
886
before viewing or formatting a message based upon information about the message.
798
887
<span class="emphasis"><em>command</em></span> is executed if the <span class="emphasis"><em>pattern</em></span> matches the message to be
799
888
displayed. When multiple matches occur, commands are executed in the order
800
889
they are specified in the muttrc.
802
See <a href="advancedusage.html#pattern-hook">Message Matching in Hooks</a> for
891
See <a class="xref" href="advancedusage.html#pattern-hook" title="4.1. Message Matching in Hooks">Message Matching in Hooks</a> for
803
892
information on the exact format of <span class="emphasis"><em>pattern</em></span>.
807
895
</p><pre class="screen">
808
896
message-hook ~A 'set pager=builtin'
809
897
message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""'
812
</p></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>
813
Usage: <code class="literal">crypt-hook</code> <span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>keyid</em></span>
815
When encrypting messages with PGP or OpenSSL, you may want to associate a certain
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>
899
<em class="replaceable"><code>pattern</code></em>
901
<em class="replaceable"><code>keyid</code></em>
903
When encrypting messages with PGP/GnuPG or OpenSSL, you may want to associate a certain
816
904
key with a given e-mail address automatically, either because the
817
905
recipient's public key can't be deduced from the destination address,
818
906
or because, for some reasons, you need to override the key Mutt would
819
normally use. The crypt-hook command provides a method by which you can
820
specify the ID of the public key to be used when encrypting messages to
907
normally use. The <code class="literal">crypt-hook</code> command provides a
908
method by which you can specify the ID of the public key to be used
909
when encrypting messages to a certain recipient.
823
The meaning of "key id" is to be taken broadly in this context: You
911
The meaning of <span class="emphasis"><em>keyid</em></span> is to be taken broadly in this context: You
824
912
can either put a numerical key ID here, an e-mail address, or even
825
913
just a real name.
826
</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>
827
Usage: <code class="literal">push</code> <span class="emphasis"><em>string</em></span>
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>
915
<em class="replaceable"><code>string</code></em>
829
917
This command adds the named string to the keyboard buffer. The string may
830
918
contain control characters, key names and function names like the sequence
831
string in the <a href="configuration.html#macro" title="7. Keyboard macros">macro</a> command. You may use it to
919
string in the <a class="link" href="configuration.html#macro" title="8. Keyboard macros">macro</a> command. You may use it to
832
920
automatically run a sequence of commands at startup, or when entering
833
921
certain folders. For example, the following command will automatically
834
922
collapse all threads when entering a folder:
836
</p><pre class="screen">
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">
837
924
folder-hook . 'push <collapse-all>'
839
</p></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>
840
Usage: <code class="literal">exec</code> <span class="emphasis"><em>function</em></span> [ <span class="emphasis"><em>function</em></span> ... ]
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>
926
<em class="replaceable"><code>function</code></em>
928
<em class="replaceable"><code>function</code></em>
842
930
This command can be used to execute any function. Functions are
843
listed in the <a href="reference.html#functions" title="4. Functions">function reference</a>.
844
``exec function'' is equivalent to ``push <function>''.
845
</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>
846
</p><div class="literallayout"><p><br />
847
Usage: <code class="literal">score</code> <span class="emphasis"><em>pattern</em></span> <span class="emphasis"><em>value</em></span><br />
848
Usage: <code class="literal">unscore</code> <span class="emphasis"><em>pattern</em></span> [ <span class="emphasis"><em>pattern</em></span> ... ]<br />
931
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 <function></span>”.
933
</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
<em class="replaceable"><code>pattern</code></em>
936
<em class="replaceable"><code>value</code></em>
937
</p></div><div class="cmdsynopsis"><p><code class="command">unscore</code> {
938
<em class="replaceable"><code>*</code></em>
940
<em class="replaceable"><code>pattern</code></em>
851
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>
852
matches it. <span class="emphasis"><em>pattern</em></span> is a string in the format described in the <a href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> section (note: For efficiency reasons, patterns
943
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
853
944
which scan information not available in the index, such as <code class="literal">˜b</code>,
854
945
<code class="literal">˜B</code> or <code class="literal">˜h</code>, may not be used). <span class="emphasis"><em>value</em></span> is a
855
946
positive or negative integer. A message's final score is the sum total of all