5

Using Emacs 27.1 (mac port, BigSur), I get a strange behavior when I set the mouse face color using an hexadecimal description. Running emacs -Q -l show-bug.el, with show-bug.el being:

(font-lock-mode 0)
(insert  (propertize " CLICK "
             'face '(:foreground "black"
                     :background "light grey")
             'mouse-face '(:foreground "white"
                           :background "orange")))
(insert  (propertize " CLICK "
             'face '(:foreground "#37474F"
                     :background "#ECEFF1")
             'mouse-face '(:foreground "#FFFFFF"
                           :background "#FFAB91")))
(insert "\n")

The two texts are properly rendered but when the mouse hovers the second button, it is not highlighted with the specified color (it becomes white instead). In the meantime, in the *Messages* buffer, I get:

Unable to load color "#FFAB91"
Unable to load color "#FFFFFF"

However, if I switch to the *Messages* before hovering, the text becomes properly highlighted without error reporting. I would like to debug this but I'm not sure where to start.

Update 1 If I call describe-char on the second text, hovering works properly.

Update 2 If the mouse pointer is over the position where the button will appear (after starting emacs), it also works.

Update 3 It has been fixed

3
  • +1 for the clear description. FWIW, I cannot reproduce it on GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2020-06-15, but I also cannot reproduce it on GNU Emacs 26.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.13) of 2019-12-10.
    – NickD
    Commented Dec 4, 2020 at 16:25
  • I also tested it on Emacs 28 (Emacs+ on mac) and the bug doesn't show. Commented Dec 4, 2020 at 18:34
  • 1
    It's happening to me too on big sur. It's intermittent.
    – Michael
    Commented Dec 7, 2020 at 3:28

1 Answer 1

0

Looks like a platform-specific bug to me. I don't see it on MS Windows (Emacs 26.3). I see exactly the same behavior for the first and second CLICKs - just as you are expecting.

Consider reporting this as a bug: M-x report-emacs-bug.

3
  • I'll wait a few more days just to see if it's only me or if this is a real (weird) bug. Commented Dec 4, 2020 at 18:35
  • You can likely find out if it's only you (and not others with the same platform) by filing a bug. People reading the bug list will check it out. But nothing wrong with waiting, of course.
    – Drew
    Commented Dec 5, 2020 at 0:03
  • I filed a bug (that goes directly to mitaharu+bug apparently). Commented Dec 7, 2020 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.