GNU bug report logs - #44338
27.1; EWW can't download and view pdf

Previous Next

Package: emacs;

Reported by: Nicholas Harrison <nicholasharrison222 <at> gmail.com>

Date: Fri, 30 Oct 2020 22:21:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 27.1

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 44338 <at> debbugs.gnu.org, Nicholas Harrison <nicholasharrison222 <at> gmail.com>
Subject: bug#44338: 27.1; EWW can't download and view pdf
Date: Wed, 04 Nov 2020 20:01:15 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

> In any case, this isn't right:
>
>   (defun eww-display-pdf ()
>     (let ((data (buffer-substring (point) (point-max))))
>       (pop-to-buffer-same-window (get-buffer-create "*eww pdf*"))
>       (let ((coding-system-for-write 'raw-text)  <<<<<<<<<<<<<<<<<<<<<<
> 	    (inhibit-read-only t))
> 	(erase-buffer)
> 	(insert data)
> 	(mailcap-view-mime "application/pdf")))
>     (goto-char (point-min)))
>
> We should use 'raw-text-unix here, since the buffer contents is a
> stream of raw bytes.

Thanks, I've made the change in my patch, and will push in a few days if
I don't hear otherwise.

-- 
Basil




This bug report was last modified 4 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.