all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 31067@debbugs.gnu.org
Subject: bug#31067: 27.0.50; After-string hidden by subsequent invisible text
Date: Fri, 06 Apr 2018 11:24:53 +0300	[thread overview]
Message-ID: <83k1tk214a.fsf@gnu.org> (raw)
In-Reply-To: <jwv4lkpjxf2.fsf-monnier+emacsbugs@gnu.org> (message from Stefan Monnier on Thu, 05 Apr 2018 15:15:29 -0400)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: 31067@debbugs.gnu.org
> Date: Thu, 05 Apr 2018 15:15:29 -0400
> 
> >> Hmmm.... not that I can see: the overlay covers "text" and none of it
> >> is hidden.
> > The overlay's end point is _after_ "text", and that's exactly where
> > the invisible text starts.  And after-string _follows_ the end of
> > "text", so it starts where the invisible text starts.
> 
> Yes, but that doesn't mean that the second overlay *covers* the end of
> the first.  Whether/when we consider it to cover is something we get
> to decide.

You are talking about "covering" here, and I think this discloses the
mental bias in understanding how before- and after-strings work.
Unlike most other overlay properties, they do not supply any
attributes to the characters "covered" by the overlay.  Instead, they
have effect only at two places: the beginning and the end points of
the overlay.  Consequently, we check for them only when we are about
to display something at these two positions.  And in this case, the
end point is invisible, so we never check any after-strings there.

And yes, this is due to the order of checking for various display
features: invisibility is tested before the overlay strings.  But
there's a good reason for that order, and "fixing" this dubious use
case, should we decide doing that, will probably be messy due to the
need to avoid displaying the same overlay string twice.  So I suggest
that we instead accept this as deliberate and correct behavior.

> Currently, it seems that the ordering chosen in this specific example is
> something like
> 
>    A) character "t", end-of-ol1, start-of-ol2, after-string, character "\n"
> or
>    B) character "t", start-of-ol2, end-of-ol1, after-string, character "\n"
> or
>    C) character "t", start-of-ol2, after-string, end-of-ol1, character "\n"
> 
> I.e. start-of-ol2 is taken to occur before the after-string, which is
> why the after-string is made invisible.

We don't test for start-of-ol2, we test whether text at that position
is invisible, for whatever reason (it could be a text property or an
overlay property).

> I'd be perfectly happy with a rule "if the last char covered by the
> overlay is visible, then the after-string is also visible" (which is
> what I meant by "attached to the end").

I tried to explain above why thinking about "covered by" is wrong when
overlay strings are involved.





  reply	other threads:[~2018-04-06  8:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  2:28 bug#31067: 27.0.50; After-string hidden by subsequent invisible text Stefan Monnier
2018-04-05  9:49 ` Eli Zaretskii
2018-04-05 12:23   ` Stefan Monnier
2018-04-05 13:38     ` Eli Zaretskii
2018-04-05 15:55       ` Stefan Monnier
2018-04-05 18:00         ` Eli Zaretskii
2018-04-05 19:15           ` Stefan Monnier
2018-04-06  8:24             ` Eli Zaretskii [this message]
2018-04-06 12:28               ` Stefan Monnier
2018-04-06 13:11                 ` Eli Zaretskii
     [not found]             ` <<83k1tk214a.fsf@gnu.org>
2018-04-06 15:39               ` Drew Adams
2018-04-06 17:10                 ` Eli Zaretskii
     [not found] <<jwvmuyi9yj8.fsf@iro.umontreal.ca>

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=83k1tk214a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31067@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.