On 24Feb2014 21:45, LEVAI Daniel <l...@ecentrum.hu> wrote: > On h, febr 24, 2014 at 21:32:23 +0100, Timo Schmidt wrote: > > See http://www.mutt.org/doc/devel/manual.html#tab-attachment-bindings > > in particular: > > <view-mailcap> m force viewing of attachment using mailcap > > Wow, you win. > > But this doesn't make sense: > > Using these mailcap entries: > > text/html; google-chrome %s; nametemplate=%s.html; test=test -n "$DISPLAY" > text/html; lynx -stdin -dump -force_html; copiousoutput > > ... without `auto_view text/html` pressing <Space> on the text/html MIME > part it just displays the raw HTML, but with `auto_view text/html` Mutt > chooses to use the *last* mailcap entry, and ignore the one before it?!
The "copiousoutput" flag is the key item here. "needsterminal" is for interactive tools and copiusoutput is for tools that mutt expects to page for you. So all my mailcaps come in pairs: one with copiousoutput for inline viewing and the other to open a tool to view the attachment. Example: image/x-png; ah %s -1 xv; gui image/x-png; env DISPLAY= iminfo %s; copiousoutput The copiousoutput one is used when showing the image in the message view, and just recites some image parameters (size, etc) using my "iminfo" script. The other one is chosen when I just press enter (<view-attach>) in the attachments view. "ah" is a helper script of my own, but it fires up "xv" to display the image. Cheers, -- Cameron Simpson <c...@zip.com.au> Go read the patents! They're public domain! - overhead by WIRED at the Intelligent Printing conference Oct2006