From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74725: 31.0.50; image-scaling-factor is ignored by create-image Date: Sun, 08 Dec 2024 16:03:28 +0800 Message-ID: <87h67eha9b.fsf@yahoo.com> References: <2304cad6-884f-4528-a85e-ab9c06b80016@orange.fr> <868qsrim4a.fsf@gnu.org> <2793f551-8715-4679-8f52-b4673dd6802d@orange.fr> <86y10rh26m.fsf@gnu.org> <87plm3ghzw.fsf@yahoo.com> <86frmyhfss.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74725@debbugs.gnu.org, da_vid@orange.fr, alan@idiocy.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 08 09:04:14 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 1tKCGz-000AIC-8u for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Dec 2024 09:04:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKCGq-0002SL-Mj; Sun, 08 Dec 2024 03:04:04 -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 ) id 1tKCGp-0002RY-Ai for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 03:04: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 ) id 1tKCGo-0004fx-Pa for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 03:04:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Hw5hZB+94e7iFrBAXZLVr+0YrVclLl6Vy3Dklk7Ejvk=; b=fLQ6mPdpw8Tg1rulniSk9PmYwE3rjK2vdPvfnG3iu/pYgJh6lkM7FgvoOMHad8fWeUh9RQz5Bi7MTlpnUSkxjVzYqIQ7v8oNHXq2WX3tqlD0pw+8IXrjQ+4o+fkhxR1bzj6Q13dibQYHdYrspUoEk7khEdwjfXenqnAezOGOuoHs84d3CHv6KcJ4NHMM5UEanRzuZYuvgZE+kBZe2+KyNUMzpESfPtMuiGKH+ogNOoMk2nJtewVHhebf2eVaiGLHLTtPg07ElDPwbt1qgsEOvhmjLoW14ezv/wETQRDqPUE2dmfoT/pCqSbH7EKQaN/+kawVyA6xrDu7+kgWE/xjsA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKCGo-0002TI-Jh for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 03:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Dec 2024 08:04:02 +0000 Resent-Message-ID: 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.17336450279472 (code B ref 74725); Sun, 08 Dec 2024 08:04:02 +0000 Original-Received: (at 74725) by debbugs.gnu.org; 8 Dec 2024 08:03:47 +0000 Original-Received: from localhost ([127.0.0.1]:49595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKCGZ-0002Sf-0j for submit@debbugs.gnu.org; Sun, 08 Dec 2024 03:03:47 -0500 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]:44015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKCGW-0002SQ-Qu for 74725@debbugs.gnu.org; Sun, 08 Dec 2024 03:03:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1733645019; bh=Hw5hZB+94e7iFrBAXZLVr+0YrVclLl6Vy3Dklk7Ejvk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=OexbcaD9sftY+9pkRrPQ/UH1a649J7LrcMbtk91RfRre0BFmFqp7ouSdV9Sf+3/UM4XGf1J3pnSbDyv8d4ygcYRtJjqJhG6pmCmEOKwDqGDvYc3DsfQo9hwby0Tkr3pXzH/ebPLruOna8iaBNTs8+DsCf8Zk8XD+6NSIXKjJ/DR0jcbBKIb56BCMU7SPOMJwxG5yXcJdIuFoHJyX/GHPlI0Z34FHylo+Ak/MwYTjhgjVgaI8gRTQdDsYM9yDJXrDhXyemzRPy3rRWaS7FHMn6yjs1BIQCjds8wZo55/q8Cqu4YcFoO8f3fhhHkI9b4o86HbhotroRsT1a0NgnSvc4w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1733645019; bh=V46c+Ib9++JiLqzaUIW5eh0YXo45zArUU+0GPfCG8ml=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=VEB/W1KEbJ/q8d08ZeuVZt8cLfatODRSmEu/qnEJ5fY1ApI6oEYxbhYslZ9+wQ9MeYwyNltlntgifT2Hoy+LwZdWYiQQlE15vNhz5V4oI821u5fumm1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3YteY8oO.Ei_Dc6T88bTUuFweDtKsAc_MFD X-Sonic-MF: X-Sonic-ID: adb98941-c9da-4d3a-af15-cac1233a273e Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Sun, 8 Dec 2024 08:03:39 +0000 Original-Received: by hermes--production-sg3-5b7954b588-f8smd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c0e1d59d150c2c9e36f5710865cb69c7; Sun, 08 Dec 2024 08:03:33 +0000 (UTC) In-Reply-To: <86frmyhfss.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Dec 2024 08:03:47 +0200") X-Mailer: WebService/1.1.23040 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:296622 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: David Ponce , alan@idiocy.org, 74725@debbugs.gnu.org >> Date: Sun, 08 Dec 2024 08:01:39 +0800 >> >> Eli Zaretskii writes: >> >> >> author Po Lu 2024-06-03 16:34:51 +0800 >> >> committer Po Lu 2024-06-03 16:36:29 +0800 >> >> commit 56376585134d627f96c71b7b063ec51548d3ad3f (patch) >> >> >> >> Which replaced >> >> >> >> - (list :scale >> >> - (image-compute-scaling-factor >> >> - image-scaling-factor))) >> >> >> >> By this >> >> >> >> + (list :scale 'default)) >> >> >> >> In create-image. >> >> >> >> With the side effect that the image spec don't change when the scaling >> >> factor changes, so the same cached image in always used. >> > >> > 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. >> 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. >> 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.