GNU bug report logs - #22404
25.1.50; Forcing `window-scroll-functions` to run.

Previous Next

Package: emacs;

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

Date: Tue, 19 Jan 2016 05:50:01 UTC

Severity: wishlist

Found in version 25.1.50

Full log


View this message in rfc822 format

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 22404 <at> debbugs.gnu.org
Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.
Date: Mon, 01 Feb 2016 05:18:02 -0800
The four (4) values that I am most interested in are:

  1.  window-start

  2.  window-end

  3.  Point at the beginning of the line containing window-start.

  4.  Point at the end of the line containing window-end.

Although my proposed usage of the `post-redisplay-hook` will not be to alter buffer (i.e., I'm just adding overlays), other people who may use this new hook in the future may be modifying the buffer content -- e.g., adding/removing fonts, adding/removing text, moving the cursor, etc.  The `window-scroll-functions` hook is strategically placed at three locations of `xdisp.c`, and some of those areas are revisited when things have changed since the first pass -- e.g., continuation line at the beginning of the window, or cursor is partially visible at the bottom of the window.

If the `post-redisplay-hook` runs too late in time to receive any checks regarding cursor position and so forth, some users may be surprised when their cursor ends up below the visible screen at the conclusion of redisplay -- e.g., because they added text or increased a font size that pushed the cursor further down below.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Mon, 01 Feb 2016 21:54:42 +0200,
Eli Zaretskii wrote:
> 
> * * *
> 
> I'd prefer to have a post-redisplay-hook, which is called either at
> the end of redisplay cycle, or after redisplay_internal returns to its
> caller.  Would that solve your problem, and if so, what information do
> you need to be passed to such a hook?




This bug report was last modified 9 years and 96 days ago.

Previous Next


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