From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run. Date: Tue, 02 Feb 2016 10:16:23 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1454437089 32678 80.91.229.3 (2 Feb 2016 18:18:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2016 18:18:09 +0000 (UTC) Cc: 22404@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 02 19:17:54 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aQfWT-0007QR-Am for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 19:17:53 +0100 Original-Received: from localhost ([::1]:58882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfWS-0001dV-Do for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 13:17:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfVh-0000JR-Pu for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQfVe-0001PQ-GH for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:17:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfVe-0001PH-Cr for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQfVe-0007hw-97 for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:17:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Feb 2016 18:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22404-submit@debbugs.gnu.org id=B22404.145443699329566 (code B ref 22404); Tue, 02 Feb 2016 18:17:02 +0000 Original-Received: (at 22404) by debbugs.gnu.org; 2 Feb 2016 18:16:33 +0000 Original-Received: from localhost ([127.0.0.1]:57024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfVB-0007go-L9 for submit@debbugs.gnu.org; Tue, 02 Feb 2016 13:16:33 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:52417) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfVA-0007gd-RU for 22404@debbugs.gnu.org; Tue, 02 Feb 2016 13:16:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=4DBpUjV5kOylbaYAC2ZbHYZhvSDYIqDBWNeGukkAi7c=; b=Da8xuI0/C1ZsauTAi81JeiMp2uX7S0OFTfc55tDGaL4Vl6dIxhk0Yb4TTCM5W7omJ/jsyHHCBUHEI2LN1Y9aqxVRERuX6l1PigXwO6VNUjdVsewNlxZSbZnFOOTcOAA1; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49623 helo=server.private.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1aQfV0-0006d4-L8; Tue, 02 Feb 2016 13:16:22 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112281 Archived-At: A forced redisplay every command loop would pose two (2) major problems as far as I am aware. The first issue will be that an unfinished display will be visible to the user for a split second before it gets finished with whatever code follows the first visible redisplay -- this will be especially visible when moving to an entirely different location of the buffer (e.g., full screen up or full screen down). The second issue will be a significant slow-down in performance that will be mostly visible to the user when using rapid-fire keystrokes, or simply moving the cursor with the arrow keys by holding the arrow key in any of the four directions. A forced redisplay is something that should be used sparingly, but not every command loop. The four (4) values I seek *may* be available via Lisp depending upon where the `post-redisplay-hook` is placed. I'd be happy to run some tests once you have decided upon a proposed location for the hook. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Tue, 02 Feb 2016 18:34:58 +0200, Eli Zaretskii wrote: > > > Date: Mon, 01 Feb 2016 05:18:02 -0800 > > From: Keith David Bershatsky > > Cc: 22404@debbugs.gnu.org > > > > 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. > > These are available from Lisp, so there seems to be no need to pass > them as arguments to the hook, right? > > > 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. > > If those users need this new hook, they can always invoke redisplay > explicitly at the end of their code, right? > > > 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. > > But the fact they run in the middle of the redisplay cycle is exactly > the source of the problems we are trying to solve! > > > 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. > > Calling redisplay explicitly should resolve all those issues.