From: Nicholas Harrison <nicholasharrison222@gmail.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 44338@debbugs.gnu.org
Subject: bug#44338: 27.1; EWW can't download and view pdf
Date: Tue, 3 Nov 2020 16:52:40 -0700 [thread overview]
Message-ID: <CAGdSj9EDrveZ0EsGPvd=d2hdA3PnueX+ExhOH=Y+pfKgBgYOJQ@mail.gmail.com> (raw)
In-Reply-To: <878sbmo6i0.fsf@tcd.ie>
[-- Attachment #1.1: Type: text/plain, Size: 2705 bytes --]
I'll make a couple more comments on the original problem I explained. It
looks like you may have identified additional improvements in the process.
I believe the first problem for me is that both mailcap-mime-data
and mailcap-user-mime-data are nil. This causes the `error in process
filter: mailcap-view-mime: Symbol’s function definition is void: nil` and
makes the pdf download and appear in Fundamental mode. This occurs whether
I will be using doc-view-mode or pdf-view-mode. I'll use DocView for the
rest of this example.
1. emacs -Q
2. M-x eww
3. https://www.gnu.org/software/emacs/manual/pdf/emacs-xtra.pdf
This results in the error message and the following:
[image: image.png]
This can be (partially) corrected by running the following code before the
steps 2 and 3:
(add-to-list 'mailcap-user-mime-data
'((type . "application/pdf")
(viewer . doc-view-mode)))
This chooses a view mode for the pdf but that brings the second problem.
This selects the default encoding of raw-text and the conversion fails:
[image: image.png]
Instead I choose doc-view-mode manually for the eww pdf buffer:
[image: image.png]
Then selecting binary for the encoding finally gets a viewable pdf:
[image: image.png]
I hope this is in some way helpful.
Nicholas
On Sat, Oct 31, 2020 at 7:43 AM Basil L. Contovounesios <contovob@tcd.ie>
wrote:
> Nicholas Harrison <nicholasharrison222@gmail.com> writes:
>
> > Using the EWW browser, I can navigate around to webpages, but navigating
> > to a pdf fails. It appears to download an unreadable pdf. Downloading
> > and viewing the pdf manually in emacs (pdf-view-mode) works fine.
> >
> > I've tried these solutions to no avail:
> > - Adding "application/pdf; emacsclient %s" to a ~/.mailcap file. This
> > makes the process hang indefinitely.
> > - Running the following elisp code:
> > `(add-to-list 'mailcap-user-mime-data
> > '((type . "application/pdf")
> > (viewer . pdf-view-mode)))`
> > This doesn't seem to have an effect.
>
> Seems to have been fixed on master:
>
> 1. emacs -Q
> 2. M-x eww RET https://www.gnu.org/software/emacs/manual/emacs.html RET
> 3. C-s extra pdf RET RET
>
> This opens the "Specialized Emacs Features" manual in a *eww pdf* buffer
> in doc-view-mode.
>
> With PDF Tools and the mailcap-user-mime-data setting above installed,
> it opens in pdf-view-mode instead.
>
> I'm surprised the setting for mailcap-user-mime-data is needed though,
> since pdf-view-mode appears before doc-view-mode in both
> mailcap-mime-data and my version of auto-mode-alist.
>
> Lars?
>
> --
> Basil
>
[-- Attachment #1.2: Type: text/html, Size: 3921 bytes --]
[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 73558 bytes --]
[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 93307 bytes --]
[-- Attachment #4: image.png --]
[-- Type: image/png, Size: 37758 bytes --]
[-- Attachment #5: image.png --]
[-- Type: image/png, Size: 38711 bytes --]
next prev parent reply other threads:[~2020-11-03 23:52 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 22:20 bug#44338: 27.1; EWW can't download and view pdf Nicholas Harrison
2020-10-31 13:43 ` Basil L. Contovounesios
2020-10-31 16:35 ` Jean Louis
2020-10-31 17:14 ` Nicholas Harrison
2020-10-31 23:16 ` Nicholas Harrison
2020-11-01 14:56 ` Basil L. Contovounesios
2020-11-03 23:24 ` Basil L. Contovounesios
2020-11-05 15:13 ` Lars Ingebrigtsen
2020-11-05 17:37 ` Basil L. Contovounesios
2020-11-01 14:20 ` Lars Ingebrigtsen
2020-11-01 14:59 ` Basil L. Contovounesios
2020-11-02 14:59 ` Lars Ingebrigtsen
2020-11-02 16:50 ` Basil L. Contovounesios
2020-11-03 14:49 ` Lars Ingebrigtsen
2020-11-03 21:28 ` Basil L. Contovounesios
2020-11-05 15:12 ` Lars Ingebrigtsen
2020-11-05 17:36 ` Basil L. Contovounesios
2020-11-05 20:40 ` Basil L. Contovounesios
2020-11-03 23:52 ` Nicholas Harrison [this message]
2020-11-04 0:23 ` Basil L. Contovounesios
2020-11-04 1:01 ` Nicholas Harrison
2020-11-04 15:10 ` Eli Zaretskii
2020-11-04 0:25 ` Basil L. Contovounesios
2020-11-04 15:07 ` Eli Zaretskii
2020-11-04 20:01 ` Basil L. Contovounesios
2020-11-04 23:43 ` Nicholas Harrison
2020-11-05 13:42 ` Eli Zaretskii
2020-11-05 13:42 ` Eli Zaretskii
2020-11-05 15:18 ` Nicholas Harrison
2020-11-05 15:49 ` Eli Zaretskii
2020-11-05 17:52 ` Nicholas Harrison
2020-11-05 17:55 ` Eli Zaretskii
2020-11-05 19:04 ` Basil L. Contovounesios
2020-11-05 19:20 ` Eli Zaretskii
2020-11-05 21:17 ` Basil L. Contovounesios
2020-11-06 5:29 ` Eli Zaretskii
2020-11-05 20:40 ` Lars Ingebrigtsen
2020-11-05 21:25 ` Basil L. Contovounesios
2020-11-06 2:12 ` Nicholas Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGdSj9EDrveZ0EsGPvd=d2hdA3PnueX+ExhOH=Y+pfKgBgYOJQ@mail.gmail.com' \
--to=nicholasharrison222@gmail.com \
--cc=44338@debbugs.gnu.org \
--cc=contovob@tcd.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.