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 16:11:03 +0300	[thread overview]
Message-ID: <83fu481nvc.fsf@gnu.org> (raw)
In-Reply-To: <jwvr2nsfsfq.fsf-monnier+emacsbugs@gnu.org> (message from Stefan Monnier on Fri, 06 Apr 2018 08:28:38 -0400)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: 31067@debbugs.gnu.org
> Date: Fri, 06 Apr 2018 08:28:38 -0400
> 
> > 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.
> 
> Note that I was not talking about "after-string covering something" but
> about "the invisibility overlay covering the after-string".  For the
> `invisible` property, "covering" is very much meaningful, AFAIK.

Indeed.  The problem here is that the invisibility overlay covers the
position where displaying the after-string should be considered.

> Here's my use-case:
> I have an org-like mode where I add a kind of "summary" of the content
> of each section as an after-string on the header (think of it as the
> number of sub-sections or the number of words).  This works great as
> long as that section is not folded, but as soon as I fold it, the
> summary disappears (along with the body, but that part is clearly
> intended).  This summary is handy when the section is unfolded but it
> would be even more useful when the section is folded.
> 
> I wouldn't want to insert those as actual buffer text because they
> shouldn't be saved, so it would be a hassle to tweak the save and
> auto-save machinery to remove those.
> 
> So I'd prefer to keep this as an "unfixed bug".

Fine with me (I still hope that leaving such issues will some day
attract volunteers who'd like to do their share of hacking the display
code).

Alternatively, you could, either:

 . separate the invisible text and the after-string with some
   character, or
 . use the 'invisible' text property instead of an overlay

> > I tried to explain above why thinking about "covered by" is wrong when
> > overlay strings are involved.
> 
> I'm not talking about the string covering something, I'm talking about
> the string's overlay.  IIUC what you're saying is that the connection
> between the two is difficult to recover, in the current code.

No, I'm saying that the only connection is the 2 end-points of the
overlay.  The fact that some text is or isn't in-between is
irrelevant.  Talking about "covered text" in this case is detrimental
to understanding how the feature works, because it tends to force us
to think about after-string as being in some sense "related" to the
"covered" text.  It isn't.





  reply	other threads:[~2018-04-06 13:11 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
2018-04-06 12:28               ` Stefan Monnier
2018-04-06 13:11                 ` Eli Zaretskii [this message]
     [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=83fu481nvc.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.