From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#71666: 30.0.50; [PATCH] Fix zooming images with SHR Date: Sat, 22 Jun 2024 13:21:53 -0700 Message-ID: References: <3cdca8d0-9729-d8ae-5b3a-ed9473a2bef4@gmail.com> <86frt5ibou.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16193"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71666@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 22 22:24:21 2024 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 1sL7HZ-000470-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 22:24:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL7HI-00008K-3a; Sat, 22 Jun 2024 16:24:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sL7HG-00005W-7O for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 16:24:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sL7HF-0000kn-Vs for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 16:24:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sL7HF-0002x1-NN for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 16:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jun 2024 20:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71666-submit@debbugs.gnu.org id=B71666.171908778411237 (code B ref 71666); Sat, 22 Jun 2024 20:24:01 +0000 Original-Received: (at 71666) by debbugs.gnu.org; 22 Jun 2024 20:23:04 +0000 Original-Received: from localhost ([127.0.0.1]:59161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL7GJ-0002v7-J0 for submit@debbugs.gnu.org; Sat, 22 Jun 2024 16:23:04 -0400 Original-Received: from mail-oi1-f172.google.com ([209.85.167.172]:60915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL7GH-0002uG-Hb for 71666@debbugs.gnu.org; Sat, 22 Jun 2024 16:23:01 -0400 Original-Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3d22378c59eso1750177b6e.1 for <71666@debbugs.gnu.org>; Sat, 22 Jun 2024 13:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719087716; x=1719692516; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=UOFaiIbnBBuaNeZbWE/GRG7JaYqzX0ouJo+CkVw6DXA=; b=bR2NFSMCd87N1BuBmt7gFhtWJ299T3YR+jfsZ/1jZ5EH7fbJd4mdpM+ukyHHicw9gD /9lrjvbIN1d2uSOuHR3ltQ0gt2bZ82XI9BJf5VgLcRBeirFvbJDdlU0c0K5SX7vH3+h3 lZNTUVbgErB1JsQ5Tg+r7TWKav/r3PsJdy/idPZTdsZVy06OXOvgZ+CG0hL88xOqkadm n043CD2eTbEsIFlQukvD9EoV+1bZiYE94FDxBZTkzu8Yqn0oXoAssfCP7MUipWZgknvJ elM1MG5BzCGGznyLf0s/MBX6bt0hj1HQqjkS6nX3krcmeWlZzhLd3irg+swkym8CGSYd /TfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719087716; x=1719692516; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UOFaiIbnBBuaNeZbWE/GRG7JaYqzX0ouJo+CkVw6DXA=; b=S7x2ld9Qi/JRgFjOrkR2z4LMH3GqZ4H3N0flDqR5uhVPTEXNL7Bx2BwmRKxz1O+quh xCs26mUTLsEC2lze07iBQi7AVetEuZs+MoXp09SrO6yxisOoOFlBMH66ARDWKb4nCUfd UgXmCweidZclRtOGip1Uq+NNoQ+/tjuYS6bTf/OWFfZ93A+FEGBomhV4ftizNmOCyHqy Y4x5y/1HXsTcbz3KYz254b8wMK8GeRWTA1aVaTqCywR0EjT5TBERSDciprd9KxeQwqPZ 8lO+EZnrP2CG0dYGCBPn6lMX89BS/DaydVwi8F/xNYzYBzoCsc0+58JZeLfwBm8RJ6y6 D/lQ== X-Gm-Message-State: AOJu0Yw7Fun25B4EBKH7uUttO2q7Ziv7FEC/Ig0iyiXZhQLF1TLLv3C8 o/izaaVDA2kSogyxp6thPD1gvHRdhlJxplOyCQ1gr+h4wyvdnttB X-Google-Smtp-Source: AGHT+IHkImwyFgs7s3T1/sDFUXc/l4N51N7UHScJab+mSeqkBiZ5GloX86KIMnRbwwYl7lly2wKesw== X-Received: by 2002:a05:6808:1797:b0:3d2:1a29:c77f with SMTP id 5614622812f47-3d545a6e574mr1084800b6e.43.1719087714699; Sat, 22 Jun 2024 13:21:54 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-706771da083sm67864b3a.52.2024.06.22.13.21.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Jun 2024 13:21:54 -0700 (PDT) Content-Language: en-US In-Reply-To: <86frt5ibou.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287736 Archived-At: On 6/22/2024 2:11 AM, Eli Zaretskii wrote: > I tried the recipe and the patch. While the patches shr behaves > better than the unpatched, I don't see the image being zoomed, it > stays at its original size. Do I need some optional library or > external program for the zoom to happen? Ah right, that would have been helpful for me to mention in the original message: by default, SHR scales down images that are more than 70% of the width (or height) of the window. So if you narrow your window to 40 columns or so and reload the page in EWW, the larger images should be scaled down. Then putting point on one and pressing "z" should scale it up to the original size. Pressing "z" again should scale the image back down. As an aside, there are actually *three* states for image scaling in SHR: default, original, and full, and 'shr-zoom-image' cycles through them in that order. As far as I can tell from the code, "default" and "full" are the same though. I haven't figured out whether that's a bug (and if so, what the bug is), or whether I'm just misunderstanding something. I'll try to fix that later (if only by adding documentation), once I know what's going on.