From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Ralph Schleicher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Apr 2021 10:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 47705@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161813615722827 (code B ref -1); Sun, 11 Apr 2021 10:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2021 10:15:57 +0000 Received: from localhost ([127.0.0.1]:54058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVX8H-0005w6-Cu for submit@debbugs.gnu.org; Sun, 11 Apr 2021 06:15:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:51276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVX8G-0005vz-A8 for submit@debbugs.gnu.org; Sun, 11 Apr 2021 06:15:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVX8F-0005p0-Pw for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 06:15:56 -0400 Received: from dd22110.kasserver.com ([85.13.141.233]:45380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVX88-00047u-7A for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 06:15:55 -0400 Received: from charlie.oberreute.mueller-schleicher.de (dslb-094-216-126-070.094.216.pools.vodafone-ip.de [94.216.126.70]) by dd22110.kasserver.com (Postfix) with ESMTPA id ED59E1802CC for ; Sun, 11 Apr 2021 12:15:37 +0200 (CEST) Received: from lima.oberreute.mueller-schleicher.de (lima.oberreute.mueller-schleicher.de [192.168.23.12]) by charlie.oberreute.mueller-schleicher.de (Postfix) with ESMTP id 756492050D for ; Sun, 11 Apr 2021 12:15:37 +0200 (CEST) Received: by lima.oberreute.mueller-schleicher.de (Postfix, from userid 1001) id 2C57D4A03C1; Sun, 11 Apr 2021 12:15:37 +0200 (CEST) From: Ralph Schleicher Organization: Ralph Schleicher Date: Sun, 11 Apr 2021 12:15:37 +0200 Message-ID: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=85.13.141.233; envelope-from=rs@ralph-schleicher.de; helo=dd22110.kasserver.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain EWW already supports displaying web pages with ALT texts instead of images but this feature is not visible to the user. Additionally, images or ALT texts are always displayed on a line by itself. This may waste a lot of vertical space, e.g. when displaying the Common Lisp HyperSpec. The attached patch fixes these issues. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-EWW-Customize-display-of-images.patch >From 8105b1db4328f212608998bf71187ba196e2205b Mon Sep 17 00:00:00 2001 From: Ralph Schleicher Date: Sat, 10 Apr 2021 23:08:27 +0200 Subject: [PATCH] EWW: Customize display of images * lisp/net/eww.el (eww-toggle-images): New function. (eww-mode-map): Add key binding and menu entry. * lisp/net/shr.el (shr-inhibit-images): Make it customizable. (shr-image-newline): New customization variable. (shr-tag-img, shr-insert): Use shr-image-newline. * doc/misc/eww.texi (Basics): Document eww-toggle-images. Fix index entries for shr-use-fonts and shr-use-colors. (Advanced): Document shr-inhibit-images and shr-image-newline. --- doc/misc/eww.texi | 22 +++++++++++++++++++--- lisp/net/eww.el | 10 ++++++++++ lisp/net/shr.el | 15 +++++++++++---- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 6e82a97030..0ec3b4bf6e 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -124,17 +124,25 @@ Basics only display this part. This usually gets rid of menus and the like. @findex eww-toggle-fonts -@findex shr-use-fonts +@vindex shr-use-fonts @kindex F The @kbd{F} command (@code{eww-toggle-fonts}) toggles whether to use variable-pitch fonts or not. This sets the @code{shr-use-fonts} variable. @findex eww-toggle-colors -@findex shr-use-colors -@kindex F +@vindex shr-use-colors +@kindex M-C The @kbd{M-C} command (@code{eww-toggle-colors}) toggles whether to use HTML-specified colors or not. This sets the @code{shr-use-colors} variable. +@findex eww-toggle-images +@vindex shr-inhibit-images +@kindex M-I +@cindex Image Display + The @kbd{M-I} command (@code{eww-toggle-images}, capital letter i) +toggles whether to display images or not. This sets the +@code{shr-inhibit-images} variable. + @findex eww-download @vindex eww-download-directory @kindex d @@ -305,6 +313,14 @@ Advanced support required) then larger images are scaled down. You can block specific images completely by customizing @code{shr-blocked-images}. +@vindex shr-inhibit-images +@vindex shr-image-newline + You can control image display by customizing +@code{shr-inhibit-images}. If this variable is nil, always display +the ALT text of images. Images or ALT texts are displayed on a +separate line by default. You can preserve the normal text flow by +setting the variable @code{shr-image-newline} to nil. + @vindex shr-color-visible-distance-min @vindex shr-color-visible-luminance-min @cindex Contrast diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 32fe857e65..eec3ec7ba8 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -987,6 +987,7 @@ eww-mode-map (define-key map "F" 'eww-toggle-fonts) (define-key map "D" 'eww-toggle-paragraph-direction) (define-key map [(meta C)] 'eww-toggle-colors) + (define-key map [(meta I)] 'eww-toggle-images) (define-key map "b" 'eww-add-bookmark) (define-key map "B" 'eww-list-bookmarks) @@ -1015,6 +1016,7 @@ eww-mode-map ["List cookies" url-cookie-list t] ["Toggle fonts" eww-toggle-fonts t] ["Toggle colors" eww-toggle-colors t] + ["Toggle images" eww-toggle-images t] ["Character Encoding" eww-set-character-encoding] ["Toggle Paragraph Direction" eww-toggle-paragraph-direction])) map)) @@ -1893,6 +1895,14 @@ eww-toggle-colors "off")) (eww-reload)) +(defun eww-toggle-images () + "Toggle whether or not to display images." + (interactive nil eww-mode) + (setq shr-inhibit-images (not shr-inhibit-images)) + (eww-reload) + (message "Images are now %s" + (if shr-inhibit-images "off" "on"))) + ;;; Bookmarks code (defvar eww-bookmarks nil) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c122a19e90..4332a1ef15 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -183,8 +183,13 @@ shr-abbreviation "Face for elements." :version "27.1") -(defvar shr-inhibit-images nil - "If non-nil, inhibit loading images.") +(defcustom shr-inhibit-images nil + "If non-nil, inhibit loading images." + :type 'boolean) + +(defcustom shr-image-newline t + "If non-nil, display images on a separate line." + :type 'boolean) (defvar shr-external-rendering-functions nil "Alist of tag/function pairs used to alter how shr renders certain tags. @@ -664,7 +669,8 @@ shr--translate-insertion-chars (defun shr-insert (text) (when (and (not (bolp)) - (get-text-property (1- (point)) 'image-url)) + (get-text-property (1- (point)) 'image-url) + shr-image-newline) (insert "\n")) (cond ((eq shr-folding-mode 'none) @@ -1654,7 +1660,8 @@ shr-tag-img (and dom (or (> (length (dom-attr dom 'src)) 0) (> (length (dom-attr dom 'srcset)) 0)))) - (when (> (current-column) 0) + (when (and (> (current-column) 0) + shr-image-newline) (insert "\n")) (let ((alt (dom-attr dom 'alt)) (width (shr-string-number (dom-attr dom 'width))) -- 2.20.1 --=-=-= Content-Type: text/plain -- Ralph --=-=-=-- From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Apr 2021 08:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ralph Schleicher Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.161821660614499 (code B ref 47705); Mon, 12 Apr 2021 08:37:02 +0000 Received: (at 47705) by debbugs.gnu.org; 12 Apr 2021 08:36:46 +0000 Received: from localhost ([127.0.0.1]:56375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVs3l-0003la-Rt for submit@debbugs.gnu.org; Mon, 12 Apr 2021 04:36:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVs3k-0003lK-3P for 47705@debbugs.gnu.org; Mon, 12 Apr 2021 04:36:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jIpTvNRK1+CSYM9fY8x7OzOAQuQiNIXB37gD5kXBs8s=; b=FQzcfjMCR7IdcwrG92290y8AwW HpU3f57Br/ZE4oHHtebFNcgL4BPCMGRw059WQsVECJS/IoeWBh1xfsztNZ82YLnsTLtpKH86svzsv N6dd/WDoDgFuH5GzuhpJdgd9rsfzvbcbI2CBwJtpZXCgjRd5zJ2MQS/hTSicaQ8X0F00=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVs3X-0004m3-Bf; Mon, 12 Apr 2021 10:36:33 +0200 From: Lars Ingebrigtsen References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> X-Now-Playing: Mariel Roberts's _The Wire Tapper 55_: "Hoard [single edit" Date: Mon, 12 Apr 2021 10:36:26 +0200 In-Reply-To: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> (Ralph Schleicher's message of "Sun, 11 Apr 2021 12:15:37 +0200") Message-ID: <87wnt7zyph.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ralph Schleicher writes: > EWW already supports displaying web pages with ALT texts instead of > images but this feature is not visible to the user. Thanks; applied to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ralph Schleicher writes: > EWW already supports displaying web pages with ALT texts instead of > images but this feature is not visible to the user. Thanks; applied to Emacs 28. > Additionally, images or ALT texts are always displayed on a line by > itself. This may waste a lot of vertical space, e.g. when displaying > the Common Lisp HyperSpec. The attached patch fixes these issues. But not this bit. The image display in shr should be improved, though. The problem is that mixing large inline in text often makes the text less easy to read, and this is particularly a problem in tables, where shr chooses to not include images at all. shr should instead include images in-line if they are "small" -- i.e., if they've got a height that's somewhat comparable to the line height, but not otherwise. This sounds like trivial thing to do, but it's not -- we don't know the size of the images until we load them (usually), and shr doesn't to re-flowing at all. shr could do inline images if the images have known width/heights (and the images are "small"), though. Patches welcome. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 12 04:36:47 2021 Received: (at control) by debbugs.gnu.org; 12 Apr 2021 08:36:47 +0000 Received: from localhost ([127.0.0.1]:56378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVs3q-0003lo-Eu for submit@debbugs.gnu.org; Mon, 12 Apr 2021 04:36:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVs3n-0003lP-HZ for control@debbugs.gnu.org; Mon, 12 Apr 2021 04:36:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BU72WYTwtW+nzBo33NAqnlIbzktIAeP8kaoyg1IOoBk=; b=GiS6Kq+TQWjNldkzm0qMFFg0Av 59OnQg68iSw7+mjMI8rk53g0J29urOA1+zG0h5C6BO5/4lDMwBm0L+9GNQLIR3akd8m222SCKIpVw pUt15e7I9FXeOzqy6NGq4yIUq/I8tn0L/CLNebTJEYEUjwWdtV86Dbvvf0Zzj/jmVtpo=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVs3g-0004mY-2k for control@debbugs.gnu.org; Mon, 12 Apr 2021 10:36:37 +0200 Date: Mon, 12 Apr 2021 10:36:35 +0200 Message-Id: <87v98rzyp8.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47705 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47705 fixed close 47705 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47705 fixed close 47705 28.1 quit From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Ralph Schleicher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Apr 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: Lars Ingebrigtsen Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.161824898021108 (code B ref 47705); Mon, 12 Apr 2021 17:37:02 +0000 Received: (at 47705) by debbugs.gnu.org; 12 Apr 2021 17:36:20 +0000 Received: from localhost ([127.0.0.1]:57977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW0U0-0005UN-77 for submit@debbugs.gnu.org; Mon, 12 Apr 2021 13:36:20 -0400 Received: from dd22110.kasserver.com ([85.13.141.233]:40470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW0Ty-0005UD-MS for 47705@debbugs.gnu.org; Mon, 12 Apr 2021 13:36:19 -0400 Received: from charlie.oberreute.mueller-schleicher.de (dslb-094-216-126-070.094.216.pools.vodafone-ip.de [94.216.126.70]) by dd22110.kasserver.com (Postfix) with ESMTPA id F1B1418115B; Mon, 12 Apr 2021 19:36:16 +0200 (CEST) Received: from lima.oberreute.mueller-schleicher.de (lima.oberreute.mueller-schleicher.de [192.168.23.12]) by charlie.oberreute.mueller-schleicher.de (Postfix) with ESMTP id 2717F204FA; Mon, 12 Apr 2021 19:36:16 +0200 (CEST) Received: by lima.oberreute.mueller-schleicher.de (Postfix, from userid 1001) id D215A4A0E8E; Mon, 12 Apr 2021 19:36:15 +0200 (CEST) From: Ralph Schleicher Organization: Ralph Schleicher References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> Date: Mon, 12 Apr 2021 19:36:15 +0200 In-Reply-To: <87wnt7zyph.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 12 Apr 2021 10:36:26 +0200") Message-ID: <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: >> Additionally, images or ALT texts are always displayed on a line by >> itself. This may waste a lot of vertical space, e.g. when displaying >> the Common Lisp HyperSpec. The attached patch fixes these issues. > > But not this bit. [...] > shr should instead include images in-line if they are "small" -- i.e., > if they've got a height that's somewhat comparable to the line height, > but not otherwise. > > This sounds like trivial thing to do, but it's not -- we don't know the > size of the images until we load them (usually), and shr doesn't to > re-flowing at all. > > shr could do inline images if the images have known width/heights (and > the images are "small"), though. Patches welcome. I see your point. Would it be acceptable if, as a first step, inlining of images is combined with shr-inhibit-images non-nil? Then we know that the ALT texts fit into a line. -- Ralph From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Apr 2021 07:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: Ralph Schleicher Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.16182992394933 (code B ref 47705); Tue, 13 Apr 2021 07:34:01 +0000 Received: (at 47705) by debbugs.gnu.org; 13 Apr 2021 07:33:59 +0000 Received: from localhost ([127.0.0.1]:58858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWDYd-0001HV-Hh for submit@debbugs.gnu.org; Tue, 13 Apr 2021 03:33:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWDYb-0001HI-Dk for 47705@debbugs.gnu.org; Tue, 13 Apr 2021 03:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SFdOLGuWdIINX3GQ4cHn/kINhU36VQSdwYKqY6zEdu0=; b=Cxvg9jYcyUz0+0gWiSYhfl60Rf XlBGUccfxbIUjYG7MaH2UqhajW7hvrRzq2G2rhyaiE0D141vHVusSrKrhktjqQolvmpWgQbeY50V1 p3vISJwh/sNJBXp/eoI9f+8RqwG2cpvKrEUaVnRQ0S2TAWp2pxAAr85fQpOOCQ2pg2xE=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWDYR-0000gN-3v; Tue, 13 Apr 2021 09:33:50 +0200 From: Lars Ingebrigtsen References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEXx6Oy8pMpvc6/d aJr///8sYALUAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UEDQceASu+R0AAAAF1SURBVDjLdZRbgoMw CEXDZAMhbKBkNiCy/70Nj2g1OqkfNofnhbYUP4itrGccpy8M7dg19vF5OAV8RjMH7H0Yud/3mYJX cib/F/C4pxkXEm74AJ3fASPfsoxLVW85mNcWT4fWXstlt28vobIasM8KwngF+8iuEQregI6sycxv APXorRUkFali78xcSPoJNM9W3LbqCZqlqULaSgRX4AwOOeUxAmBR7Jz1Ih8LEIAUsxP4yp5vauln KFANkNpVr9hcfhxsVy2ni61jWri3d+NZPL2DKf9WrR0AVPH0DkoJUyXvE0yKbpXaQ5LZUwGrLQRz RRrsnwOQEJJ1Zfcmh5kAJhAx49hiJRuOvz2A7rmVE2gIRF7Inks5ASXQCUbHK2g1vuR2z3IpZ57g d78AcRAieLxmg/x6FPcQV/rSuQQgDclTRJISQBp8QC+zoM0e3VAQuP/qd60hKUkrBmT5sdeNsJgH r/8C1bbAwXof62Hb2n3acxn+AE6tVO1qmSHXAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA0LTEz VDA3OjMwOjAxKzAwOjAwHlQbjAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNC0xM1QwNzozMDow MSswMDowMG8JozAAAAAASUVORK5CYII= X-Now-Playing: Marianne Faithfull's _A Child's Adventure_: "Blue Millionaire" Date: Tue, 13 Apr 2021 09:33:46 +0200 In-Reply-To: <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> (Ralph Schleicher's message of "Mon, 12 Apr 2021 19:36:15 +0200") Message-ID: <875z0qtz8l.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ralph Schleicher writes: > I see your point. Would it be acceptable if, as a first step, inlining > of images is combined with shr-inhibit-images non-nil? Then we know > that the ALT texts fit into a line. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ralph Schleicher writes: > I see your point. Would it be acceptable if, as a first step, inlining > of images is combined with shr-inhibit-images non-nil? Then we know > that the ALT texts fit into a line. I'm not sure I understand what you mean -- the size of the alt texts has no relation to the size of the images. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Ralph Schleicher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Apr 2021 21:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: Lars Ingebrigtsen Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.161834798812593 (code B ref 47705); Tue, 13 Apr 2021 21:07:01 +0000 Received: (at 47705) by debbugs.gnu.org; 13 Apr 2021 21:06:28 +0000 Received: from localhost ([127.0.0.1]:60990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWQEt-0003H3-W5 for submit@debbugs.gnu.org; Tue, 13 Apr 2021 17:06:28 -0400 Received: from dd22110.kasserver.com ([85.13.141.233]:35910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWQEs-0003Gv-TK for 47705@debbugs.gnu.org; Tue, 13 Apr 2021 17:06:27 -0400 Received: from charlie.oberreute.mueller-schleicher.de (dslb-094-216-126-070.094.216.pools.vodafone-ip.de [94.216.126.70]) by dd22110.kasserver.com (Postfix) with ESMTPA id 5A94318115B; Tue, 13 Apr 2021 23:06:25 +0200 (CEST) Received: from lima.oberreute.mueller-schleicher.de (lima.oberreute.mueller-schleicher.de [192.168.23.12]) by charlie.oberreute.mueller-schleicher.de (Postfix) with ESMTP id 6118220614; Tue, 13 Apr 2021 23:06:24 +0200 (CEST) Received: by lima.oberreute.mueller-schleicher.de (Postfix, from userid 1001) id 1A0E94A0486; Tue, 13 Apr 2021 23:06:24 +0200 (CEST) From: Ralph Schleicher Organization: Ralph Schleicher References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> <875z0qtz8l.fsf@gnus.org> Date: Tue, 13 Apr 2021 23:06:24 +0200 In-Reply-To: <875z0qtz8l.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 13 Apr 2021 09:33:46 +0200") Message-ID: <86im4pnbcf.fsf@lima.oberreute.mueller-schleicher.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Hi Lars, I have thought about it again and maybe we should approach the topic from another side. Images are inline elements and so, first of all, there is no reason why the renderer should insert line breaks at all. The decision whether an image shall be displayed as an inline element or as a block element is actually made by the creator of the web page. The renderer should only follow the instructions. That means, if an image is intermixed with text, or if multiple images are placed on a single line, we should assume that there must be a reason and SHR shouldn't try to be too smart. After all, the user should be able to take the final decision. Thus, I've added an eww-toggle-inline-images command. I checked the result with, e.g. www.gnu.org, www.gnu.org/software/emacs, docs.gtk.org/gtk4, and www.lispworks.com/documentation/HyperSpec/Front -- it looks good. Maybe you reconsider adding the patch. Thank you. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-eww-toggle-inline-images.patch diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index cc546a92d6..9500624859 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -143,6 +143,13 @@ Basics toggles whether to display images or not. This also sets the @code{shr-inhibit-images} variable. +@findex eww-toggle-inline-images +@vindex shr-inline-images +@cindex Image Display + The command @code{eww-toggle-inline-images} toggles whether to +display images as inline elements or not. This also sets the +@code{shr-inline-images} variable. + @findex eww-download @vindex eww-download-directory @kindex d @@ -314,9 +321,12 @@ Advanced specific images completely by customizing @code{shr-blocked-images}. @vindex shr-inhibit-images +@vindex shr-inline-images You can control image display by customizing @code{shr-inhibit-images}. If this variable is @code{nil}, display -the ``ALT'' text of images instead. +the ``ALT'' text of images instead. By definition, images are inline +elements. However, if the variable @code{shr-inline-images} is +@code{nil}, images are displayed on a separate line. @vindex shr-color-visible-distance-min @vindex shr-color-visible-luminance-min diff --git a/lisp/net/eww.el b/lisp/net/eww.el index eec3ec7ba8..e6046bf145 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1017,6 +1017,7 @@ eww-mode-map ["Toggle fonts" eww-toggle-fonts t] ["Toggle colors" eww-toggle-colors t] ["Toggle images" eww-toggle-images t] + ["Toggle inline images" eww-toggle-inline-images t] ["Character Encoding" eww-set-character-encoding] ["Toggle Paragraph Direction" eww-toggle-paragraph-direction])) map)) @@ -1903,6 +1904,14 @@ eww-toggle-images (message "Images are now %s" (if shr-inhibit-images "off" "on"))) +(defun eww-toggle-inline-images () + "Toggle whether or not to display images as inline elements." + (interactive nil eww-mode) + (setq shr-inline-images (not shr-inline-images)) + (eww-reload) + (message "Inline images are now %s" + (if shr-inline-images "on" "off"))) + ;;; Bookmarks code (defvar eww-bookmarks nil) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index cbdeb65ba8..673c4787a3 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -188,6 +188,11 @@ shr-inhibit-images :version "28.1" :type 'boolean) +(defcustom shr-inline-images t + "If non-nil, render images as inline elements." + :version "28.1" + :type 'boolean) + (defvar shr-external-rendering-functions nil "Alist of tag/function pairs used to alter how shr renders certain tags. For instance, eww uses this to alter rendering of title, forms @@ -672,7 +677,9 @@ shr--translate-insertion-chars (defun shr-insert (text) (when (and (not (bolp)) - (get-text-property (1- (point)) 'image-url)) + (get-text-property (1- (point)) 'image-url) + (not shr-inhibit-images) + (not shr-inline-images)) (insert "\n")) (cond ((eq shr-folding-mode 'none) @@ -1147,7 +1154,8 @@ shr-put-image ;; When inserting big-ish pictures, put them at the ;; beginning of the line. (when (and (> (current-column) 0) - (> (car (image-size image t)) 400)) + (> (car (image-size image t)) 400) + (not shr-inline-images)) (insert "\n")) (if (eq size 'original) (insert-sliced-image image (or alt "*") nil 20 1) @@ -1662,7 +1670,9 @@ shr-tag-img (and dom (or (> (length (dom-attr dom 'src)) 0) (> (length (dom-attr dom 'srcset)) 0)))) - (when (> (current-column) 0) + (when (and (> (current-column) 0) + (not shr-inhibit-images) + (not shr-inline-images)) (insert "\n")) (let ((alt (dom-attr dom 'alt)) (width (shr-string-number (dom-attr dom 'width))) --=-=-= Content-Type: text/plain -- Ralph --=-=-=-- From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images In-Reply-To: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> Resent-From: "Jose A. Ortega Ruiz" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Apr 2021 23:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: 47705@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16183552931137 (code B ref -1); Tue, 13 Apr 2021 23:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Apr 2021 23:08:13 +0000 Received: from localhost ([127.0.0.1]:32947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWS8i-0000IH-HN for submit@debbugs.gnu.org; Tue, 13 Apr 2021 19:08:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:35302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWS8h-0000I9-6s for submit@debbugs.gnu.org; Tue, 13 Apr 2021 19:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWS8h-0001bh-2Q for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 19:08:11 -0400 Received: from ciao.gmane.io ([116.202.254.214]:53424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWS8f-0001Aw-Gs for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 19:08:10 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lWS8c-0004YE-JE for bug-gnu-emacs@gnu.org; Wed, 14 Apr 2021 01:08:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: "Jose A. Ortega Ruiz" Date: Tue, 13 Apr 2021 23:08:07 +0100 Message-ID: <87o8ehdeig.fsf@gnus.jao.io> References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> <875z0qtz8l.fsf@gnus.org> <86im4pnbcf.fsf@lima.oberreute.mueller-schleicher.de> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:RE6UVExr25hpcwPpMsd/jO9vYLU= X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On Tue, Apr 13 2021, Ralph Schleicher wrote: > Hi Lars, > > I have thought about it again and maybe we should approach the topic > from another side. Images are inline elements and so, first of all, > there is no reason why the renderer should insert line breaks at all. > The decision whether an image shall be displayed as an inline element > or as a block element is actually made by the creator of the web page. > The renderer should only follow the instructions. That means, if an > image is intermixed with text, or if multiple images are placed on a > single line, we should assume that there must be a reason and SHR > shouldn't try to be too smart. > > After all, the user should be able to take the final decision. Thus, > I've added an eww-toggle-inline-images command. I checked the result > with, e.g. www.gnu.org, www.gnu.org/software/emacs, docs.gtk.org/gtk4, > and www.lispworks.com/documentation/HyperSpec/Front -- it looks good. > > Maybe you reconsider adding the patch. Thank you. I just wanted to echo my approval of the thoughts above, based on my experience reading pages with embedded mathematical formulae... those are very common in math and physics blogs, and consist of many little inline images, and the current eww ways make them look worse than, say, emacs-w3m. For a random example of what i mean, just take any page from Terry Tao's blog: https://terrytao.wordpress.com/. Cheers, jao -- In this age, the mere example of nonconformity, the mere refusal to bend the knee to custom, is itself a service. -John Stuart Mill, philosopher and economist (1806-1873) From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Apr 2021 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: Ralph Schleicher Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.161838955323793 (code B ref 47705); Wed, 14 Apr 2021 08:40:02 +0000 Received: (at 47705) by debbugs.gnu.org; 14 Apr 2021 08:39:13 +0000 Received: from localhost ([127.0.0.1]:33340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWb3I-0006Bh-RU for submit@debbugs.gnu.org; Wed, 14 Apr 2021 04:39:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWb3H-0006BR-OX for 47705@debbugs.gnu.org; Wed, 14 Apr 2021 04:39:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mtDoPdKHphbHeZgwX79kCmsqEWOQXx2/iUbA8ZsGBH0=; b=XxfXZrciZdvILQOqQbc7V9dvam gX3ycjhvl8qYjdx2PNs9NinsYiRNw+uB+fThN+SO2XPn11vC48Tkf6hAdaMKM9+58Jj1qyGnVqgLY aVGfUBFH/MnevL7UI1H35sh19kx7zE4aniEuRMbzk1CC1Eg08laXIHUhe40znyHJNgEQ=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWb35-0007Mo-Mg; Wed, 14 Apr 2021 10:39:05 +0200 From: Lars Ingebrigtsen References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> <875z0qtz8l.fsf@gnus.org> <86im4pnbcf.fsf@lima.oberreute.mueller-schleicher.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVdMisaERibYkTl 0a3LoG3////NZA3RAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UEDggkCoAsqGIAAAGySURBVDjLbZPt mcQgCISRZwtwtwIkVhBTQNbQf003kI8zd/HHJusrAw6EiOjti2K9rxWvGY9z75MGMKzc5kdAbMsj YK2WnkDWun2fgW4tPSVngLYmB2d9Z/aptbYkgHwDeesA7etSnxFMbfaQOXIMIRkyHFp0LyAjtWzN 2jc2f0Ny3do6mbW0m3iRrLbNL6s9/b0Hbj6zqf4DUs1IH8A7AP2CdPzARRNKLCfIoYOn2R/gp4uD 3gFu7d9hr13zBXI8Q85QqzsblhBrvxpCCRUE+BR04WZmthK2U1ZXG+5UxQGKgyiXoWMfdaAsq6en wWTcnFVe3SX5BogqHNOSKcvYLwbomRgX4jJGQNh8JGEN5j3lIyihDkKTTatEde/TCBwB8NErH39n kl3I3djQgIW64C/3auFZcZ+2gsKm7n4yDFzP2YDUyjYJIw17j8KcIzmvGZ1WenUQnPXcDhahrWP6 BBHWvTqhPQITWTGukDtAfNwOnFlbFBHr2ZcDLNgDjBx5BFBbbAP4hlEp0RARq3jX0YorB9ByAsHX vgZY7AzqXpGKiuzlXqvG+KpKuYMeVSEH0w9xbnTKBdt+IwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAy MS0wNC0xNFQwODozNjoxMCswMDowMKMeTaEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDQtMTRU MDg6MzY6MTArMDA6MDDSQ/UdAAAAAElFTkSuQmCC X-Now-Playing: King Crimson's _On (and off) The Road (5): Fragmented_: "Yoli Yoli" Date: Wed, 14 Apr 2021 10:38:59 +0200 In-Reply-To: <86im4pnbcf.fsf@lima.oberreute.mueller-schleicher.de> (Ralph Schleicher's message of "Tue, 13 Apr 2021 23:06:24 +0200") Message-ID: <874kg9s1jw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ralph Schleicher writes: > The decision whether an image shall be displayed as an inline element > or as a block element is actually made by the creator of the web page. > The renderer should only follow the instructions. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ralph Schleicher writes: > The decision whether an image shall be displayed as an inline element > or as a block element is actually made by the creator of the web page. > The renderer should only follow the instructions. You're framing this as if it's a moral imperative, and I reject the implication. Anybody is free to render data in however way they prefer -- it's an essential freedom. As a practical matter, I've already explained why the patch isn't appropriate for shr. shr's handling of images should be improved, but your proposed patch would make more things unreadable than it would help, so it's not going to be applied. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47705: [PATCH] EWW: Customize display of images Resent-From: Ralph Schleicher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Apr 2021 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch To: Lars Ingebrigtsen Cc: 47705@debbugs.gnu.org Received: via spool by 47705-submit@debbugs.gnu.org id=B47705.161842844910047 (code B ref 47705); Wed, 14 Apr 2021 19:28:02 +0000 Received: (at 47705) by debbugs.gnu.org; 14 Apr 2021 19:27:29 +0000 Received: from localhost ([127.0.0.1]:35753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWlAf-0002by-9L for submit@debbugs.gnu.org; Wed, 14 Apr 2021 15:27:29 -0400 Received: from dd22110.kasserver.com ([85.13.141.233]:37716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWlAb-0002bo-GR for 47705@debbugs.gnu.org; Wed, 14 Apr 2021 15:27:27 -0400 Received: from charlie.oberreute.mueller-schleicher.de (dslb-094-216-126-070.094.216.pools.vodafone-ip.de [94.216.126.70]) by dd22110.kasserver.com (Postfix) with ESMTPA id C31A51803B6; Wed, 14 Apr 2021 21:27:23 +0200 (CEST) Received: from lima.oberreute.mueller-schleicher.de (lima.oberreute.mueller-schleicher.de [192.168.23.12]) by charlie.oberreute.mueller-schleicher.de (Postfix) with ESMTP id E025C205FE; Wed, 14 Apr 2021 21:27:22 +0200 (CEST) Received: by lima.oberreute.mueller-schleicher.de (Postfix, from userid 1001) id A03EB4A05F6; Wed, 14 Apr 2021 21:27:22 +0200 (CEST) From: Ralph Schleicher Organization: Ralph Schleicher References: <86zgy5m8ja.fsf@lima.oberreute.mueller-schleicher.de> <87wnt7zyph.fsf@gnus.org> <86o8ejmmls.fsf@lima.oberreute.mueller-schleicher.de> <875z0qtz8l.fsf@gnus.org> <86im4pnbcf.fsf@lima.oberreute.mueller-schleicher.de> <874kg9s1jw.fsf@gnus.org> Date: Wed, 14 Apr 2021 21:27:22 +0200 In-Reply-To: <874kg9s1jw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Apr 2021 10:38:59 +0200") Message-ID: <86czuwmztx.fsf@lima.oberreute.mueller-schleicher.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > You're framing this as if it's a moral imperative, and I reject the > implication. Anybody is free to render data in however way they > prefer -- it's an essential freedom. Fine, I accept your decision. -- Ralph