Subject: Re: bug#66041: 30.0.50; Should 'flymake-note-echo' inherit from 'compilation-info'?

From: João Távora <[email-masked]>
Date: Mon, 25 Sep 2023 09:59:22 +0100

On Sun, Sep 24, 2023 at 9:18 AM João Távora <[email-masked]> wrote:

> Yes, I thought I had seen it sort itself out, but it didn't, I just
> confirmed.
>
> Shouldn't be very hard, I'll look at this later this evening.

As usual, this turned out not to be true.  It seems that even if
though the overlay dedicated to the  "warning" diagnostic has
higher priority than the overlay dedicated to the "note/info"
diagnostic the latter's 'before-string' property, which
is:

  #("!" 0 1 (display (left-fringe exclamation-mark compilation-info)))

still trumps the former's, which is:

  #("!" 0 1 (display (left-fringe exclamation-mark compilation-warning)))

The priorities being used here are of the (PRIMARY . SECONDARY) form.
Maybe that has something to do with it, but I tried just "normal"
fixnum priorities and that didn't fix it.

Pinging Eli again.  Eli, here's the recipe again:

  emacs -Q -f flymake-mode
  M-x erase-buffer RET y
  h e l l o SPC

On the left fringe, we expect to see an orange exclamation mark
(compilation-warning face). Instead, we see a green one
(compilation-info face).

Using M-x describe-text-properties, one can see two overlays, one
from 1 to 6, another from 6 to 7, with priorities (nil . 42) and
(nil . 41), respectively.

The 'before-string' chosen for display on the fringe seems to have
more to do with the overlay that appears later in the line, rather
than with priorities.

Another thing worth mentioning is that this bug seems to happen in
both pre- and post- noverlay code by Stefan Monnier, since I can reproduce
back to Emacs 28.

Also worth noting that this is a bug of relatively minor importance
IMO.

João