Re: Fcc hook simplicity?
* Karl. <kmw1@xxxxxxxxxxx> [2006-06-12 08:53:22 +1200]:
> ..references the current folder at the time of assignment. ie. doing
> this by itself:
>
> set record="^"
>
> won't generally do anything useful since the value of record is being
> set to whatever the current folder is when that line is interpreted
> (when muttrc is loaded, *not* what it is at the time when the copyself
> mail is being saved. If you put this in your muttrc (with nothing else
> modifying record) then you'll get record set to nothing useful. You
> will not get the arguably desired effect of copyself emails being put in
> whatever folder you are currently in. To do that you need to use a
> folder-hook - these are triggered when you *enter* folders (at which
> time ^ has a meaningful value)
>
> I use this:
>
> set record ="+z_sent" # default copyself folder
> for batch mode
> folder-hook . 'set record="+z_sent"' # default copyself folder
> for interactive mode
> folder-hook +list-* 'set record="^"' # use current-folder for
> mailling-list copyselfs
>
> The first line is to set a record folder for emails sent from the
> command-line (by scripts etc) - since Mutt never gets to enter a folder
> in such a case, the folder hooks would never get triggered and record
> would never have got set.
>
> The second line sets a default folder for folders in general, and most
> importantly, resets the value when I go into a general folder after
> having been in one of the 'list-*' folders. Otherwise, record would
> stay pointing to whichever list-* folder I was in most recently.
>
> The third line sets the usage of the current folder whenever I enter one
> of my mailling-list folders.
Interesting. I hadn't thought of the bach mode yet...
--
Cheers,
Dave