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/ |
