GNU bug report logs -
#66846
30.0.50; unexpected behavior of icon with non-existing image file?
Previous Next
Reported by: David Ponce <da_vid <at> orange.fr>
Date: Tue, 31 Oct 2023 12:31:01 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
In fact, I wonder if a better implementation of the `icons--create'
method could be to delegate image creation to `find-image'?
Something like this:
(cl-defmethod icons--create ((_type (eql 'image)) icon keywords)
(when-let
((image
(find-image
`(( :file ,icon
,@(append
(if-let ((val (plist-get keywords :height)))
(list :height (if (eq val 'line)
(window-default-line-height)
val)))
(if-let ((val (plist-get keywords :width)))
(list :width (if (eq val 'font)
(default-font-width)
val)))
'(:scale 1)
(if-let ((val (plist-get keywords :rotation)))
(list :rotation val))
(if-let ((val (plist-get keywords :margin)))
(list :margin val))
(list :ascent (or (plist-get keywords :ascent)
'center))))))))
(propertize " " 'display image)))
This bug report was last modified 1 year and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.