GNU bug report logs -
#76761
31.0.50; Image icons from 'icons.el' could be accidentally dropped
Previous Next
Reported by: Pengji Zhang <me <at> pengjiz.com>
Date: Wed, 5 Mar 2025 10:11:01 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 76761 <at> debbugs.gnu.org (full text, mbox):
> From: Pengji Zhang <me <at> pengjiz.com>
> Date: Wed, 05 Mar 2025 18:10:38 +0800
>
> Currently in 'icons.el' image icons returned by 'icon-string' is a space
> with a display property (see 'icons--create'). However, IMO it is common
> to stripped spaces, and that means the icon could be accidentally
> removed. For example,
>
> - Run 'emacs -Q'
> - Evaluate the following snippet:
>
> --8<---------------cut here---------------start------------->8---
> (require 'outline) ; for the icon
> (setopt mode-line-compact t)
> (setf global-mode-string
> '("" (:eval (icon-string 'outline-open)) " "))
> (force-mode-line-update t)
> --8<---------------cut here---------------end--------------->8---
>
> Notice that the down arrow icon does not show at all in the mode line
> due to 'mode-line-compact'.
>
> I suppose an easy fix is to use a non-space character. WDYT?
Isn't that rather a bug in mode-line-compact? It shouldn't remove
spaces which have 'display' properties on them, since they are not
"empty space" on the mode line.
This bug report was last modified 103 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.