Re: Pipe and replace message

2023-11-22 Thread Michael Kjörling
On 22 Nov 2023 20:12 +0100, from da...@santinoli.com (David Santinoli):
> I could not find a way to pipe a message to an external filter and have
> the output replace the original message.

You can set $editor to any script you want and cause 
(or  or  as applicable) to be invoked. Make the
script put the replacement contents (including headers if those are
passed in) back in the named file when you're done, return success,
and you should get much the effect you're after.

-- 
Michael Kjörling  https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Pipe and replace message

2023-11-22 Thread David Santinoli


Hallo,

I could not find a way to pipe a message to an external filter and have
the output replace the original message.  As a workaround I open the
message in vim, pipe the whole buffer to the filter, and save it back as
a new message while the original one gets marked for deletion.
It works but it's a bit cumbersome.  Anything more straightforward —
possibly from the index screen?

I'm using mutt 2.1.4 as included in Ubuntu 22.04.


Thanks,
 David