emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4610241: Fix coding system in eww-display-pdf


From: Basil L. Contovounesios
Subject: master 4610241: Fix coding system in eww-display-pdf
Date: Thu, 5 Nov 2020 16:12:40 -0500 (EST)

branch: master
commit 4610241a9b3fbddd1f0973bf49f7008ed09ab955
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Fix coding system in eww-display-pdf
    
    * lisp/net/eww.el (eww-display-pdf): Make *eww pdf* buffer unibyte
    before populating it to avoid conversions.  The binding for
    coding-system-for-write is then no longer necessary, and can be
    delegated to the viewer invoked by mailcap-view-mime.  Suggested by
    Stefan Monnier <monnier@iro.umontreal.ca>.  (Bug#44338)
---
 lisp/net/eww.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 340a913..43405fb 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -814,9 +814,9 @@ Currently this means either text/html or 
application/xhtml+xml."
   (let ((buf (current-buffer))
         (pos (point)))
     (with-current-buffer (get-buffer-create "*eww pdf*")
-      (let ((coding-system-for-write 'raw-text-unix)
-            (inhibit-read-only t))
+      (let ((inhibit-read-only t))
         (erase-buffer)
+        (set-buffer-multibyte nil)
         (insert-buffer-substring buf pos)
         (mailcap-view-mime "application/pdf"))
       (if (zerop (buffer-size))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]