Discussion:
Mutt internal command to write the entire email message
(too old to reply)
cjsmall
2022-10-27 21:02:32 UTC
Permalink
Now that I have a Christian Ebert's filter program to display HTML messages
with their embedded images, I've written a macro to filter these messages
from the index and pager menus as follows:

macro index A |viewhtmlmsg\n
macro pager A |viewhtmlmsg\n

This works great.

I'd like to add a macro that does the same thing from the attach page, but
the default is to only pipe out the selected attachment. I'm looking for a
command like the non-existent <save> or <write> that sends the entire
message to stdout regardless of which page you are on. I've tried
<save-message> but it prompts for a location.

Is there another command that does the job or is there a way to instruct
<save-message> to write to stdout? I even tried:

<save-message>/dev/stdout |viewhtmlmsg\n

but this results in a "permission denied" error. Any thoughts?
Tavis Ormandy
2022-10-28 00:27:53 UTC
Permalink
Post by cjsmall
Now that I have a Christian Ebert's filter program to display HTML messages
with their embedded images, I've written a macro to filter these messages
macro index A |viewhtmlmsg\n
macro pager A |viewhtmlmsg\n
This works great.
I'd like to add a macro that does the same thing from the attach page, but
the default is to only pipe out the selected attachment. I'm looking for a
command like the non-existent <save> or <write> that sends the entire
message to stdout regardless of which page you are on. I've tried
<save-message> but it prompts for a location.
Is there another command that does the job or is there a way to instruct
Hmm, I guess you have two options, you could do something like this:

macro attach A "<save-message>/tmp/viewmsg<Enter><shell-escape>viewhtmlmsg /tmp/viewmsg<Enter>"

If that's not really what you were hoping for, I think your only option
is to leave the attachment screen:

macro attach A "<exit><pipe-message>viewmsg<Enter>"

Although you could go back when you're done...

macro attach A "<exit><pipe-message>viewmsg<Enter><view-attachments>"

Tavis.
--
_o) $ lynx lock.cmpxchg8b.com
/\\ _o) _o) $ finger ***@sdf.org
_\_V _( ) _( ) @taviso
cjsmall
2022-10-28 18:13:26 UTC
Permalink
Post by Tavis Ormandy
Post by cjsmall
Now that I have a Christian Ebert's filter program to display HTML messages
with their embedded images, I've written a macro to filter these messages
macro index A |viewhtmlmsg\n
macro pager A |viewhtmlmsg\n
This works great.
I'd like to add a macro that does the same thing from the attach page, but
the default is to only pipe out the selected attachment. I'm looking for a
command like the non-existent <save> or <write> that sends the entire
message to stdout regardless of which page you are on. I've tried
<save-message> but it prompts for a location.
Is there another command that does the job or is there a way to instruct
macro attach A "<save-message>/tmp/viewmsg<Enter><shell-escape>viewhtmlmsg /tmp/viewmsg<Enter>"
If that's not really what you were hoping for, I think your only option
macro attach A "<exit><pipe-message>viewmsg<Enter>"
Although you could go back when you're done...
macro attach A "<exit><pipe-message>viewmsg<Enter><view-attachments>"
Tavis.
Two great suggestions Tavis. I like the exit the attach page idea since it
doesn't create a temporary file that needs to be cleaned up.

Thank you for helping me see outside the box! :-)

Loading...