J Horacio MG <[EMAIL PROTECTED]> wrote on Wed, 29 Sep 1999:
> macro generic \e0 "!~/sigscript\r"
> send-hook '~C anyone@anyplace\.com' "push \e0"
> send-hook '~C anyone@anyplace\.com' "set signature=~/timeup.sig"

> If there's a better way to get this, I'd like to know, but would also
> like to know why these hooks are not running in the supposed order.

First, "a better way":

It's possible to set your signature to an output from a program, like

  set signature="randsig.sh .sig-body|"

Which runs the command "randsig.sh .sigh-body" and uses the output from
that as the signature.  With a send-hook (like I use it), that would be:

  send-hook .      'set signature="randsig.sh .sig-body|"'

So you can probably easily modify your sigscript to print to STDOUT
instead of it changing timeup.sig, and then use something like:

  send-hook '~C anyone@anyplace\.com' "set signature=~/sigscript|"


As for why the send-hooks aren't executed like you expect...  Well, what
happens is that send-hooks are evaluated after you have given the
recipient address (when Mutt gives the To: and possibly the Cc: prompt)
and subject, and right before the editor is started.  At this point, if
you "push" any keystrokes into the buffer, they end up queued until you
exit from the message composition.  From Mutt's point of view, you're
still doing a single action -- sending mail -- and anything pushed will
only execute until that's over.  (Anyone who knows better than me is
welcome to give a better explanation about this...)


HTH,
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 /
What if there were no hypothetical situations?

Reply via email to