</sect1>
<sect1 id="save-hook">
-<title>Specify default save filename</title>
+<title>Specify default save mailbox</title>
<para>
-Usage: <literal>save-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>filename</emphasis>
+Usage: <literal>save-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
</para>
<para>
-This command is used to override the default filename used when saving
-messages. <emphasis>filename</emphasis> will be used as the default filename if the message is
-<emphasis>From:</emphasis> an address matching <emphasis>regexp</emphasis> or if you are the author and the
-message is addressed <emphasis>to:</emphasis> something matching <emphasis>regexp</emphasis>.
+This command is used to override the default mailbox used when saving
+messages. <emphasis>mailbox</emphasis> will be used as the default if the message
+matches <emphasis>pattern</emphasis>, see <xref linkend="pattern-hook"/> for information
+on the exact format.
</para>
<para>
-See <xref linkend="pattern-hook"/> for information on the exact format of <emphasis>pattern</emphasis>.
+To provide more flexibility and good defaults, Mutt applies the
+expandos of <link linkend="index-format">$index_format</link> to
+<emphasis>mailbox</emphasis> after it was expanded.
</para>
<para>
<para>
<screen>
+# default: save all to ~/Mail/<author name>
+save-hook . ~/Mail/%F
+# save from me@turing.cs.hmc.edu/me@cs.hmc.edu to $folder/elinks
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
+# save from aol.com to $folder/spam
save-hook aol\\.com$ +spam
</screen>
to <link linkend="record">$record</link> mailbox.
</para>
+<para>
+To provide more flexibility and good defaults, Mutt applies the
+expandos of <link linkend="index-format">$index_format</link> to
+<emphasis>mailbox</emphasis> after it was expanded.
+</para>
+
<para>
See <xref linkend="pattern-hook"/> for information on the exact format of <emphasis>pattern</emphasis>.
</para>
<para>
This command is a shortcut, equivalent to doing both a <link linkend="fcc-hook">fcc-hook</link>
-and a <link linkend="save-hook">save-hook</link> with its arguments.
+and a <link linkend="save-hook">save-hook</link> with its arguments,
+including %-expansion on <emphasis>mailbox</emphasis> according
+to <link linkend="index-format">$index_format</link>.
</para>
</sect1>
** necessary, soft-fill will eat text leftwards to make room for
** rightward text.
** .pp
+ ** Note that these expandos are supported in
+ ** ``$save-hook'', ``$fcc-hook'' and ``$fcc-save-hook'', too.
+ ** .pp
** See also: ``$$to_chars''.
*/
{ "ispell", DT_PATH, R_NONE, UL &Ispell, UL ISPELL },