GNU bug report logs - #75018
30.0.93; Dired icon missing in tool-bar

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Sun, 22 Dec 2024 00:21:02 UTC

Severity: normal

Found in version 30.0.93

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75018 in the body.
You can then email your comments to 75018 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 00:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to john muhl <jm <at> pub.pink>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 Dec 2024 00:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.93; Dired icon missing in tool-bar
Date: Sat, 21 Dec 2024 18:19:57 -0600
[Message part 1 (text/plain, inline)]
The usual Dired icon is missing and instead shows up as a couple
of tiny triangles in the normal state and as a very generic file
icon on hover. Happens on emacs-30 and master and X11 and PGTK
builds. Lucid and Motif builds are unaffected.

[dired-normal.webp (image/webp, attachment)]
[dired-hover.webp (image/webp, attachment)]
[Message part 4 (text/plain, inline)]



In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.2) of 2024-12-21 built on thelio
Repository revision: 5e97079cc7587ce338679ed237efb911723e4367
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12401004
System Description: Fedora Linux 41 (Workstation Edition)

Configured using:
 'configure --without-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs)

Memory information:
((conses 16 39074 9525) (symbols 48 5370 0) (strings 32 12568 1723)
 (string-bytes 1 306626) (vectors 16 9335)
 (vector-slots 8 111559 4018) (floats 8 21 3) (intervals 56 228 2)
 (buffers 992 10))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 06:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 08:43:19 +0200
> From: john muhl <jm <at> pub.pink>
> Date: Sat, 21 Dec 2024 18:19:57 -0600
> 
> The usual Dired icon is missing and instead shows up as a couple
> of tiny triangles in the normal state and as a very generic file
> icon on hover. Happens on emacs-30 and master and X11 and PGTK
> builds. Lucid and Motif builds are unaffected.

Where do the tool-bar icons come from in that build?  They are not
from the Emacs's etc/images/ directory, AFAICT.  Can you post the
Dired icon file from where your build takes them?

Also, is this problem new in the last pretest, or did previous
pretests behave the same?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 15:36:02 GMT) Full text and rfc822 format available.

Message #11 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: "john muhl" <jm <at> pub.pink>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 09:32:23 -0600
[Message part 1 (text/plain, inline)]
On Sun, Dec 22, 2024, at 12:43 AM, Eli Zaretskii wrote:
>> From: john muhl <jm <at> pub.pink>
>> Date: Sat, 21 Dec 2024 18:19:57 -0600
>> 
>> The usual Dired icon is missing and instead shows up as a couple
>> of tiny triangles in the normal state and as a very generic file
>> icon on hover. Happens on emacs-30 and master and X11 and PGTK
>> builds. Lucid and Motif builds are unaffected.
>
> Where do the tool-bar icons come from in that build?  They are not
> from the Emacs's etc/images/ directory, AFAICT.

They are the stock GTK icons. On this system they are located in
/usr/share/icons/. The option x-gtk-stock-map is responsible for
the mapping between Emacs' etc/images/* and the system's
icons. The attached patch fixes it here.

> Can you post the Dired icon file from where your build takes them?

Unfortunately I can't find those particular icons among the ~7000
icons in the /usr/share/icons/ directory but they're probably in
there somewhere.

> Also, is this problem new in the last pretest, or did previous
> pretests behave the same?

