all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pitclaudel@live.com>
Cc: 22320@debbugs.gnu.org
Subject: bug#22320: Overlays with an 'invisible property break stacking of overlay faces
Date: Fri, 08 Jan 2016 12:28:05 +0200	[thread overview]
Message-ID: <83r3hspdqi.fsf@gnu.org> (raw)
In-Reply-To: <568F0272.9040105@live.com> (message from Clément Pit--Claudel on Thu, 7 Jan 2016 19:27:30 -0500)

> Cc: 22320@debbugs.gnu.org
> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
> Date: Thu, 7 Jan 2016 19:27:30 -0500
> 
> 1. The overlay does not intersect with the invisible area. No problems here.
> 2. The overlay covers a few characters before the invisible area and the first few characters of the invisible area, but not the last ones.

In this case, Emacs doesn't care where the overlay ends, that buffer
position is skipped without checking overlays.

> 3. The overlay covers a few characters after the invisible area and the last few characters of the invisible area, but not the first ones.

Likewise.

> 4. The overlay is a subset of the invisible area.

If it starts on the first invisible character, Emacs will take note;
otherwise it won't.

> 5. The overlay is a superset of the invisible area.

This is the case with all your use cases.

> The current solution doesn't think in these terms; instead, it ignores all overlays for the ellipses, unless the first hidden character has the same face as the preceding one.
> 
> Always applying the face of the first character to the ellipsis means applying to the ellipsis the faces of overlays in categories 2, 5, and 4 if they cover the first character. You pointed out that the special case of 4 is confusing.
> 
> Another option (the one I was trying to explain above) is to apply to the ellipsis only the faces of overlays in category 5. I feel that this should be rather uncontroversial (don't you think?).

Well, now that I've committed what I believe is a better solution, I
think we can put these issues to rest.

> IIUC, the current implementation computes faces without taking invisibility into account for the first character before and after the left boundary of the invisible section, and then compares them. At this point it's too late to merge certain faces but not others.

Yes.  More accurately, the display engine always considers faces
before it considers invisibility, so it always sees the face of the
first invisible character.





      reply	other threads:[~2016-01-08 10:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 18:04 bug#22320: Overlays with an 'invisible property break stacking of overlay faces Clément Pit--Claudel
2016-01-07 15:54 ` Eli Zaretskii
2016-01-07 17:03   ` Clément Pit--Claudel
2016-01-07 17:36     ` Clément Pit--Claudel
2016-01-07 18:52       ` Eli Zaretskii
2016-01-07 19:07         ` Clément Pit--Claudel
2016-01-07 20:12           ` Eli Zaretskii
2016-01-07 21:02             ` Eli Zaretskii
2016-01-07 18:46     ` Eli Zaretskii
2016-01-07 19:28       ` Clément Pit--Claudel
2016-01-07 20:35         ` Eli Zaretskii
2016-01-08  0:27           ` Clément Pit--Claudel
2016-01-08 10:28             ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r3hspdqi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22320@debbugs.gnu.org \
    --cc=clement.pitclaudel@live.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.