-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Tuesday, August  4 at 07:14 PM, quoth ed:
> Today I was wondering if it would be possible to send an entire 
> message through a filter before taking the result of that filter as 
> the input to form a new message.
>
>  '| /home/$USER/bin/filter | vim -'

Sure, it can be done. Not exactly like that, though. The thing is that 
mutt creates the temporary file for new messages; it doesn't simply 
pass the message as standard in for the editor. So your filter has to 
respect the fact that mutt already created the file. Try this: set 
$editor to be a script... let's say ~/myfilter.sh. Now create the 
script:

     #!/bin/sh
     filename="$1"
     /home/$USER/bin/filter <"$filename" >"$filename".tmp
     mv "$filename".tmp "$filename"
     exec vim "$filename"

Of course, I may have misunderstood what you're asking.

~Kyle
- -- 
The most wasted of all days is one without laughter.
                                                        -- e e cummings
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKeQNnAAoJECuveozR/AWeepYP/36VYeLm43Kyja4rMP4FnxMd
j0vXirtl4fY+CyhamDNOlJlVQ+JZcZ6EAz+sye3Qy109u4DceVjhKmlJg6LDqEeW
QDgIzJRaJMtRu+lr9ZQ88BrfaUJSwbZiVRqCAYVh6PdGfVhUwQ1v9ZNPsfi879wS
ZqmNV0zXr/7BX+UGHDspxeWCzXW+McJ3W6E43xDWxEotrnLwFGwjqdiZXYkzyUoJ
zNFGm9PdHbdx6R5+oPBVadmcwlPVmSTiPqAlW16jGXCZCE4Ug75xeTLWEfHe4c4E
K7rxEUGt+FnC3Ln5FtBezhpr9+9yuwhrdBya98KoNvFQES+c4dc8uFEAZUY3sh2x
9ICr/POfU85aiRrR8Xwt0lb4+0cH05kqKxe4y+HP4oSkneCmI5VwSL2YHOJV65oy
m5VoShz3LXTw5t8bTc4Cz47HtxQBWXdmC3VrlQf/32tqjUhyectkDSDALoiPAodw
/jDJnDCJMuH6E3R1w8WVbNta9TKlU7bq/mpRlF/lXys9BkIvy/uqx14G6MrMH0yK
IbCVWgWeAWutoevUmnMD49//H//G6Fq3tXTlws5qIETU2EMYWQJjnvRvv+kUZfOZ
q+tGyuugeapvt8hgIXy49mwuaPz/gIvJ5Dbu8IEBO1w3FZ4hmJtaSAS89M1wTACn
VhwKTV72/koko0AWBkrF
=2yVE
-----END PGP SIGNATURE-----

Reply via email to