<<< Date Index >>>     <<< Thread Index >>>

Re: how about the notion of filters for replying, etc.



On Thu, Dec 28, 2006 at 08:17:53PM -0500, Sweth Chandramouli wrote:
> Nope.  What's passed to $editor is the message that you are composing.
> What the hypothetical $reply_filter would be passed would be the message
> to which you are responding.

Bingo.

> The trick is then deciding how $reply_filter passes info on to $editor.
> There are two ways that I can see of doing it:

Actually, there's a third.

What I was thinking of would be some kind of hook that can use the
normal pattern matching, and specify a filter.

The filter accepts the message you're replying to as STDIN and sends
the response to STDOUT.  The response is then written to a temporary
file and edited as normal.

If the filter needs to create temporary files, then it can use
mktemp or whatever it likes to create temporary files.  Unix
filters like sort(1) already work this way.

It could be spawned as a co-process, meaning the STDIN/OUT go back
to mutt, but mutt sends the whole email to STDIN and closes before
reading the candidate response so doesn't suffer from buffering
problems normally encountered with interactive co-processes.
-- 
A: No.
Q: Should I include quotations after my reply?
<URL:http://www.subspacefield.org/~travis/> -><-

Attachment: pgpZqILPU0wal.pgp
Description: PGP signature