LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 02-17-2013, 09:40 AM   #1
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Rep: Reputation: 22
Another Mutt Problem: MIME Viewing & mailcap


Yep, I'm back with another puzzler. In mutt 1.4.2.3 I can view a text/html attachment with lynx as specified in my ~/.mailcap file:

Code:
# $Id$

text/html; cat %s | lynx -stdin
image/gif; xv %s
image/jpg; display %s
application/pgp-keys; pgp -f < %s ; copiousoutput
With the *same* .mailcap file viewing of text/html fails in 1.5.21 with this message:

Quote:
[-- text/html is unsupported --]
mailcap entry for type text/html not found
I've relocated the mailcap file; I've tried other syntax for the lynx entry, but no joy. I'm going nuts trying to get a handle on this.

Ideas?
 
Old 02-17-2013, 09:53 AM   #2
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 94

Rep: Reputation: 58
Maybe try this one:

Code:
text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html
 
Old 02-17-2013, 03:14 PM   #3
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 650

Rep: Reputation: 92
On my own system I use w3m as this offers better html table support with the following in my mailcap:

Code:
text/html; /usr/bin/w3m -cols 90 -dump -T text/html '%s'; copiousoutput
and the following in .muttrc

Code:
set mailcap_path="~/mail/mutt/mutt_mailcap"
auto_view text/html                      # Automatically parse html messages through w3m
auto_view text/x-vcard                   # vcard attachments viewed through mutt.vcard.filter
set implicit_autoview=yes                # Load in pager if setting in .mailcap says 'copiousoutput'.
(I have a specific mailcap file for mutt).
 
Old 02-18-2013, 04:26 PM   #4
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
First, the suggestion for using the -dump option with lynx works. I changed it a little:
Code:
text/html; lynx -nonumbers -dump %s; copiousoutput; nametemplate=%s.html
to eliminate clutter from numbered references.

Yet here's a suggestion right from the mutt html documentation:
Code:
text/html; lynx %s; nametemplate=%s.html
that FAILS to launch lynx.

I'll have to see how I like using the copiousoutput text dump.

Thanks for proposing a solution. The failure to launch lynx directly still bugs me though.
 
Old 02-19-2013, 04:00 PM   #5
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
A final thought:

I removed the text/html; entry in .mailcap and added this macro:
Code:
macro  attach  "l" "|lynx -stdin \r" "View text/html with lynx"
Now I can hit "v" to view the attachment list, then "l" to launch lynx directly.

Thanks again for the help.
 
Old 02-20-2013, 02:28 PM   #6
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 94

Rep: Reputation: 58
Just for the record.
If you have these two in the mailcap:

Code:
text/html; lynx %s; nametemplate=%s.html
text/html; lynx -nonumbers -dump %s; copiousoutput; nametemplate=%s.html
The first entry still works in the "view-attachments" i.e "v" command in the main
pager, but mutt has changed in the way, that if you use "Enter" on the attachment,
the line with "copiousoutput" is used. And if you use "m" i.e force mailcap use,
the first line is used, and you see the page in the real lynx window.

Enjoy

Last edited by ml4711; 02-20-2013 at 02:48 PM.
 
1 members found this post helpful.
Old 02-20-2013, 04:35 PM   #7
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
Now that IS interesting. I certainly missed the "m" entry in the docs. I can't wait to try this out.

Thanks for sharing your expertise.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I have failed to add a mime-type for sc files to .mailcap RandomTroll Linux - Software 1 02-19-2012 07:30 PM
[SOLVED] codelite crash, after message Mailcap file /etc/mailcap, line 111.... kaz2100 Linux - Software 1 09-05-2011 08:20 PM
Strip Mime & HTML from MBOX files Andrew_OC Linux - Server 8 03-28-2007 04:18 AM
mime/mailcap cli launcher? gunnix Linux - Software 1 10-19-2005 03:11 PM
Stable IP&Viewing IPs&Spying in LAN mohtasham1983 Linux - Newbie 7 06-15-2005 04:16 PM


All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration