On Sun, Oct 25, 2020 at 09:41:11AM -0700, Kevin J. McCarthy wrote:
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.

In git master, I've just added a new function, <view-pager> which will use a copiousoutput mailcap entry, or else fall back to displaying raw text.

I find this behavior more helpful than <view-text>, which I rarely need, so I've bound T to <view-pager> instead, and Esc-t to <view-text>.

  bind attach \et view-text
  bind attach T view-pager

I've also added a section in the manual that describes the different attachment viewing functions: <https://muttmua.gitlab.io/mutt/manual-dev.html#attach-viewers>

--
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