From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii <eliz@gnu.org> Newsgroups: gmane.emacs.bugs Subject: bug#74725: 31.0.50; image-scaling-factor is ignored by create-image Date: Sat, 21 Dec 2024 11:14:50 +0200 Message-ID: <86frmh8kj9.fsf@gnu.org> References: <2304cad6-884f-4528-a85e-ab9c06b80016@orange.fr> <868qsrim4a.fsf@gnu.org> <Z1Rum37ormooWMjy@faroe.holly.idiocy.org> <2793f551-8715-4679-8f52-b4673dd6802d@orange.fr> <86y10rh26m.fsf@gnu.org> <87plm3ghzw.fsf@yahoo.com> <86frmyhfss.fsf@gnu.org> <87h67eha9b.fsf@yahoo.com> <86plm2fk1l.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74725@debbugs.gnu.org, da_vid@orange.fr, alan@idiocy.org To: luangruo@yahoo.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 21 10:16:22 2024 Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org> 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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>) id 1tOvav-0006HI-UT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Dec 2024 10:16:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <bug-gnu-emacs-bounces@gnu.org>) id 1tOvag-0005aO-Kf; Sat, 21 Dec 2024 04:16:06 -0500 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 <Debian-debbugs@debbugs.gnu.org>) id 1tOvac-0005a9-Ua for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 04:16:03 -0500 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 <Debian-debbugs@debbugs.gnu.org>) id 1tOvac-0002h5-8m for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 04:16:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=xgz7bAhHfEtMc0RMXsgYDSwTc793kQpqULwwIC7g3/Q=; b=DkECqHekGXUUgeN5MWhZYYxjWT4e1G3cykS9Heb80/mLvwKN8rF9EeHCeuNCWvHgxhkLsVTniMpIfj0ig2PiPxYxbPFNJifBH2g33quct+4fQjy+GtJBRkeE7viOJDge+MQnFdnhKNBC2F+TxUmvd+E7NN3hehK9656w4PL1WK9N6TzRvqfJoVzUlkclE8qgb65OeSi2H0X5J7sXo9wLqp3t6vwFpkBoX64hod09Wrk21TwNEMM8DAaAoPQuLrpomprKNFP/nA0aGhaHB/ErIpRSmqrgQj72yb2pcuCwGzEruyg3iKN7b2k1eeaGYh81lUb9eJfxByvaGAXN1hojQg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tOvac-0006fq-2e for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 04:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii <eliz@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 09:16:02 +0000 Resent-Message-ID: <handler.74725.B74725.173477250425208@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74725 X-GNU-PR-Package: emacs Original-Received: via spool by 74725-submit@debbugs.gnu.org id=B74725.173477250425208 (code B ref 74725); Sat, 21 Dec 2024 09:16:02 +0000 Original-Received: (at 74725) by debbugs.gnu.org; 21 Dec 2024 09:15:04 +0000 Original-Received: from localhost ([127.0.0.1]:45252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tOvZf-0006YU-Nx for submit@debbugs.gnu.org; Sat, 21 Dec 2024 04:15:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@gnu.org>) id 1tOvZd-0006Xh-DI for 74725@debbugs.gnu.org; Sat, 21 Dec 2024 04:15:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@gnu.org>) id 1tOvZW-00025q-4x; Sat, 21 Dec 2024 04:14:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xgz7bAhHfEtMc0RMXsgYDSwTc793kQpqULwwIC7g3/Q=; b=ou8V6z06/vSX HN8IF3xQwiEuanmyAbLWIPPCY/roPZOTiF4gDuycuoGRr69JogXY91F3TD6g+Ac5iEQmFdqXmTVfe xcr3WprN5PP3jRK/MJTy1zRp4dEH9XjGpC5tj0H62OK/K2unmEhvJGFh0nrsGq5nXkgOZ2twgXzzc O4DCviE3lD38jvxEiG9D4jVYQ2+IgkYZyr0xRNvtksLk97SXvDEoHFBunGiMyg6P1yIOJ1Jes9TVP jIRQTrq66Ppt8hBCtVk2yoE8pJnJaNh0OElM4SR3YzhkYJ9Hi/e2gNsJRunOPB1RKlSlw1Rhl+iDB dZ13iDmQ1+xr5GU1iBv47w==; In-Reply-To: <86plm2fk1l.fsf@gnu.org> (message from Eli Zaretskii on Sun, 08 Dec 2024 14:15:02 +0200) 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" <bug-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs> List-Post: <mailto:bug-gnu-emacs@gnu.org> List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=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:297505 Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/297505> Ping! > Cc: 74725@debbugs.gnu.org, da_vid@orange.fr, alan@idiocy.org > Date: Sun, 08 Dec 2024 14:15:02 +0200 > From: Eli Zaretskii <eliz@gnu.org> > > > From: Po Lu <luangruo@yahoo.com> > > Cc: da_vid@orange.fr, alan@idiocy.org, 74725@debbugs.gnu.org > > Date: Sun, 08 Dec 2024 16:03:28 +0800 > > > > Eli Zaretskii <eliz@gnu.org> writes: > > > > >> > Po Lu, what were the reasons for that particular part of the commit? > > >> > > >> The scale applied by image-scaling-factor is liable to differ by > > >> display > > > > > > How so? Please elaborate. > > > > When it is set to `auto' (the default value), the scaling factor to be > > applied is decided by the configuration of a frame, namely, its > > FRAME_COLUMN_WIDTH. > > So when the default font changes, all the images are supposed to be > resized? Does that really happen, and if so, is that a good idea in > all cases? > > > >> and computing the default scale in Lisp would result in images > > >> being displayed with an incorrect scale in the presence of multiple > > >> displays. > > > > > > How does the above changeset solve this problem, then? > > > > By moving its application to image.c, which knows where an image is > > being displayed and can apply specific scales for each frame. > > But, as this bug seems to indicate, that solution doesn't always work? > > > >> Image caches must be flushed when image-scaling-factor is modified, > > >> unless it is set to `auto' and a display's scale changes, because > > >> image.c has no means of detecting variable modifications and so only the > > >> latter event can be automatically detected. > > > > > > Please describe the issue in more detail, as I don't think I follow > > > what you are saying here. If we need to detect changes in variables, > > > we can use the add-variable-watcher technique, similar to what we do > > > in frame.el with variables that need to force redisplay (but maybe I > > > don't understand the problem you are describing). > > > > > > In any case, I don't think changes in image-scaling-factor are > > > supposed to be immediately reflected on display, if that's what you > > > have in mind. This is not the documented effect of this variable. > > > > What I am trying to communicate is that changes to > > `image-scaling-factor' must be accompanied by flushing the image cache > > if it is to take effect on all previously displayed images. This isn't > > a problem, and the OP should simply flush the image cache after > > modifying image-scaling-factor, rather than rely on the erroneous > > behavior of find-image which was removed. > > OK, so do you consider the solution of recording the scale factor in > the cache a reasonable one? > > > >