On Sun, Oct 25, 2020 at 11:39:13AM +0900, Kenichi Asai wrote:
For docx file, I think I have exactly the same thing:

application/vnd.openxmlformats-officedocument.wordprocessingml.document;open -a 
preview -n -W %s; nametemplate=%s.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document;textutil
 -stdout -cat txt %s; copiousoutput

but the file is always opened using preview, no matter I press Enter
or m.  Why?  How can I configure so that when I press Enter, textutil
is used but when I enter m, preview is used?

The attachment viewing code is a bit convoluted. I don't believe there is currently a way to do what you want.

text/* is treated specially. Mutt considers it pager-renderable and won't directly use the mailcap file unless invoked via <view-mailcap>. Otherwise it renders the content as if it were auto_view'ed inside the message. (The rendering code in turn uses the copiousoutput flag mailcap entries.)

The application/* always uses mailcap whether invoked via <view-attach> or <view-mailcap>. This will find the first entry and invoke it interactively. The only way to view it in the pager is using auto_view.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to