I tried 30.0.90 and 29.4 and they too are using the incorrect
icons. I suspect upgrading to Fedora 41 is what causes the
issue.
[0001-Fix-Dired-icon-in-tool-bar-for-GTK-builds.patch (text/x-patch, attachment)]
[dired-fixed.webp (image/webp, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 16:42:01 GMT) Full text and rfc822 format available.

Message #14 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "john muhl" <jm <at> pub.pink>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 18:40:45 +0200
> Date: Sun, 22 Dec 2024 09:32:23 -0600
> From: "john muhl" <jm <at> pub.pink>
> Cc: 75018 <at> debbugs.gnu.org
> 
> On Sun, Dec 22, 2024, at 12:43 AM, Eli Zaretskii wrote:
> >> From: john muhl <jm <at> pub.pink>
> >> Date: Sat, 21 Dec 2024 18:19:57 -0600
> >> 
> >> The usual Dired icon is missing and instead shows up as a couple
> >> of tiny triangles in the normal state and as a very generic file
> >> icon on hover. Happens on emacs-30 and master and X11 and PGTK
> >> builds. Lucid and Motif builds are unaffected.
> >
> > Where do the tool-bar icons come from in that build?  They are not
> > from the Emacs's etc/images/ directory, AFAICT.
> 
> They are the stock GTK icons. On this system they are located in
> /usr/share/icons/. The option x-gtk-stock-map is responsible for
> the mapping between Emacs' etc/images/* and the system's
> icons. The attached patch fixes it here.

Can you explain the rationale for the patch and how it solves the
problem?

> > Can you post the Dired icon file from where your build takes them?
> 
> Unfortunately I can't find those particular icons among the ~7000
> icons in the /usr/share/icons/ directory but they're probably in
> there somewhere.

If you run Emacs under GDB with a breakpoint in lookup_image, you
should see all the tool-bar icons being loaded during startup.  You
can use the following GDB commands for the breakpoint, to see when the
icon you are interested in gets loaded:

  pp spec

This should show you the full absolute file name of the icon file
Emacs is loading.

The command "pp" is defined in src/.gdbinit, so if you don't start GDB
from that directory, you will need to say

  (gdb) source /path/to/emacs/src/.gdbinit

before running Emacs, to be able to use this useful command.

> > Also, is this problem new in the last pretest, or did previous
> > pretests behave the same?
> 
> I tried 30.0.90 and 29.4 and they too are using the incorrect
> icons. I suspect upgrading to Fedora 41 is what causes the
> issue.

Yes, that's usually the first suspect in such cases.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 18:16:02 GMT) Full text and rfc822 format available.

Message #17 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: john muhl <jm <at> pub.pink>, 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 19:15:43 +0100
On Sun, 22 Dec 2024 18:40:45 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> Date: Sun, 22 Dec 2024 09:32:23 -0600
>> From: "john muhl" <jm <at> pub.pink>
>> Cc: 75018 <at> debbugs.gnu.org
[...]
>> > Can you post the Dired icon file from where your build takes them?
>>
>> Unfortunately I can't find those particular icons among the ~7000
>> icons in the /usr/share/icons/ directory but they're probably in
>> there somewhere.
>
> If you run Emacs under GDB with a breakpoint in lookup_image, you
> should see all the tool-bar icons being loaded during startup.  You
> can use the following GDB commands for the breakpoint, to see when the
> icon you are interested in gets loaded:
>
>   pp spec
>
> This should show you the full absolute file name of the icon file
> Emacs is loading.

When I do that it shows that all the icon files are from etc/images in
the Emacs source tree and are xpm files.  However, the icons actually
displayed are the same as in screenshots John Muhl posted, except that I
also have an icon for the `dired' command.  This icon is located at
/usr/share/icons/gnome/24x24/places/folder.png (or possibly a different
size) on my system.  The other icons (which are the same as in John's
screenshots) are located under /usr/share/icons/Adwaita/symbolic here;
there is also an icon there that looks similar to the folder.png icon
used for `dired' but matches the look of the other icons, so I wonder
why Emacs uses an icon from a different set of icons in this case.  My
system is GNU/Linux with the Gtk3 toolkit and Xfce4 desktop.  It seems
that the Gtk3 build overrides the icons provided by Emacs, but not in a
completely consistent way.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 18:46:01 GMT) Full text and rfc822 format available.

