all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20254: 25.0.50; `face' overlays with equal priority at the same location
@ 2015-04-03 21:44 Drew Adams
  2015-04-03 22:14 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2015-04-03 21:44 UTC (permalink / raw)
  To: 20254

I add a new overlay with a given `face' value to some text in a buffer.
I add another overlay with a different `face' to the same text.

The two overlays have the same `priority' value.  The appearance
presumably follows what rule?  There is this description in (elisp)
`Overlay Properties', but it covers only the case where different
priorities are involved:

  For the `face' property, the higher priority overlay's value does not
  completely override the other value; instead, its face attributes
  override the face attributes of the lower priority `face' property.

I do the same thing to the same sequence of chars appearing elsewhere in
the same buffer.  The appearance is sometimes the same and sometimes
different.  One of the two faces "wins", it seems, but perhaps with more
testing I would find that there is indeed some face merging(?).  But
in any case, which one wins seems to be arbitrary (random).

If I have several such overlays, each with a different face, at the same
set of places, different ones seem to "win" here and there, again,
seemingly arbitrarily.

If I check `overlays-at' and `C-u C-x =', the overlays listed at each
place are the same, and in the same order.  (They were added to the
locations in sequence, i.e., overlays with a given face were added to
all locations, then overlays with the next face were added to the same
locations, etc.)

Is there a rule behind this behavior?  Can users control which overlay
among several with the same priority "wins"?  It doesn't seem to be the
first or last created, and I haven't found any other rule behind the
behavior either.

Note that the context is not one where I want to use different
priorities.  I'm just asking about the case where multiple overlays
apply to a given sequence of text, and they have the same priority but
different `face' property values.

Is this a bug?  Or could an enhancement be made, to make the behavior
predictable and controllable?

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-04  3:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-03 21:44 bug#20254: 25.0.50; `face' overlays with equal priority at the same location Drew Adams
2015-04-03 22:14 ` Stefan Monnier
2015-04-03 22:24   ` Drew Adams
2015-04-04  1:07     ` Stefan Monnier
2015-04-04  1:55       ` Drew Adams
2015-04-04  2:48         ` Stefan Monnier
2015-04-04  3:02           ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.