From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69602: 29.1; Image :map should adjust with :scale and :rotation Date: Fri, 08 Mar 2024 09:24:28 +0200 Message-ID: <86frx11903.fsf@gnu.org> References: <87msramv72.fsf@breatheoutbreathe.in> <86jzmejzfd.fsf@gnu.org> <87a5namqyz.fsf@breatheoutbreathe.in> <86cys63281.fsf@gnu.org> <87wmqelakx.fsf@breatheoutbreathe.in> <86bk7q2xye.fsf@gnu.org> <871q8lk2o7.fsf@breatheoutbreathe.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 08 08:25:54 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 1riUc5-0004F7-Vf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Mar 2024 08:25:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riUbk-0007xK-OD; Fri, 08 Mar 2024 02:25:32 -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 1riUbi-0007wO-9G for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 02:25:30 -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 1riUbi-0004Kf-16 for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 02:25:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riUcD-0006He-SA for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 02:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Mar 2024 07:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69602 X-GNU-PR-Package: emacs Original-Received: via spool by 69602-submit@debbugs.gnu.org id=B69602.170988271124075 (code B ref 69602); Fri, 08 Mar 2024 07:26:01 +0000 Original-Received: (at 69602) by debbugs.gnu.org; 8 Mar 2024 07:25:11 +0000 Original-Received: from localhost ([127.0.0.1]:56224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riUbP-0006GF-6G for submit@debbugs.gnu.org; Fri, 08 Mar 2024 02:25:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riUbM-0006Fy-GM for 69602@debbugs.gnu.org; Fri, 08 Mar 2024 02:25:09 -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 ) id 1riUak-0003xd-Dw; Fri, 08 Mar 2024 02:24:30 -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=AFxkn93R0e9dv6zkSPXeyOCAHGLHiEiHNT0DdGu5ofw=; b=P/oTBwN+/HIR ie0FZNpVevv9tMZeBYi/NsbAWUfcd1NwsGWvaQLLeirS4JtDLnpaRHyKYIyq8UcmeBk/LI+tSs6ns j/fsjPtZ899rc8/oYgmxat5LRIgG+ewMLqhupZlxMADMh+s8Zpt08FM8WKf2Fb5y4gCeF7caYQrqu vK5tQY0feRoWogcRB/pf5cDeuSLIM/kLsPX7/2MBQStoz7C/GvmdZQw1cva9t32m5ifM3XOfn7cQL m2U9GRhlmpv/q4UYrKrJv1dwUyK/Oq363fidT1GEPzefhqBt1JsOkVfgbjhHPWL2VUHmFJ8lvbqPb 1Da0mq0jQWxW7/xMQPhQVA==; In-Reply-To: <871q8lk2o7.fsf@breatheoutbreathe.in> (message from Joseph Turner on Thu, 07 Mar 2024 05:53:11 -0800) 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:281207 Archived-At: > From: Joseph Turner > Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net > Date: Thu, 07 Mar 2024 05:53:11 -0800 > > > IOW, I don't understand why you think the problem can only be solved > > in C: AFAIK almost all of the machinery that performs image transforms > > is implemented in Lisp, and each time an image is rescaled, we > > basically re-process the image descriptor anew. > > The attached patch adds two hooks in `image.el' which allow packages to > recompute an image's map after it's rescaled or rotated. Thanks, but please accompany the code change with suitable changes for NEWS and the ELisp manual. Bonus points for adding tests for this to our test suite. Also, I think we don't need the "after" part in the names of these two hooks: their doc strings explicitly document that they are run after the transformation, and image-change-size-hook is easier to remember, since the name basically says "a hook run when image is resized". And finally, please mention the hooks in the doc strings of public functions that perform size-changes and rotations of images, as we usually do with other hooks.