From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicholas Harrison Newsgroups: gmane.emacs.bugs Subject: bug#44338: 27.1; EWW can't download and view pdf Date: Tue, 3 Nov 2020 18:01:38 -0700 Message-ID: References: <878sbmo6i0.fsf@tcd.ie> <87lffi55ro.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000033d51705b33d866e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22012"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44338@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 04 02:34:29 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ka7gy-0005YG-BO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 02:34:28 +0100 Original-Received: from localhost ([::1]:34602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ka7gx-0003UI-ER for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Nov 2020 20:34:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ka7Bb-0001vs-9P for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 20:02:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ka7Ba-0007m9-4f for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 20:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ka7Ba-0003Me-2T for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 20:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nicholas Harrison Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Nov 2020 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44338-submit@debbugs.gnu.org id=B44338.160445171812923 (code B ref 44338); Wed, 04 Nov 2020 01:02:02 +0000 Original-Received: (at 44338) by debbugs.gnu.org; 4 Nov 2020 01:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:46888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka7BV-0003MM-Ou for submit@debbugs.gnu.org; Tue, 03 Nov 2020 20:01:58 -0500 Original-Received: from mail-yb1-f171.google.com ([209.85.219.171]:35624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka7BT-0003M8-2T for 44338@debbugs.gnu.org; Tue, 03 Nov 2020 20:01:55 -0500 Original-Received: by mail-yb1-f171.google.com with SMTP id m188so16561888ybf.2 for <44338@debbugs.gnu.org>; Tue, 03 Nov 2020 17:01:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W0G7jgASR7jeyNkjiT+B/URDDF7PGKbFTqBgZqTFeB0=; b=XwuRGFJXFKIzqEDFC+RNSA5t/H1k4yD6BSXuYoWzGd55VK7wEASLd8DFrZhRop/itl BwNjq9iz+a7tqC5YIRxqlfjW7MjC9Y6Ku6iPXYLuHTMZi1H0OclPLFA5Cz2xrcdddy5a XeMQBVjL+53KlTdEEHZJE/tG1Xaw67Uv9cNsd5P2JcP4FFHor+K45FumRt0w9rWtfx2Q vnrTG098lxhO57HFtitwZJdEooUnVZthnpzUmNRd5yo3pYzCU/dOqRj+D7NupmTmoR70 vgPI+8rveKNAQMfOhYKIvCik1IUzjUz2+xr4hzsmUBkpOmX4YzHOa7tSo/aOah36iPzn HvvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W0G7jgASR7jeyNkjiT+B/URDDF7PGKbFTqBgZqTFeB0=; b=m22BuoFS3eUCLjKZklsNiO0DvXjLhrcal3ruHgYJSdffJy+vT5YrVmMdhoCtxy3nYQ 1exDBlAgbN/Gq9zHn2mCtF5CzmhxKexkmB0+X52sdU/60opG2+U4V9TeppgYvW5ZSmuX WpgHnHoghuv6nlhLc2OVX+02KR+QluDd+eMbouz5BnOWJCRcBrOzwnLsu3ig0nexc6dU q9kOEzgBPZ5shZ8NdOFlTzozp7G+R/hk0XlJuleJZpG0GnccSfWrxmAKqg+IcsCB+rQl g20Kw63U1oJ5MRHNu2jy31X1Kjnvardxn4lIYHu/0xhLnWRu41DB+TueZZcdg8+lAxCQ xFxQ== X-Gm-Message-State: AOAM532x2l8hzKOITuNEDpnaNEtefj8M7HuReaXLpw/6vqE2zbQJWOfs yJK5h+MjAdApFog7GQIi22t7cVv7amaEJqAfS0k= X-Google-Smtp-Source: ABdhPJxjzpNOFA89tqbPQ8I26QiDIKuz07i2NfDxxCbIWTBpt5ux7h7cKD7hO8FvFkv9yYnZbPsuQHhJWIge5mhfC8U= X-Received: by 2002:a25:81d1:: with SMTP id n17mr28142698ybm.89.1604451709473; Tue, 03 Nov 2020 17:01:49 -0800 (PST) In-Reply-To: <87lffi55ro.fsf@tcd.ie> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192657 Archived-At: --00000000000033d51705b33d866e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In WSL on 27.1 the mailcap-mime-data problem remains, but past that the conversion when doc-view-mode is enabled works with both binary and the default raw-text. On Tue, Nov 3, 2020 at 5:23 PM Basil L. Contovounesios wrote: > Nicholas Harrison writes: > > > 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=E2=80=99s 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.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: > > > > Instead I choose doc-view-mode manually for the eww pdf buffer: > > > > Then selecting binary for the encoding finally gets a viewable pdf: > > > > I hope this is in some way helpful. > > Thanks. I cannot reproduce these on what will be Emacs 27.2 or Emacs > 28.1 on GNU/Linux. Perhaps they have been fixed already, or are > specific to MS Windows. If someone on MS Windows could check whether > they still occur on master and emacs-27, that would be helpful. > > -- > Basil > > In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo > version 1.16.0, Xaw3d scroll bars) > of 2020-11-03 built on thunk > Repository revision: f9d6e463d310db0e1931f26609d938531c56f9c3 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.1200800= 0 > System Description: Debian GNU/Linux bullseye/sid > > Configured using: > 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-O2 -march=3Dnative' --config-cac= he > --prefix=3D/home/blc/.local --with-x-toolkit=3Dlucid > --with-file-notification=3Dyes --with-x' > > Configured features: > XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB > NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT > LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS > LIBSYSTEMD JSON PDUMPER LCMS2 > > Important settings: > value of $LANG: en_IE.UTF-8 > value of $XMODIFIERS: @im=3Dibus > locale-coding-system: utf-8-unix > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs > rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail > rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs > eieio-loaddefs password-cache json map text-property-search time-date > subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies > mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs > cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils > tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type > mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image > regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode > lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch > timer select scroll-bar mouse jit-lock font-lock syntax facemenu > font-core term/tty-colors frame minibuffer cl-generic cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite charscript charprop > case-table epa-hook jka-cmpr-hook help simple abbrev obarray > cl-preloaded nadvice button loaddefs faces cus-face macroexp files > window text-properties overlay sha1 md5 base64 format env code-pages > mule custom widget hashtable-print-readable backquote threads dbusbind > inotify lcms2 dynamic-setting system-font-setting font-render-setting > cairo x-toolkit x multi-tty make-network-process emacs) > > Memory information: > ((conses 16 51798 5028) > (symbols 48 6742 1) > (strings 32 18899 1840) > (string-bytes 1 612322) > (vectors 16 12192) > (vector-slots 8 168066 8842) > (floats 8 23 45) > (intervals 56 221 0) > (buffers 992 10)) > --00000000000033d51705b33d866e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In WSL on 27.1 the mailcap-mime-data problem remains,=C2= =A0but past that the conversion when doc-view-mode is enabled works with bo= th binary and the default raw-text.

