GNU bug report logs - #14582
24.3.50.1; Strange overlay behavior, when window-start is inside an overlay.

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sun, 9 Jun 2013 09:14:02 UTC

Severity: normal

Found in version 24.3.50.1

Full log


Message #37 received at 14582 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: larsi <at> gnus.org, esabof <at> gmail.com, 14582 <at> debbugs.gnu.org
Subject: Re: bug#14582: 24.3.50.1; Strange overlay behavior, when
 window-start is inside an overlay.
Date: Mon, 31 Jan 2022 16:57:24 +0200
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: E Sabof <esabof <at> gmail.com>,  Eli Zaretskii <eliz <at> gnu.org>,
>   14582 <at> debbugs.gnu.org
> Date: Mon, 31 Jan 2022 01:36:41 +0100
> 
> The effect is that the first visual line in the folded buffer looks like
> 
> ...
> 
> i.e. consists of just three eliding dots, but when I scroll up, I see
> that the dots belong to e.g.
> 
> (progn...)
> 
> I see that all the time when working with hideshow, and it's quite
> annoying.

After considering this for a while, I don't think it would be a good
idea to try to fix this on the level of the display engine.  The
reason is that there are gobs of Lisp programs out there playing all
kinds of tricks with overlays and invisible text and expecting Emacs
to heed those tricks, and so any change like the one suggested,
i.e. let the display engine disobey the window-start setting in this
situation, is definitely going to break some package, and probably a
lot of them.

Basically, we are being asked to introduce application-level logic
into the general-purpose parts of the display code: the application
sets the window-start at some place which happens to be a bad idea,
and wants the display engine to save the application from itself.  I
don't think it's TRT.  The application alone knows what would be a
good place for setting the window-start, and should avoid setting it
where the result will be sub-optimal.

If this issue causes trouble in hideshow or elsewhere, my suggestion
is to fix it in those packages instead.  It shouldn't be hard to know
whether a given buffer position is or isn't invisible, and move point
from there if so.




This bug report was last modified 3 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.