Subject: Re: bug#44338: 27.1; EWW can't download and view pdf

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 03 Nov 2020 21:28:58 +0000

Lars Ingebrigtsen <[email-masked]> writes:

> (pp mailcap--computed-mime-data (current-buffer))
> =>
>
>   ("pdf"
>    (viewer . doc-view-mode)
>    (type . "application/pdf")
>    (test . window-system))
>   ("pdf"
>    (viewer . pdf-view-mode)
>    (type . "application/pdf")
>    (test . window-system))
>
> So doc-view-mode is ahead of pdf-view-mode in the computed structure...
>
> Ah; mailcap-mime-data entries are handled in opposite order -- the final
> matching entry is the one that wins, not the first one?  Looks like it.

Yes, mailcap--computed-mime-data is in reverse order w.r.t. both major
and minor mime types.

> I've now noted this in the doc string, and I've also moved pdf-view-mode
> later, because it makes sense to prefer that if it's installed (since
> doc-view-mode is build in.

Alternatively, mailcap--computed-mime-data could be kept in canonical
order, e.g. in mailcap-add-mailcap-entry?

[BTW, I don't see the function mailcap-add used anywhere.]
[And neither do I see your changes on Savannah. ;]

Thanks,

-- 
Basil