On Tue, Nov 3, 2020 at 5:23 PM Basil L. = Contovounesios <contovob@tcd.ie&g= t; wrote:
Nichol= as Harrison <nicholasharrison222@gmail.com> writes:

> 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<= br> > mailcap-user-mime-data are nil. This causes the `error in process
> filter: mailcap-view-mime: Symbol=E2=80=99s function definition is voi= d: 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/ema= cs/manual/pdf/emacs-xtra.pdf
>
> This results in the error message and the following:
> 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
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '((type . "ap= plication/pdf")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (viewer . doc-v= iew-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:
>
> Instead I choose doc-view-mode manually for the eww pdf buffer:
>
> Then selecting binary for the encoding finally gets a viewable pdf: >
> I hope this is in some way helpful.

Thanks.=C2=A0 I cannot reproduce these on what will be Emacs 27.2 or Emacs<= br> 28.1 on GNU/Linux.=C2=A0 Perhaps they have been fixed already, or are
specific to MS Windows.=C2=A0 If someone on MS Windows could check whether<= br> they still occur on master and emacs-27, that would be helpful.

--
Basil

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.16.0, Xaw3d scroll bars)
=C2=A0of 2020-11-03 built on thunk
Repository revision: f9d6e463d310db0e1931f26609d938531c56f9c3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.1= 2008000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
=C2=A0'configure 'CC=3Dccache gcc' 'CFLAGS=3D-O2 -march=3Dn= ative' --config-cache
=C2=A0--prefix=3D/home/blc/.local --with-x-toolkit=3Dlucid
=C2=A0--with-file-notification=3Dyes --with-x'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2

Important settings:
=C2=A0 value of $LANG: en_IE.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 51798 5028)
=C2=A0(symbols 48 6742 1)
=C2=A0(strings 32 18899 1840)
=C2=A0(string-bytes 1 612322)
=C2=A0(vectors 16 12192)
=C2=A0(vector-slots 8 168066 8842)
=C2=A0(floats 8 23 45)
=C2=A0(intervals 56 221 0)
=C2=A0(buffers 992 10))
--00000000000033d51705b33d866e--