GNU bug report logs - #61413
[PATCH] Make warnings show a "warning" emoji instead of a stop-sign

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Sat, 11 Feb 2023 08:47:02 UTC

Severity: wishlist

Tags: patch

Merged with 60854

Full log


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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Rudolf Adamkovič <rudolf <at> adamkovic.org>
Cc: rms <at> gnu.org, Stefan Kangas <stefankangas <at> gmail.com>, 61413 <at> debbugs.gnu.org,
 Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
Subject: Re: bug#61413: [PATCH] Make warnings show a "warning" emoji instead
 of a stop-sign
Date: Sat, 15 Feb 2025 11:26:23 +0100
Rudolf Adamkovič <rudolf <at> adamkovic.org> writes:

>> (b) as Konstantin suggested, ditching pictograms entirely, and replacing
>> that icon with a regular text button clearly labeled "suppress"
>
> +1 for a standard, discoverable, and accessible button.

Thoughts prompted by this and rms's messages:

* A bona-fide bug:

display-warning *strips* the button's help-echo property:

  (insert (buttonize (icon-string 'warnings-suppress)
                     #'warnings-suppress type)

'buttonize' clobbers the help-echo property added by 'icon-string' ☹️
That does make the current emoji extra-obscure, since hovering over it
gives no clue as to what it does!

Solutions:

(a) display-warning could retrieve the property from the string returned
by icon-string, then spoon-feeding it back to buttonize,
(b) buttonize could check whether its STRING argument has a help-echo
property before clobbering it with nil,
(c) we invent a sentinel value for buttonize's HELP-ECHO argument to
mean "psst, STRING already has the right help-echo property; use that".


* A general remark:

For users to whom emoji presentation _in general_ is not accessible
enough, the icon-preference option can be set to 'text to always get "a
regular text button clearly labeled <something>".

Thought it bore mention since the present report is about bikeshedding
the graphical representation of the warnings-suppress icon, whereas
Rudolf's reply suggests - to me - a wider wish to be able to opt out of
these representations: this is already solved.


* A caveat for terminals:

As Eli mentions, icons.el already knows to fall back to a suitable
representation on TTYs.  In practice though, the Linux TTY can display a
few non-ASCII characters; as a result, here (6.13 if that matters) Emacs
falls back to warnings-suppress's _symbol_ representation…

  (symbol ,(if (and (eq system-type 'windows-nt)
                    (null window-system))
               " » "
             " ■ "))    ; 👈 that one

… which one could bikeshed too, if one were so inclined 🫣




This bug report was last modified 56 days ago.

Previous Next


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