Discussion:
macro/prompt to trigger mailcap?
ilf
2018-07-17 19:53:54 UTC
Permalink
How do you handle attachments?

Currently, I use "auto_view text/html" and "implicit_autoview" with
mailcap. However, I would like to not display attachments via mailcap
automatically on opening a mail, but only after pressing another key.
(Never trust attachments
)

Is there any way one could implement this in mutt currently? Maybe with
some kind of macro?
--
ilf

If you upload your address book to "the cloud", I don't want to be in it.
Cameron Simpson
2018-07-18 22:41:52 UTC
Permalink
Post by ilf
How do you handle attachments?
I confess I inline the ones which I can. PDF->text, images -> size and format
info, etc.
Post by ilf
Currently, I use "auto_view text/html" and "implicit_autoview" with
mailcap. However, I would like to not display attachments via mailcap
automatically on opening a mail, but only after pressing another key.
(Never trust attachments…)
Is there any way one could implement this in mutt currently? Maybe with some
kind of macro?
Well, you could keep 2 mailcaps, one lacking the unwanted entries. Have a macro
to switch between them. You can probably write a simple sed or awk script to
comute the stripped one from the full one, and keep it up to date with "make".

Cheers,
Cameron Simpson <***@cskk.id.au>
Darac Marjal
2018-07-19 11:21:58 UTC
Permalink
Post by ilf
How do you handle attachments?
Currently, I use "auto_view text/html" and "implicit_autoview" with
mailcap. However, I would like to not display attachments via mailcap
automatically on opening a mail, but only after pressing another key.
(Never trust attachments
)
Is there any way one could implement this in mutt currently? Maybe
with some kind of macro?
You should be able to do this with judicious used of mailcap entries
[1].

If you have one entry for the mime-type with the "copiousoutput" flag,
and you put that AFTER one without, then mutt will use the copiousoutput
program to auto_view the attachment, but it will invoke the other one
when you "view-mailcap". See section 3.3.2 of the manual.


[1] http://www.mutt.org/doc/manual/manual.html#mailcap
--
For more information, please reread.
ilf
2018-07-19 12:40:23 UTC
Permalink
Post by Darac Marjal
If you have one entry for the mime-type with the "copiousoutput" flag,
and you put that AFTER one without, then mutt will use the
copiousoutput program to auto_view the attachment, but it will invoke
the other one when you "view-mailcap".
Nice. But I'd like to *parse* the attachment only after I pressed a key,
but then all attachments at once.
--
ilf

If you upload your address book to "the cloud", I don't want to be in it.
Loading...