<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #3460: view-attachments menu "view-attach" command uses auto_view for all text attachments, even when a suitable interactive command is in the mailcap file. This is particularly bad for text/html attachments.



#3460: view-attachments menu "view-attach" command uses auto_view for all text
attachments, even when a suitable interactive command is in the mailcap
file.  This is particularly bad for text/html attachments.
-----------------------+----------------------------------------------------
  Reporter:  ajschorr  |       Owner:  mutt-dev                                
      Type:  defect    |      Status:  reopened                                
  Priority:  major     |   Milestone:                                          
 Component:  mutt      |     Version:  1.5.20                                  
Resolution:            |    Keywords:  mutt_needs_mailcap text/html view-attach
-----------------------+----------------------------------------------------

Comment(by ajschorr):

 I have a few more thoughts on this:

 1. Perhaps the patch should also add the new function to the compose menu.

 2. When calling mutt_view_attachment with flag M_MAILCAP (as is done from
 the
 view-mailcap function), why is it desirable to throw an error instead of
 falling
 back to viewing as text?   I'm not sure why a new view-mailcap-fallback
 function
 is needed -- why can't we simply change the view-mailcap function to
 fallback to
 text?  Is there a usage case where throwing an error is better than
 falling back to text?

 3. I think the documentation of the current behavior is at best
 misleading.  In section
 3.3.2 of the manual, it describes the procedure for handling mailcap
 entries for text/html
 files (this is my exact usage case), and it talks about the <view-attach>
 function.  The last
 sentence of that section says that <view-attach> needs to have the
 copiousoutput entry last.
 But in fact, this is not true -- <view-attach> chooses the text/html
 copiousoutput entry
 and ignores the one above it.

 I spent an hour debugging this problem after upgrading.  I ended up
 downloading the source
 code and debugging the program to find the source of the behavioral change
 (the patch
 to mutt_needs_mailcap).  I had checked the documentation first, and that
 section does not
 explain the current behavior correctly, IMHO.

 So let's please either patch the code to match the documentation or fix
 the docs.  And
 also let's please fix <view-mailcap> to fallback to text so that users can
 have a good
 choice about how to bind this menu.

 Regards,
 Andy

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3460#comment:15>
Mutt <http://www.mutt.org/>
The Mutt mail user agent