Delurking to offer an explanation...
On Tue, May 16, 2000 at 11:00:46AM -0400, Chris Woodfield wrote:
> Ok, I think I'm having trouble understanding the conecpt of the hooks. Can
> someone try to explain it a bit better than the manual does?
A 'hook' is a means of allowing a user to customize what happens under certain
conditions. Consider: most programs do exactly what their programmers told
them to do -- no more, no less -- even if the user has a better idea. Now, in
an open-source world, you could always patch the code, but only if you
actually know how.
So, in general terms, a hook allows you to add functionality that YOU want to
an event. More specifically, the save-hook allows you specifiy a pattern to
modify the behaviour of saving a message. To steal and Steffan Hoek's example:
save-hook "[EMAIL PROTECTED]" +target
says that for any mail from <[EMAIL PROTECTED]> (or, if it's mail you sent, any
mail TO that address), the default save mailbox is not '+email' but '+target'.
I do not believe, however, that there is any easy way to mimic PINE's
behaviour, per se. On the other hand, if you cursor up when prompted for a
mailbox to save to, it will scroll up through the history of mailboxes you've
saved to.
So the real question is: do you want to mimic PINE's functionality for the
sake of it, or do you just want to be able to save messages where you really
want them easily :-) If the latter, which is what I suspect, then it would
help if you told us what you really wanted to do.
If you want ALL outgoing mail to go to a specific box, you can 'unset
force_name' and 'save_name' and 'set record'.
If you want mail from a specific bunch of people to go to a particular box,
however, save-hook is probably your baby.