GNU bug report logs - #17678
24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 3 Jun 2014 17:50:01 UTC

Severity: wishlist

Found in version 24.4.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: esq <at> lawlist.com, 17678 <at> debbugs.gnu.org
Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before	visual redisplay
Date: Wed, 11 Jun 2014 21:45:31 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Wed, 11 Jun 2014 14:00:39 -0400
> Cc: 17678 <at> debbugs.gnu.org
> 
> > I believe that the solution may be to have a `sneak-preview-redisplay`
> > whereby the *new* `window-start` and *new* `window-end` could be
> > correctly calculated without the visual buffer actually
> > being redisplayed.
> 
> Of course, there's a circularity problem, here: if you need window-start
> (you can already compute window-end without an actual redisplay) in
> order to then install things like text-properties properties and
> overlays that affect the display, then those added properties may end up
> requiring changing window-start again (because they end up pushing point
> outside of the window and require a scroll).

Indeed.  But if there's a hook that is forbidden from making such
changes to buffer text, then this is doable.  Otherwise, it's a waste
of time having such a hook, since it will be unreliable.

> IIUC your particular use case (drawing crosshairs to show where the
> cursor is located) is one where what you really need is to know when
> window-start changes (just like follow-mode).
> 
> So, a good feature might be one that runs a hook when redisplay decides
> that window-start needs to be reset (i.e. that point moved out of the
> window and we need to scroll).

The display engine changes window-start for several reasons, only one
of them being that point moved off screen.

I think follow-mode also needs to know when the window-end changes
(which could happen with no changes in window-start).  This is
normally known only at the end of window redisplay, IIRC.




This bug report was last modified 11 years and 44 days ago.

Previous Next


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