Subject: bug#14582: 24.3.50.1; Strange overlay behavior, when window-start is inside an overlay.

From: Michael Heerdegen <[email-masked]>
Date: Wed, 02 Feb 2022 05:02:41 +0100

Eli Zaretskii <[email-masked]> writes:

> How can we know?  There's any number of Lisp programs out there using
> invisible properties.  Starting with Org.

In Org I actually see the same bug (I tried org-shifttab).  Isearch also
has the issue when re-hiding opened invisible text areas.  Could be that
in most usage scenarios the current behavior is not wanted.

> > Why can't the credo just be "always ensure complete visual lines are
> > displayed"?
>
> Because a Lisp program may wish otherwise.

I do know and only know Lisp programs that wish like this.  It feels
wrong that Elisp programs should have to adjust window-start.  Anyway,
no surprise that I see it like that.

Is there a third alternative, a hook or something that could be used, to
perform this task automatically?  I mean, else, every program that
toggles invisibility of text would have to loop over all windows that
display a certain buffer, examine text properties and check whether
window-start has to be adjusted.  I would not even be sure what to do in
situations when the first line is only partially visible and such stuff.

Michael.