Re: Complex fcc-hook?
On Wed, Aug 21, 2002 at 04:09:59AM -0700, Ryan Sorensen wrote: > For an odd reason, fcc-save-hook seems to be order dependent.. The > default hook'll override the specific one there. folder-hook doesn't > seem to do the same thing. It took me a few minutes to try changing the > order to the one they are now. The purpose of an fcc-save-hook is to select a mailbox. You can only Fcc to one mailbox, so mutt stops searching the list of fcc-save-hooks at the first hook whose pattern match succeeds. The purpose of a folder-hook is to execute a command. You can execute several commands when changing folders, so mutt searches the entire list of folder-hooks and executes every hook whose pattern match succeeds. This means that if some folder-hooks set the same variable to different values, the _last_ one in the list whose pattern match succeeds "wins", whereas the _first_ fcc-save-hook in the list whose pattern match succeeds "wins". This also means that the order of folder-hooks should be from more general patterns to more specific patterns (e.g., the default hook should be first), whereas the order of fcc-save-hooks should be from more specific patterns to more general patterns (e.g., the default hook should be last). HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |
Re: Complex fcc-hook?
msg.pgp Description: PGP message
Re: Complex fcc-hook?
Ryan -- Gee, it must be fcc-hook day on the list... ...and then Ryan Sorensen said... % % I have procmail and mutt set up so mails for lists are automatically put % in =lists/listname, and mutt recognizes every subdirectory name in that % directory as a list. Not bad. % % listname is the part before the @, like mutt-users for this one. Hokay. % % Default save for other things, people, mainly, is in =people/name, where % again, name is the part before the @. OK. % % How can I create fcc-hooks to put sent mail in the right directories? I'd try something like fcc-save-hook . =people/%O# use "original" target but in this subdir fcc-save-hook (list1|list2|...) =lists/%O for starters. Since you have all of your list mail separated out, you could have a script walk the directory and generate the list hook(s), and all you have to do is ensure that you get the first list post (if you post before you receive) saved into the right directory and then let your muttrc handle it all again. HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg30396/pgp0.pgp Description: PGP signature
Complex fcc-hook?
I have procmail and mutt set up so mails for lists are automatically put in =lists/listname, and mutt recognizes every subdirectory name in that directory as a list. listname is the part before the @, like mutt-users for this one. Default save for other things, people, mainly, is in =people/name, where again, name is the part before the @. How can I create fcc-hooks to put sent mail in the right directories?