From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#57813: Icon images are non-functional Date: Fri, 23 Sep 2022 18:48:54 +0300 Organization: LINKOV.NET Message-ID: <86zgequm55.fsf@mail.linkov.net> References: <86pmfxlp7s.fsf@mail.linkov.net> <861qsca9cn.fsf@mail.linkov.net> <867d2476u4.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7547"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) To: 57813@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 23 17:58:46 2022 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 1obl4f-0001lo-St for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 17:58:45 +0200 Original-Received: from localhost ([::1]:34236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obl4e-00007k-Nd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 11:58:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obl3z-0007OR-7p for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 11:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obl3y-0000Kb-Pu for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 11:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obl3y-00062o-It for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 11:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2022 15:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57813 X-GNU-PR-Package: emacs Original-Received: via spool by 57813-submit@debbugs.gnu.org id=B57813.166394863623161 (code B ref 57813); Fri, 23 Sep 2022 15:58:02 +0000 Original-Received: (at 57813) by debbugs.gnu.org; 23 Sep 2022 15:57:16 +0000 Original-Received: from localhost ([127.0.0.1]:41483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obl3E-00061V-CH for submit@debbugs.gnu.org; Fri, 23 Sep 2022 11:57:16 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:34113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obl3C-00061F-9x for 57813@debbugs.gnu.org; Fri, 23 Sep 2022 11:57:15 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 45D5E200003 for <57813@debbugs.gnu.org>; Fri, 23 Sep 2022 15:57:04 +0000 (UTC) In-Reply-To: <867d2476u4.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 15 Sep 2022 22:53:07 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:243476 Archived-At: > diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el > index ff4f20c207..ccc3657793 100644 > --- a/lisp/emacs-lisp/icons.el > +++ b/lisp/emacs-lisp/icons.el > @@ -202,7 +202,11 @@ icons--create > :height (if (eq height 'line) > (window-default-line-height) > height) > - :scale 1 :ascent 'center) > + :scale 1 > + :rotation (plist-get keywords :rotation) Oh, I noticed now this prints a warning in *Messages*: Invalid image ‘:rotation’ parameter nil but still continues to work fine. So maybe the keyword :rotation should be used only on this condition (plist-member keywords :rotation) instead of: (create-image file nil nil :rotation (plist-get keywords :rotation) I guess the only way is to convert this function call to 'apply' with a constructed list of arguments? Or better to change compute_image_rotation to allow nil in :rotation: diff --git a/src/image.c b/src/image.c index 1e323ba66a..6d9316c64b 100644 --- a/src/image.c +++ b/src/image.c @@ -2548,6 +2548,8 @@ compute_image_rotation (struct image *img, double *rotation) Lisp_Object value = image_spec_value (img->spec, QCrotation, &foundp); if (!foundp) return; + if (NILP (value)) + return; if (! NUMBERP (value)) { image_error ("Invalid image `:rotation' parameter");