Subject: Re: bug#64101: 29.0.91; Eglot inlay hints rendered out of order

From: Stefan Monnier <[email-masked]>
Date: Sat, 17 Jun 2023 20:45:18 -0400

>> The `priority` property is a source of problem in itself
> How so?  What problem are you talking about.

Most overlays don't have a `priority` property, so any overlay with
a `priority` property set to a number greater than 0 will have priority
over basically everything else, which is rarely what you want.

Often, the resulting problems take a while to appear and when they do,
it's in relation with some other package elsewhere, so that package's
authors end up working around the problem by adding another `priority`
property on their overlays, thus spreading the problem further.

>> so I'd recommend to use its weaker version where the value is a cons
>> cell `(nil . SECONDARY)`.  This way the SECONDARY priority will only
>> be used as a last recourse (before using pointer addresses).
>
> This would make some sense, but I'm not sure I'm doing it correctly.  If
> I replace the above line with
>
>    (overlay-put ov 'priority `(nil . i))

Did you forget the comma?

    (overlay-put ov 'priority `(nil . ,i))

-- Stefan