Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361313 - mail-client/mutt-1.5.21-r1 doesn't display text/html attachments in $BROWSER, but in $PAGER
Summary: mail-client/mutt-1.5.21-r1 doesn't display text/html attachments in $BROWSER,...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL: http://dev.mutt.org/trac/ticket/3460
Whiteboard:
Keywords:
: 361857 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-30 14:32 UTC by Reid Thompson
Modified: 2011-04-05 19:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Thompson 2011-03-30 14:32:08 UTC
Installed versions:  1.5.21-r1(09:17:33 AM 03/29/2011)
Prior to above update, for html emails viewed in pager, I could select 'v' to view the attachments, then arrow down to the text/html attachment and hit enter to open the the text/html attachment in w3m (or lynx, or other handler).  Now, performing these steps results in attachment being handled by autoview and the text dump of the autoview handled page being presented in the pager - i.e. i've lost the ability for text/html attachments to be handled my mailcap mimetype entry???

Reproducible: Always

Steps to Reproduce:
1. view an hmtl email in mutt
2. select 'v' to view attachments
3. move down to text/html attachment
4. hit enter
Actual Results:  
1. view an hmtl email in mutt
2. select 'v' to view attachments
3. move down to text/html attachment
4. hit enter
6. see that pager is populated with autoview dump of text/html page

Expected Results:  
1. view an hmtl email in mutt
2. select 'v' to view attachments
3. move down to text/html attachment
4. hit enter
5. expect w3m to open the text/html page in the pager
6. see that pager is actually populated with autoview dump of text/html page
Comment 1 Fabian Groffen gentoo-dev 2011-03-31 19:07:19 UTC
Nah, it's a change in how mutt works.  It now tries to render using the
built in pager.  Adding this line to your muttrc will probably do:

auto_view text/html
Comment 2 Fabian Groffen gentoo-dev 2011-03-31 19:07:33 UTC
See also the bottom of my guide:                                                
http://dev.gentoo.org/~grobian/guide-to-mutt.xml
Comment 3 Reid Thompson 2011-03-31 19:56:54 UTC
(In reply to comment #1)
> Nah, it's a change in how mutt works.  It now tries to render using the
> built in pager.  Adding this line to your muttrc will probably do:
> 
> auto_view text/html

I have the following in .muttrc:
auto_view text/html                 # uses lynx
auto_view image/jpg
auto_view image/*
auto_view application/PostScript
auto_view application/pdf

I have the following in .mailcap$ cat .mailcap
#text/html; firefox %s
#text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput
#text/html; w3m %s
#
text/html; xw3m.large.nobackground %s; test=testdisp 2>/dev/null; description=HTML Text; nametemplate=%s.html
text/html; w3m %s; needsterminal; description=HTML Text; nametemplate=%s.html
text/html; w3m -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html
image/jpeg; eog %s
application/x-ica; /home/rthompso/ICAClient/linuxx86/wfica.sh %s; x-mozilla-flags=plugin:Citrix ICA Client
Comment 4 Fabian Groffen gentoo-dev 2011-04-01 06:45:22 UTC
I don't understand your problem.  w3m will be used to just view your html, what did you expect to happen?
Comment 5 Reid Thompson 2011-04-01 12:40:14 UTC
(In reply to comment #4)
> I don't understand your problem.  w3m will be used to just view your html, what
> did you expect to happen?

before the update, if I selected 'v' to view an html email, there would be showing an attachment of type text/html.  If i then moved the cursor down to that attachment and hit enter, w3m would render the text/html page as a web page in the pager.  Now, when I select the text/html attachment and hit enter, the attachment is not rendered in w3m as a web page.  It is 'dumped' an displayed as plain text ala...

[-- Autoview using w3m -dump '/tmp/mutt.html' --]
                                                                              Never miss a Sears email.
Plus, 25% off power lawn & garden and a Clearance Sandal Event         [addC] Add sears@value.sears.com to your
View the web version of this email.                                           address book.
[20110212_SRS_FF_Control_FINAL_06]
                           [20110212_SRS_FF_Control_FINAL_09]
Sears                                                                                        forward   print
...snip...
Comment 6 Fabian Groffen gentoo-dev 2011-04-01 12:42:37 UTC
yeah, that is because you use "copiousoutput" in your .mailcap.
Comment 7 Fabian Groffen gentoo-dev 2011-04-01 12:50:47 UTC
I think you have the same problem as in the upstream ticket.  See in particular brendan's comment:


A new configuration variable doesn't really make sense: anyone who can find that variable can also discover that they can press 'm' to view the attachment with mailcap. The new behavior was designed to allow the internal pager to work on individual attachments, which you couldn't do with the old settings. The old behavior is still available under a different key. Just retrain your fingers :)


I'm not sure if the ticket covers your entire problem, but it is best to chime in upstream, as I don't think Gentoo actually introduced the behaviour change with any of the applied patches.
Comment 8 Reid Thompson 2011-04-01 12:56:54 UTC
(In reply to comment #6)
> yeah, that is because you use "copiousoutput" in your .mailcap.

I made no changes to my .mailcap either before or after the update.  It was working before, now it's not.

However, if I change my mailcap to remove the copiousoutput, it still doesn't work as before -- it now 'dump's the attachment using lynx.
I believe that what it used to to do is the first entry in the snip below ... open a w3m browser in the pager and render the text/html as a web page

...snip...
text/html; w3m %s; needsterminal; description=HTML Text; nametemplate=%s.html
text/html; w3m -dump %s; description=HTML Text; nametemplate=%s.html
...snip...



[-- Autoview using /usr/bin/lynx -dump -force_html ''/tmp/mutt.html'' --]
                         [1][gizmag_logo_183x62.png]
                                                    
     Welcome to the newsletter for Gizmag Emerging Technology Magazine.

              These are the headlines for April the 1st, 2011.

   [2][tracking-map.jpg] [3]Your mobile phone is watching you ... closely
..snip...
Comment 9 Fabian Groffen gentoo-dev 2011-04-01 12:58:40 UTC
using 'm' works for me in opening another application for a mailcap application without copiousoutput
Comment 10 Reid Thompson 2011-04-01 13:01:44 UTC
(In reply to comment #7)
> I think you have the same problem as in the upstream ticket.  See in particular
> brendan's comment:
> 
> 
> A new configuration variable doesn't really make sense: anyone who can find
> that variable can also discover that they can press 'm' to view the attachment
> with mailcap. The new behavior was designed to allow the internal pager to work
> on individual attachments, which you couldn't do with the old settings. The old
> behavior is still available under a different key. Just retrain your fingers :)
> 
> 
> I'm not sure if the ticket covers your entire problem, but it is best to chime
> in upstream, as I don't think Gentoo actually introduced the behaviour change
> with any of the applied patches.

Thanks -- 'm' seems to provide what I want -- I'm somehow missing the reference
to the upstream ticket -- how/where do I get/see that?
Comment 11 Fabian Groffen gentoo-dev 2011-04-01 13:03:39 UTC
see the URL field of this bug :)
Comment 12 Reid Thompson 2011-04-01 13:06:47 UTC
(In reply to comment #11)
> see the URL field of this bug :)

got it -- thanks to everyone for the help.
Comment 13 Fabian Groffen gentoo-dev 2011-04-01 13:18:35 UTC
ok, closing then
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-04 11:51:07 UTC
*** Bug 361857 has been marked as a duplicate of this bug. ***
Comment 15 Peter Fox 2011-04-05 19:16:10 UTC
Just an observation (the m key is too far away for me to be convenient):

I added the following to my .muttrc to restore the old behaviour:

bind attach \n view-mailcap