bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38507: Fwd: Re: eww error: error in process filter: Window system fr


From: Robert Pluim
Subject: bug#38507: Fwd: Re: eww error: error in process filter: Window system frame should be used
Date: Thu, 12 Dec 2019 14:23:33 +0100

>>>>> On Fri, 06 Dec 2019 00:11:54 -0500, "A.C." <achirvasub@gmail.com> said:

    AC> -------- Original Message --------
    AC> From: "A.C." <achirvasub@gmail.com>
    AC> Sent: December 6, 2019 12:09:46 AM EST
    AC> To: bug-gnu-emacs@gnu.org
    AC> Subject: Re: eww error: error in process filter: Window system frame 
should be used

    AC> To follow up with some more info:

    AC> As the trace indicates, the problem seems to be caused by an svg image
    AC> that website tries to load. This happens only when I start emacs in a
    AC> terminal (with the '-nw' flag). The website loads fine

    AC> - when emacs runs in an x window (so plain 'emacs' rather than 'emacs 
-nw');
    AC> - in a terminal, provided I disable svg images with 

    AC>  (setq shr-blocked-images "svg")

    AC> So there are ways around this, but surely eww could handle
    AC> this more gracefully? Perhaps with the right combination of
    AC> compile config options?

Eww really shouldn't try to display images when running in terminal
mode. This should do it, unless Lars can suggest
something better:

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 22d4cde34a..aec4a9e465 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1197,8 +1197,9 @@ shr-parse-image-data
             (libxml-parse-xml-region (point) (point-max)) 'utf-8)))
     ;; SVG images often do not have a specified foreground/background
     ;; color, so wrap them in styles.
-    (when (eq content-type 'image/svg+xml)
-      (setq data (svg--wrap-svg data)))
+    (and (display-graphic-p)
+         (eq content-type 'image/svg+xml)
+         (setq data (svg--wrap-svg data)))
     (list data content-type)))
 
 (defun svg--wrap-svg (data)






reply via email to

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