Subject: Re: bug#15899: 24.3.50; regression: `region' overlay is lower priority than default

From: Stefan Monnier <[email-masked]>
Date: Sun, 17 Nov 2013 10:42:24 -0500

> Can you provide an example of an actual case where two overlays should be
> ordered one way in one context and another in a different context? Nothing
> comes to mind at the moment.

No, I admit to not having a concrete case to give you offhand (I do
remember that we have bumped into such problems in the past, tho).

The issue boils down to the fact that we generally don't want an overlay
to hide another.  But priorities are not a good way to solve this
problem, since the "hiding" depends on the relative position: if an
overlay A is nested within another overlay B, then A should be "on top"
in order not to be hidden, and if later the relative position of
A changes such that B is now nested into A, then B should now be "on top".

Sometimes we really do want one overlay to "be on top", including hiding
another, and in that case priorities can work OK.

> I don't think numeric priorities are as big a social problem as you suspect:

Indeed, there's also the general problems of priorities, e.g. where
A wants to be on top of B, C wants to be on top of A and B wants to be
on top of C.  And I agree that in practice these issues aren't all that
bad.  But overlays have their own additional issues, specific to
their nature.

        Stefan