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

From: Al Haji-Ali <[email-masked]>
Date: Fri, 11 Nov 2022 12:30:13 +0000

I've tried Juri's solution of adding an overlay 'display property with "...\n" and at least the final result is what I would expect (the entry is fully hidden including the extended background). One difference in behaviour is that point cannot be after "..." on the same line (only before) but I am not sure that's a serious drawback. Adding the 'display property could be done conditionally if looking-at "\n" (or if the line's face has an :extend property).

Note that when the 'display is "\n" only, the ellipses are not shown. Nevertheless, both behaviours go against the documentation of `invisible-p` where it says that if t, "the text would be replaced by an ellipsis", so I am not sure if showing the 'display text is unintended.

One solution could be a modification to overlay rendering where an invisibility-spec that has (atom . t) could be replaced by ellipses but (atom . "text") would be replaced by "text" and then "text" could be "...\n" in the situation under consideration. I seem to recall that org-fold had this behaviour, but I am not sure.

-- Al