Subject: bug#59141: 28.1.90; Face :extend when all the line but trailing \n is invisible

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Nov 2022 22:09:21 +0200

> From: Abdul-Lateef Haji-Ali <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked],
>  [email-masked]
> Date: Fri, 11 Nov 2022 19:47:45 +0000
> 
> 
> On 11/11/2022, Eli Zaretskii wrote:
> > I don't think I understand the question.  What do you mean by "overlay
> > rendering"?  An overlay can produce text only if it has a
> > before-string or after-string property, so what do you mean by
> > "arbitrary text"?
> 
> I might be using the wrong terms here, but I think the idea is straightforward.
> According to `buffer-invisibility-spec` docs
> 
> ,----
> | If the (ATOM . ELLIPSIS) form is used, and ELLIPSIS is non-nil, an
> | ellipsis will be displayed after the invisible characters.
> `----
> 
> so I am wondering if a new form like `(ATOM . STRING)` can be supported so that STRING can be displayed after the invisible characters instead of ellipses.

This is what the 'display' property already does, so I don't see why
we'd need yet another way of replacing some buffer text with a
different text on display.

> The suggested solution is have an outline entry include the new line character (so that the whole extended lines is hidden). The displayed text after the invisible text would then be "...\n".

AFAIU, your proposal will make this:

,----
| * A
| TextA
| * B
| TextB
`----

be displayed like this after hiding the bodies:

,----
| * A* B
`----

because the newline will be hidden

AFAIU, this is not what Org wants to display when the bodies of the
headings are hidden.