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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Thu, 05 Nov 2020 19:04:55 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Nicholas Harrison <[email-masked]>
>> Date: Thu, 5 Nov 2020 10:52:10 -0700
>> Cc: [email-masked]
>> 
>> No, it didn't ask me for an encoding.
>> 
>> Good stab in the dark. I ran your new function code and the mailcap-user-mime-data code again (after
>> loading eww). No debugger triggered. It converted and showed the pdf correctly.
>
> Great, then the change Basil already made locally will also solve the
> last part of the problem.

The change is no longer local, which prompted some off-list comments
from Stefan that confused me.

mailcap-view-mime already binds coding-system-for-write to 'binary
before writing to a file and spawning a subshell, so why does the
coding-system-for-write matter in its caller eww-display-pdf?

In other words, can we remove the binding altogether from
eww-display-pdf and make the *eww pdf* buffer unibyte, as Stefan
suggested?

Could something funny happen / be happening during insertion from one
buffer into the other in eww-display-pdf?

Thanks,

-- 
Basil