From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: create-image and find-image consistency Date: Mon, 20 Apr 2020 02:24:14 +0300 Organization: LINKOV.NET Message-ID: <87lfmrvz35.fsf@mail.linkov.net> References: <3a9c34ae-8052-d634-78c3-e83a2f6b6624@orange.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121105"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: David Ponce Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 20 01:28:38 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jQJMc-000VPB-6F for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Apr 2020 01:28:38 +0200 Original-Received: from localhost ([::1]:54068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQJMb-0004u3-4C for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 19:28:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38484 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQJLu-0003g2-ML for emacs-devel@gnu.org; Sun, 19 Apr 2020 19:27:54 -0400 Original-Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQJLu-0002aV-Ad for emacs-devel@gnu.org; Sun, 19 Apr 2020 19:27:54 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60335) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQJLt-0002SA-Rc for emacs-devel@gnu.org; Sun, 19 Apr 2020 19:27:53 -0400 X-Originating-IP: 91.129.99.85 Original-Received: from mail.gandi.net (m91-129-99-85.cust.tele2.ee [91.129.99.85]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 172D9C0007; Sun, 19 Apr 2020 23:27:51 +0000 (UTC) In-Reply-To: <3a9c34ae-8052-d634-78c3-e83a2f6b6624@orange.fr> (David Ponce's message of "Wed, 15 Apr 2020 10:48:52 +0200") Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs1p.gnu.org: Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.183.198 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247336 Archived-At: > I propose the below patch to have `find-image' use `create-image' in order to get > consistent results from both functions. Another advantage of using `create-image' is > that it is no longer necessary to provide the :type property to `find-image'. > The correct type is determined by `create-image' with the proper default scaling. > > Here is the result of previous example with patched `find-image': > > (find-image '((:file "[EMACS-DIR]/etc/images/icons/hicolor/scalable/apps/emacs.svg"))) > ==> (image :type svg :file "[EMACS-DIR]/etc/images/icons/hicolor/scalable/apps/emacs.svg" :scale 1.2) > > Please eventually consider this enhancement to Emacs, if it makes sense. I haven't tested it yet, but it makes sense indeed.