David DeSimone <[EMAIL PROTECTED]> wrote on Mon, 27 Sep 1999:
> For instance, perhaps I am reading mail in my mutt-users folder.  Then
> something jogs my memory, and I realize I need to send mail to my friend
> Joe.  Are you saying that, just because I am viewing mail in my
> mutt-users folder, that my letter to Joe should be saved there instead
> of my usual Fcc?

No, I'm not saying that.  The question was about save-hooks, not
fcc-hooks.

Then again, I can see there being a need to save a FCC to a different
folder than the default when sending mail related to mails in a specific
folder, but that can probably be accomplished with properly crafted
send-hooks.  It would be quite impossible for mutt to determine whether
mail sent while viewing a specific folder was "related" to that folder
or not.

> You see, it shouldn't matter what folder you're in.  You should be able
> to construct a send-hook that triggers on real information, such as whom
> the letter is two, or from, or Cc'd to.

Correct, for send-hooks.

> If you're in your mutt-users folder, and the
> mail that you now send is related to that mailing list, then that
> address probably appears in the headers, and so you should be able to
> construct an fcc-hook or save-hook that does what you want.

Ahh, but I can see more complex issues for constructing save-hooks
than that.  You see, procmail and other mail filtering tools allow for
a very complex methods of filtering.  Mostly these are header-based,
but they can also be based on filtering programs or other rules based
on program output.  Therefore it's entirely possible that Mutt can't
reproduce the rule why a given message was sorted to a particular
folder.  And so you can't have a simple save-hook that could follow
the same rule.  Thus, you need folder-specific save-hooks for messages
in that folder.  Currently the only way to do that is with setting a
save-hook from a folder-hook, but that has the drawback that you can't
undo it.

Admittedly this is a rare case, so it can be argued that the need for
such functionality is not worth adding.

Mutt doesn't allow for "undoing" of hooks.  That's fine, I can
appreciate that it would be too complex to try to keep record of
different states.  You can only "re-do" hooks.  The problem here is
that the default behaviour for mutt for the save command (using the
user's username from the email address) can not be re-established in
any way once you have specified a default save-hook (save-hook .
+folder, or using ~A, or whatever).  The only way to avoid that is
never to establish a default save hook, but this limits you so that
you don't have a complete freedom to define save-hooks which behave
exactly like you'd want.

Maybe then the desired solution would be to have a "magic save-hook"
that re-establishes the default behaviour?  Or is such a thing already
possible, if "save-hook ~l =%B" works?  All that would be required is
to have a %-variable which could be substituted for the username, and
it would be possible to use "save-hook . =%u" to restore the default
behaviour (using %u in this example).


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
Today is the last day of your life so far.

Reply via email to