Subject: Re: bug#65896: 30.0.50; folding text with text properties prevents background from extending past the newline

From: StrawberryTea <[email-masked]>
Date: Sun, 24 Sep 2023 13:30:33 -0500

Exactly. It turns out my code breaks when there are nested headings so an Elisp
solution would have to be more complicated. Currently, if the extension property
is on a non-newline character, it does nothing. So a first approach would be
face_at_buffer_position look back one character if the current character does
not have the extend property.

But I’m thinking that we should be able to fontify the ellipsis without extend
and the heading with the extend property should override the background of the
other faces on the same line (even the ellipsis).

Eli Zaretskii <[email-masked]> writes:

>> From: Ihor Radchenko <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>, [email-masked],
>>  [email-masked]
>> Date: Sun, 24 Sep 2023 10:19:11 +0000
>>
>> StrawberryTea <[email-masked]> writes:
>>
>> >       (overlay-put o ’evaporate t)
>> >       (overlay-put o ’cae-org-fold-heading t)
>> >       (overlay-put o ’face
>> >                    (save-excursion (goto-char from)
>> >                                    (face-at-point)))
>> >       (overlay-put o ’display “\n”))))
>>
>> This has a potential to break a number of things, because the text under
>> the fold will no longer be considered invisible.
>>
>> Also, ellipsis will not be obeyed.
>
> But the idea to use a display string which is “\n” could still be
> useful, to help with the problem you pointed out in response to my
> previous suggestion, no?