Message #20 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: jm <at> pub.pink, 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 20:45:06 +0200
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: "john muhl" <jm <at> pub.pink>,  75018 <at> debbugs.gnu.org
> Date: Sun, 22 Dec 2024 19:15:43 +0100
> 
> On Sun, 22 Dec 2024 18:40:45 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> >> Date: Sun, 22 Dec 2024 09:32:23 -0600
> >> From: "john muhl" <jm <at> pub.pink>
> >> Cc: 75018 <at> debbugs.gnu.org
> [...]
> >> > Can you post the Dired icon file from where your build takes them?
> >>
> >> Unfortunately I can't find those particular icons among the ~7000
> >> icons in the /usr/share/icons/ directory but they're probably in
> >> there somewhere.
> >
> > If you run Emacs under GDB with a breakpoint in lookup_image, you
> > should see all the tool-bar icons being loaded during startup.  You
> > can use the following GDB commands for the breakpoint, to see when the
> > icon you are interested in gets loaded:
> >
> >   pp spec
> >
> > This should show you the full absolute file name of the icon file
> > Emacs is loading.
> 
> When I do that it shows that all the icon files are from etc/images in
> the Emacs source tree and are xpm files.  However, the icons actually
> displayed are the same as in screenshots John Muhl posted, except that I
> also have an icon for the `dired' command.  This icon is located at
> /usr/share/icons/gnome/24x24/places/folder.png (or possibly a different
> size) on my system.  The other icons (which are the same as in John's
> screenshots) are located under /usr/share/icons/Adwaita/symbolic here;
> there is also an icon there that looks similar to the folder.png icon
> used for `dired' but matches the look of the other icons, so I wonder
> why Emacs uses an icon from a different set of icons in this case.  My
> system is GNU/Linux with the Gtk3 toolkit and Xfce4 desktop.  It seems
> that the Gtk3 build overrides the icons provided by Emacs, but not in a
> completely consistent way.

The reason I asked about the file is because we should try to
understand why it is not shown as expected.  If this is the result of
upgrading the system, it would be good to know how did this particular
icon file change as result of the upgrade, and why that caused the
display to fail.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 19:46:02 GMT) Full text and rfc822 format available.

Message #23 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 13:45:02 -0600
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sun, 22 Dec 2024 09:32:23 -0600
>> From: "john muhl" <jm <at> pub.pink>
>> Cc: 75018 <at> debbugs.gnu.org
>> 
>> On Sun, Dec 22, 2024, at 12:43 AM, Eli Zaretskii wrote:
>> >> From: john muhl <jm <at> pub.pink>
>> >> Date: Sat, 21 Dec 2024 18:19:57 -0600
>> >> 
>> >> The usual Dired icon is missing and instead shows up as a couple
>> >> of tiny triangles in the normal state and as a very generic file
>> >> icon on hover. Happens on emacs-30 and master and X11 and PGTK
>> >> builds. Lucid and Motif builds are unaffected.
>> >
>> > Where do the tool-bar icons come from in that build?  They are not
>> > from the Emacs's etc/images/ directory, AFAICT.
>> 
>> They are the stock GTK icons. On this system they are located in
>> /usr/share/icons/. The option x-gtk-stock-map is responsible for
>> the mapping between Emacs' etc/images/* and the system's
>> icons. The attached patch fixes it here.
>
> Can you explain the rationale for the patch and how it solves the
> problem?

Honestly I don’t understand how x-gtk-stock-map does its thing. I
was just trying to get an icon to appear.

My first idea was to remove mapping for etc/images/diropen hoping
it would fall back on the included image but that didn’t work. In
fact setting x-g-s-m to nil (PROBLEMS suggests this should cause
Emacs’ included icons to be used) causes all the icons to fail to
be found and end up looking the same way as the broken Dired icon.

>> > Can you post the Dired icon file from where your build takes them?
>> 
>> Unfortunately I can't find those particular icons among the ~7000
>> icons in the /usr/share/icons/ directory but they're probably in
>> there somewhere.
>
> If you run Emacs under GDB with a breakpoint in lookup_image, you
> should see all the tool-bar icons being loaded during startup.  You
> can use the following GDB commands for the breakpoint, to see when the
> icon you are interested in gets loaded:
>
>   pp spec
>
> This should show you the full absolute file name of the icon file
> Emacs is loading.
>
> The command "pp" is defined in src/.gdbinit, so if you don't start GDB
> from that directory, you will need to say
>
>   (gdb) source /path/to/emacs/src/.gdbinit
>
> before running Emacs, to be able to use this useful command.

