From: Rocco Rutte Date: Tue, 20 Nov 2007 18:46:52 +0000 (+0100) Subject: Document that save-hook/fcc-hook/fcc-save-hook use $index_format expandos. Closes... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce5bc8dffdff126e01a909f6dbe0c1467959d0b2;p=neomutt Document that save-hook/fcc-hook/fcc-save-hook use $index_format expandos. Closes #2135. --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index fb5952d79..610863edd 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -2671,21 +2671,23 @@ hdr_order From Date: From: To: Cc: Subject: -Specify default save filename +Specify default save mailbox -Usage: save-hook [!]pattern filename +Usage: save-hook [!]pattern mailbox -This command is used to override the default filename used when saving -messages. filename will be used as the default filename if the message is -From: an address matching regexp or if you are the author and the -message is addressed to: something matching regexp. +This command is used to override the default mailbox used when saving +messages. mailbox will be used as the default if the message +matches pattern, see for information +on the exact format. -See for information on the exact format of pattern. +To provide more flexibility and good defaults, Mutt applies the +expandos of $index_format to +mailbox after it was expanded. @@ -2695,7 +2697,11 @@ Examples: +# 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 @@ -2722,6 +2728,12 @@ as the default Fcc: mailbox. If no match is found the message will be saved to $record mailbox. + +To provide more flexibility and good defaults, Mutt applies the +expandos of $index_format to +mailbox after it was expanded. + + See for information on the exact format of pattern. @@ -2746,7 +2758,9 @@ Usage: fcc-save-hook [!]pattern This command is a shortcut, equivalent to doing both a fcc-hook -and a save-hook with its arguments. +and a save-hook with its arguments, +including %-expansion on mailbox according +to $index_format. diff --git a/init.h b/init.h index 62c13b624..ce83fc1b4 100644 --- a/init.h +++ b/init.h @@ -1074,6 +1074,9 @@ struct option_t MuttVars[] = { ** 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 },