Subject: Re: bug#66635: 30.0.50; customize-icon State button doesn't work (never did)

From: Mauro Aranda <[email-masked]>
Date: Sat, 21 Oct 2023 08:09:59 -0300

On 21/10/23 07:18, Mauro Aranda wrote:
 > On 21/10/23 04:35, Eli Zaretskii wrote:

 >  > How well is the fix tested?  Did you test it with several icons
 >  > introduced in Emacs 29 in various modes?  If not, would you please
 >  > test those and see the changes work well enough there to be
 >  > appropriate for a bug-fix release?
 >
 > I just tested with the button icon, the only one suggested after
 > running emacs -Q.  I tested making modifications in the buffer, and that
 > the two options (three if not started with -Q) work and do what's
 > intended.  Namely:
 > - Undo Editions took me back to the STANDARD state.
 > - Setting for the session modified the specs for the session and
 > correctly displayed the SET state.
 > - Saving the setting saved a spec that in a new session (without emacs
 > -Q) causes:
 > M-x describe-icon RET button
 > to show the button customized.  The value I changed for that was from
 > LARGE BLUE CIRCLE to LARGE RED SQUARE
 >
 > It's important to note that saving the setting shows the SET state
 > (rather than the SAVED state), but that's in a FIXME right before
 > custom-icon-state.
 >
 > I'll do some more testing with the icons defined in outline.el,
 > tab-bar.el and warnings.el.  Additionally I'll try to test if
 > Customizing an icon interacts good enough with a Theme customizations.
 > I'll do that and report back.

I checked outline.el icons and everything seems to work OK.  Tested in
some buffer with outline-mode, including the NEWS file.  Savings get
loaded correctly.  Similarly with warning-suppress icon.

With tab-bar.el I tried other images, and works fine too.  It didn't get
updated immediately, but after some time and user interaction, it showed
the new image.  I don't use tab-bar-mode so maybe there's something to
do to make it update.

Then I created a foo theme to customize icons and pon starting emacs and
customizing the icons the state was THEMED, and after customizing them
my customizations were respected.  So that works fine too.

One thing I found, but not related to my patch (and see below for
others) is that I had to require 'cus-edit to make
custom-theme-set-icons available.  That might not be optimal.

To sum it up, after testing more thoroughly, I haven't yet found any
trouble with my patch, which improves considerably icons customization.
More work needs to be done (expanding state checking, reverting
customizations, improving help in the custom buffer, adding support in
customize-create-theme, showing the image that would get used, etc), but
those should be separate bug reports, I think.