With the breakpoint in place I see:

  (image :type xpm
         :file "/home/jm/tmp/emacs-30/etc/images/diropen.xpm"
         :scale default)

All the others icons similarly claim to be loaded from an XMP file
in the Emacs source directory. Of course those XMP files look
nothing like those that actually appear in the tool-bar. The icons
that are actually used are all somewhere under
/usr/share/icons/Adwaita/symbolic/.

>> > Also, is this problem new in the last pretest, or did previous
>> > pretests behave the same?
>> 
>> I tried 30.0.90 and 29.4 and they too are using the incorrect
>> icons. I suspect upgrading to Fedora 41 is what causes the
>> issue.
>
> Yes, that's usually the first suspect in such cases.
>
> Thanks.

Actually now that I’m paying attention I see missing icons all
over the place. This message-mode buffer is missing icons for
“File this draft message and exit” and “Preview”. Info mode is
missing “Goto previous node”, “Goto next node” and “Go up the info
tree”. A VC-log buffer is missing another handful...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 19:53:02 GMT) Full text and rfc822 format available.

Message #26 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 13:52:22 -0600
Confirmation it’s not just me:

https://discussion.fedoraproject.org/t/the-gdb-toolbar-icons-are-displayed-incorrectly-in-emacs-on-fedora-41-with-gnome/136650

john muhl <jm <at> pub.pink> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Date: Sun, 22 Dec 2024 09:32:23 -0600
>>> From: "john muhl" <jm <at> pub.pink>
>>> Cc: 75018 <at> debbugs.gnu.org
>>> 
>>> On Sun, Dec 22, 2024, at 12:43 AM, Eli Zaretskii wrote:
>>> >> From: john muhl <jm <at> pub.pink>
>>> >> Date: Sat, 21 Dec 2024 18:19:57 -0600
>>> >> 
>>> >> The usual Dired icon is missing and instead shows up as a couple
>>> >> of tiny triangles in the normal state and as a very generic file
>>> >> icon on hover. Happens on emacs-30 and master and X11 and PGTK
>>> >> builds. Lucid and Motif builds are unaffected.
>>> >
>>> > Where do the tool-bar icons come from in that build?  They are not
>>> > from the Emacs's etc/images/ directory, AFAICT.
>>> 
>>> They are the stock GTK icons. On this system they are located in
>>> /usr/share/icons/. The option x-gtk-stock-map is responsible for
>>> the mapping between Emacs' etc/images/* and the system's
>>> icons. The attached patch fixes it here.
>>
>> Can you explain the rationale for the patch and how it solves the
>> problem?
>
> Honestly I don’t understand how x-gtk-stock-map does its thing. I
> was just trying to get an icon to appear.
>
> My first idea was to remove mapping for etc/images/diropen hoping
> it would fall back on the included image but that didn’t work. In
> fact setting x-g-s-m to nil (PROBLEMS suggests this should cause
> Emacs’ included icons to be used) causes all the icons to fail to
> be found and end up looking the same way as the broken Dired icon.
>
>>> > Can you post the Dired icon file from where your build takes them?
>>> 
>>> Unfortunately I can't find those particular icons among the ~7000
>>> icons in the /usr/share/icons/ directory but they're probably in
>>> there somewhere.
>>
>> If you run Emacs under GDB with a breakpoint in lookup_image, you
>> should see all the tool-bar icons being loaded during startup.  You
>> can use the following GDB commands for the breakpoint, to see when the
>> icon you are interested in gets loaded:
>>
>>   pp spec
>>
>> This should show you the full absolute file name of the icon file
>> Emacs is loading.
>>
>> The command "pp" is defined in src/.gdbinit, so if you don't start GDB
>> from that directory, you will need to say
>>
>>   (gdb) source /path/to/emacs/src/.gdbinit
>>
>> before running Emacs, to be able to use this useful command.
>
> With the breakpoint in place I see:
>
>   (image :type xpm
>          :file "/home/jm/tmp/emacs-30/etc/images/diropen.xpm"
>          :scale default)
>
> All the others icons similarly claim to be loaded from an XMP file
> in the Emacs source directory. Of course those XMP files look
> nothing like those that actually appear in the tool-bar. The icons
> that are actually used are all somewhere under
> /usr/share/icons/Adwaita/symbolic/.
>
>>> > Also, is this problem new in the last pretest, or did previous
>>> > pretests behave the same?
>>> 
>>> I tried 30.0.90 and 29.4 and they too are using the incorrect
>>> icons. I suspect upgrading to Fedora 41 is what causes the
>>> issue.
>>
>> Yes, that's usually the first suspect in such cases.
>>
>> Thanks.
>
> Actually now that I’m paying attention I see missing icons all
> over the place. This message-mode buffer is missing icons for
> “File this draft message and exit” and “Preview”. Info mode is
> missing “Goto previous node”, “Goto next node” and “Go up the info
> tree”. A VC-log buffer is missing another handful...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 21:35:02 GMT) Full text and rfc822 format available.

