Subject: bug#43318: Unable to open remote pdf directly with eww

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 10 Sep 2020 21:55:41 +0200

Stefan Kangas <[email-masked]> writes:

> 0. emacs -Q
> 1. M-x eww RET https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf RET
>
> Result: My external pdf reader (titled "Document Viewer", not sure what
> it is, maybe some Gnome thing) opens with the message "Unable to open
> file '/home/skangas/wip/emacs/-'".  It seems like it tried to open the
> file "-" in the directory from which I run Emacs.
>
> It would be useful if this would open the pdf doc-view-mode, or if the
> pdf was downloaded to /tmp and opened using "Document Viewer" from there
> or something.

When I open that link in eww, I get a *eww pdf* buffer which displays
the file (after a while; that's a big pdf) using DocView mode.

So perhaps this fails if whatever tools DocView mode uses isn't
installed?  It looks like it calls...  uhm...  gs?

In that case, it should try using a different pdf viewer, but I'm not
quite sure how that's handled.  mailcap should probably be consulted?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no