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: new
Priority: major | Milestone:
Component: mutt | Version: 1.5.20
Keywords: mutt_needs_mailcap text/html view-attach |
------------------------------------------------------+---------------------
Comment(by ajschorr):
I will try rebinding <Return> to view-mailcap to see if that solves my
problems. But no, as we both probably understand, I am not suggesting an
infinite loop. If they both fail, of course
one would return an error. The code snippet that disturbs me is here in
mutt_view_attachment:
if (use_mailcap)
{
entry = rfc1524_new_entry ();
if (!rfc1524_mailcap_lookup (a, type, entry, 0))
{
if (flag == M_REGULAR)
{
/* fallback to view as text */
rfc1524_free_entry (&entry);
mutt_error _("No matching mailcap entry found. Viewing as
text.");
flag = M_AS_TEXT;
use_mailcap = 0;
}
else
goto return_error;
}
}
When the flag is set to M_MAILCAP (as it is in the view-mailcap mode),
then it throws
an error if rfc1524_mailcap_lookup fails. By contrast, the view-attach
mode falls back
to viewing as text. So by calling view-mailcap, we lose this fallback
text mode behavior.
I will see whether this turns out to be a problem in practice.
Regards,
Andy
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3460#comment:8>
Mutt <http://www.mutt.org/>
The Mutt mail user agent