Message #29 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jm <at> pub.pink, 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 22:34:15 +0100
On Sun, 22 Dec 2024 20:45:06 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: "john muhl" <jm <at> pub.pink>,  75018 <at> debbugs.gnu.org
>> Date: Sun, 22 Dec 2024 19:15:43 +0100
>>
>> On Sun, 22 Dec 2024 18:40:45 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> >> Date: Sun, 22 Dec 2024 09:32:23 -0600
>> >> From: "john muhl" <jm <at> pub.pink>
>> >> Cc: 75018 <at> debbugs.gnu.org
>> [...]
>> >> > Can you post the Dired icon file from where your build takes them?
>> >>
>> >> Unfortunately I can't find those particular icons among the ~7000
>> >> icons in the /usr/share/icons/ directory but they're probably in
>> >> there somewhere.
>> >
>> > If you run Emacs under GDB with a breakpoint in lookup_image, you
>> > should see all the tool-bar icons being loaded during startup.  You
>> > can use the following GDB commands for the breakpoint, to see when the
>> > icon you are interested in gets loaded:
>> >
>> >   pp spec
>> >
>> > This should show you the full absolute file name of the icon file
>> > Emacs is loading.
>>
>> When I do that it shows that all the icon files are from etc/images in
>> the Emacs source tree and are xpm files.  However, the icons actually
>> displayed are the same as in screenshots John Muhl posted, except that I
>> also have an icon for the `dired' command.  This icon is located at
>> /usr/share/icons/gnome/24x24/places/folder.png (or possibly a different
>> size) on my system.  The other icons (which are the same as in John's
>> screenshots) are located under /usr/share/icons/Adwaita/symbolic here;
>> there is also an icon there that looks similar to the folder.png icon
>> used for `dired' but matches the look of the other icons, so I wonder
>> why Emacs uses an icon from a different set of icons in this case.  My
>> system is GNU/Linux with the Gtk3 toolkit and Xfce4 desktop.  It seems
>> that the Gtk3 build overrides the icons provided by Emacs, but not in a
>> completely consistent way.
>
> The reason I asked about the file is because we should try to
> understand why it is not shown as expected.  If this is the result of
> upgrading the system, it would be good to know how did this particular
> icon file change as result of the upgrade, and why that caused the
> display to fail.

