Re: macro/prompt to trigger mailcap?

2018-07-19 Thread ilf

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.


signature.asc
Description: PGP signature


Re: macro/prompt to trigger mailcap?

2018-07-19 Thread Darac Marjal

On Tue, Jul 17, 2018 at 09:53:54PM +0200, ilf wrote:

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.


signature.asc
Description: PGP signature


Re: macro/prompt to trigger mailcap?

2018-07-18 Thread Cameron Simpson

On 17Jul2018 21:53, ilf  wrote:

How do you handle attachments?


I confess I inline the ones which I can. PDF->text, images -> size and format 
info, etc.


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