Add *on-compose-{enter,leave}* hooks (Jens Schleusener, Rudolf Sykora)..
It is a bit of a hack but offering pre- and post-compose hooks is
the only option we have to allow users to create a temporary
environment based on an actual message, like setting head or tail
injections, or do something like Rudolf's
is it possible, when using S/MIME, to sign the mail
only sometimes? (Mostly, it is redundant, only
sometimes it's really wanted.)
Indeed Jens Schleusener (Jens dot Schleusener at t-online dot de)
suggested a mechanism that can be used to react upon target
addresses etc. Though we are far off being really there (e.g.,
like sending the mail directly through different paths or so, if
we EVER get there).
No chance to do something about the body content, but offer new
temporary variables *compose-{from,sender,to,cc,bcc,subject}* in
some kind of string form and hope people can do something with it.
These macros run with `localopts' enabled by default, and any
changes stack up and will be unrolled once the message is sent.
Interestingly this required reordering and outsourcing of a lot of
things from sendout.c to collect.c, and it must be said that it
smells as if it belongs.
It is likely that the entire mechanism will be dropped again, and
completely replaced with something in TODO (some kind of
`onevent'), but that will take years.