I understand that, but it seems that `pp spec' won't help here, since it
apparently only shows the icon files provided by Emacs (as John Muhl's
followup post also confirms), while Gtk3 (or the Emacs API to Gtk3)
evidently uses another mechanism to load other icon.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Sun, 22 Dec 2024 23:58:01 GMT) Full text and rfc822 format available.

Message #32 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sun, 22 Dec 2024 17:57:04 -0600
The following gets all the icons working:

  dnf install gdk-pixbuf2-modules-extra

Maybe something to mention PROBLEMS? Feel free to close unless you
think there anything else to investigate.


john muhl <jm <at> pub.pink> writes:

> Confirmation it’s not just me:
>
> https://discussion.fedoraproject.org/t/the-gdb-toolbar-icons-are-displayed-incorrectly-in-emacs-on-fedora-41-with-gnome/136650
>
> john muhl <jm <at> pub.pink> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> Date: Sun, 22 Dec 2024 09:32:23 -0600
>>>> From: "john muhl" <jm <at> pub.pink>
>>>> Cc: 75018 <at> debbugs.gnu.org
>>>> 
>>>> On Sun, Dec 22, 2024, at 12:43 AM, Eli Zaretskii wrote:
>>>> >> From: john muhl <jm <at> pub.pink>
>>>> >> Date: Sat, 21 Dec 2024 18:19:57 -0600
>>>> >> 
>>>> >> The usual Dired icon is missing and instead shows up as a couple
>>>> >> of tiny triangles in the normal state and as a very generic file
>>>> >> icon on hover. Happens on emacs-30 and master and X11 and PGTK
>>>> >> builds. Lucid and Motif builds are unaffected.
>>>> >
>>>> > Where do the tool-bar icons come from in that build?  They are not
>>>> > from the Emacs's etc/images/ directory, AFAICT.
>>>> 
>>>> They are the stock GTK icons. On this system they are located in
>>>> /usr/share/icons/. The option x-gtk-stock-map is responsible for
>>>> the mapping between Emacs' etc/images/* and the system's
>>>> icons. The attached patch fixes it here.
>>>
>>> Can you explain the rationale for the patch and how it solves the
>>> problem?
>>
>> Honestly I don’t understand how x-gtk-stock-map does its thing. I
>> was just trying to get an icon to appear.
>>
>> My first idea was to remove mapping for etc/images/diropen hoping
>> it would fall back on the included image but that didn’t work. In
>> fact setting x-g-s-m to nil (PROBLEMS suggests this should cause
>> Emacs’ included icons to be used) causes all the icons to fail to
>> be found and end up looking the same way as the broken Dired icon.
>>
>>>> > Can you post the Dired icon file from where your build takes them?
>>>> 
>>>> Unfortunately I can't find those particular icons among the ~7000
>>>> icons in the /usr/share/icons/ directory but they're probably in
>>>> there somewhere.
>>>
>>> If you run Emacs under GDB with a breakpoint in lookup_image, you
>>> should see all the tool-bar icons being loaded during startup.  You
>>> can use the following GDB commands for the breakpoint, to see when the
>>> icon you are interested in gets loaded:
>>>
>>>   pp spec
>>>
>>> This should show you the full absolute file name of the icon file
>>> Emacs is loading.
>>>
>>> The command "pp" is defined in src/.gdbinit, so if you don't start GDB
>>> from that directory, you will need to say
>>>
>>>   (gdb) source /path/to/emacs/src/.gdbinit
>>>
>>> before running Emacs, to be able to use this useful command.
>>
>> With the breakpoint in place I see:
>>
>>   (image :type xpm
>>          :file "/home/jm/tmp/emacs-30/etc/images/diropen.xpm"
>>          :scale default)
>>
>> All the others icons similarly claim to be loaded from an XMP file
>> in the Emacs source directory. Of course those XMP files look
>> nothing like those that actually appear in the tool-bar. The icons
>> that are actually used are all somewhere under
>> /usr/share/icons/Adwaita/symbolic/.
>>
>>>> > Also, is this problem new in the last pretest, or did previous
>>>> > pretests behave the same?
>>>> 
>>>> I tried 30.0.90 and 29.4 and they too are using the incorrect
>>>> icons. I suspect upgrading to Fedora 41 is what causes the
>>>> issue.
>>>
>>> Yes, that's usually the first suspect in such cases.
>>>
>>> Thanks.
>>
>> Actually now that I’m paying attention I see missing icons all
>> over the place. This message-mode buffer is missing icons for
>> “File this draft message and exit” and “Preview”. Info mode is
>> missing “Goto previous node”, “Goto next node” and “Go up the info
>> tree”. A VC-log buffer is missing another handful...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Mon, 23 Dec 2024 13:00:02 GMT) Full text and rfc822 format available.

Message #35 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Mon, 23 Dec 2024 14:59:06 +0200
> From: john muhl <jm <at> pub.pink>
> Cc: 75018 <at> debbugs.gnu.org
> Date: Sun, 22 Dec 2024 17:57:04 -0600
> 
> The following gets all the icons working:
> 
>   dnf install gdk-pixbuf2-modules-extra
> 
> Maybe something to mention PROBLEMS? Feel free to close unless you
> think there anything else to investigate.

I'm okay with having a PROBLEMS entry about this, but I'd be much
happier if I understood some more about the problem.  How does
installing those icons solve the problem?  Is the problem caused by
absence of some icons, and the strange display is just an indication
that the file is missing?

And what, if anything, should we do with the patch you posted a few
messages ago? is it also needed?  If it is not needed after installing
gdk-pixbuf2-modules-extra, then how did that patch solve the problem
without the icons?

IOW, this issue is still some black magic to me, and I'd like the
mystery be lifted.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Mon, 23 Dec 2024 17:22:01 GMT) Full text and rfc822 format available.

Message #38 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Mon, 23 Dec 2024 11:21:06 -0600
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: john muhl <jm <at> pub.pink>
>> Cc: 75018 <at> debbugs.gnu.org
>> Date: Sun, 22 Dec 2024 17:57:04 -0600
>> 
>> The following gets all the icons working:
>> 
>>   dnf install gdk-pixbuf2-modules-extra
>> 
>> Maybe something to mention PROBLEMS? Feel free to close unless you
>> think there anything else to investigate.
>
> I'm okay with having a PROBLEMS entry about this, but I'd be much
> happier if I understood some more about the problem.  How does
> installing those icons solve the problem?  Is the problem caused by
> absence of some icons, and the strange display is just an indication
> that the file is missing?

The gdk-pixbuf2-modules-extra package doesn’t install any
icons. It installs support for loading additional image formats:

  This package contains modules for loading ANI, BMP, ICNS, ICO,
  PNM, QTIF, TGA, XBM, and XPM images.

What appears to have happened is that the loaders for these
formats were removed from the main GDK packages in Fedora 41 thus
any attempt to load an XPM fails (in Emacs and all other
programs). Why the developers decided to use those strange icons
in case of failure is unclear and probably beyond my investigative
abilities.

Ultimately Fedora needs to fix their Emacs package so that
gdk-pixbuf2-modules-extra is listed among the dependencies. Does
Emacs have any connections there we could reach out to? If not I
can send bug report.

> And what, if anything, should we do with the patch you posted a few
> messages ago? is it also needed?

It is not needed but users of the GTK builds might find it an
improvement as it makes Dired match the style of their system’s
icon theme. Maybe we could try it on master and be ready to revert
if it proves unwelcome. The attached image shows the current
situation on top and the patched version below.

However, a non-exhaustive search of the archives didn’t turn up
any complaints about the current state so maybe everyone is happy
enough as is…or has the tool-bar disabled, doesn’t care and it’s
not even worth the effort to test it on master.

FTR: I do use the tool-bar all the time on GUI frames and find the
mismash of icon styles very mildly annoying.

> If it is not needed after installing
> gdk-pixbuf2-modules-extra, then how did that patch solve the problem
> without the icons?

The patch “fixed” it by mapping etc/images/diropen to a system
icon (part of the stock icons and already available by default)
which meant that it wouldn’t try to fallback on
etc/images/diropen.xpm. Therefore it wouldn’t run into the issue
of the missing XPM loader that is part of the
gdk-pixbuf2-modules-extra package.

The patch does nothing for all the other missing icons I mentioned
(message-mode, Info &c.). Installing the package of extra loaders
fixes all those as they are once again able to load from the
etc/images/*.xpm files.

> IOW, this issue is still some black magic to me, and I'd like the
> mystery be lifted.
>
> Thanks.

I hope that it’s at least a little less mysterious now.

[dired-comp.webp (image/webp, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 28 Dec 2024 11:57:05 GMT) Full text and rfc822 format available.

Notification sent to john muhl <jm <at> pub.pink>:
bug acknowledged by developer. (Sat, 28 Dec 2024 11:57:06 GMT) Full text and rfc822 format available.

Message #43 received at 75018-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: 75018-done <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Sat, 28 Dec 2024 13:56:08 +0200
> From: john muhl <jm <at> pub.pink>
> Cc: 75018 <at> debbugs.gnu.org
> Date: Mon, 23 Dec 2024 11:21:06 -0600
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: john muhl <jm <at> pub.pink>
> >> Cc: 75018 <at> debbugs.gnu.org
> >> Date: Sun, 22 Dec 2024 17:57:04 -0600
> >> 
> >> The following gets all the icons working:
> >> 
> >>   dnf install gdk-pixbuf2-modules-extra
> >> 
> >> Maybe something to mention PROBLEMS? Feel free to close unless you
> >> think there anything else to investigate.
> >
> > I'm okay with having a PROBLEMS entry about this, but I'd be much
> > happier if I understood some more about the problem.  How does
> > installing those icons solve the problem?  Is the problem caused by
> > absence of some icons, and the strange display is just an indication
> > that the file is missing?
> 
> The gdk-pixbuf2-modules-extra package doesn’t install any
> icons. It installs support for loading additional image formats:
> 
>   This package contains modules for loading ANI, BMP, ICNS, ICO,
>   PNM, QTIF, TGA, XBM, and XPM images.
> 
> What appears to have happened is that the loaders for these
> formats were removed from the main GDK packages in Fedora 41 thus
> any attempt to load an XPM fails (in Emacs and all other
> programs). Why the developers decided to use those strange icons
> in case of failure is unclear and probably beyond my investigative
> abilities.
> 
> Ultimately Fedora needs to fix their Emacs package so that
> gdk-pixbuf2-modules-extra is listed among the dependencies. Does
> Emacs have any connections there we could reach out to? If not I
> can send bug report.
> 
> > And what, if anything, should we do with the patch you posted a few
> > messages ago? is it also needed?
> 
> It is not needed but users of the GTK builds might find it an
> improvement as it makes Dired match the style of their system’s
> icon theme. Maybe we could try it on master and be ready to revert
> if it proves unwelcome. The attached image shows the current
> situation on top and the patched version below.
> 
> However, a non-exhaustive search of the archives didn’t turn up
> any complaints about the current state so maybe everyone is happy
> enough as is…or has the tool-bar disabled, doesn’t care and it’s
> not even worth the effort to test it on master.
> 
> FTR: I do use the tool-bar all the time on GUI frames and find the
> mismash of icon styles very mildly annoying.
> 
> > If it is not needed after installing
> > gdk-pixbuf2-modules-extra, then how did that patch solve the problem
> > without the icons?
> 
> The patch “fixed” it by mapping etc/images/diropen to a system
> icon (part of the stock icons and already available by default)
> which meant that it wouldn’t try to fallback on
> etc/images/diropen.xpm. Therefore it wouldn’t run into the issue
> of the missing XPM loader that is part of the
> gdk-pixbuf2-modules-extra package.
> 
> The patch does nothing for all the other missing icons I mentioned
> (message-mode, Info &c.). Installing the package of extra loaders
> fixes all those as they are once again able to load from the
> etc/images/*.xpm files.
> 
> > IOW, this issue is still some black magic to me, and I'd like the
> > mystery be lifted.
> >
> > Thanks.
> 
> I hope that it’s at least a little less mysterious now.

OK, thanks.  I've now added a PROBLEMS entry about this on the
emacs-20 release branch, and I'm therefore closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75018; Package emacs. (Mon, 13 Jan 2025 13:00:02 GMT) Full text and rfc822 format available.

Message #46 received at 75018 <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: 75018 <at> debbugs.gnu.org
Subject: Re: bug#75018: 30.0.93; Dired icon missing in tool-bar
Date: Mon, 13 Jan 2025 12:59:45 +0000 (GMT)
This was reported to Fedora at https://bugzilla.redhat.com/show_bug.cgi?id=2335309, and is now fixed.

-- 
Peter Oliver




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Feb 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.