From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run. Date: Tue, 02 Feb 2016 20:43:13 +0200 Message-ID: <83zivjx8am.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454438663 28155 80.91.229.3 (2 Feb 2016 18:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2016 18:44:23 +0000 (UTC) Cc: 22404@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 02 19:44:12 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 1aQfvv-0005UN-Hj for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 19:44:11 +0100 Original-Received: from localhost ([::1]:58966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfvu-0004Cw-Ri for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 13:44:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfvr-0004CO-3N for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:44:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQfvm-0008Oj-Ap for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:44:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfvm-0008Oe-7e for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQfvm-0008Md-16 for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 13:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Feb 2016 18:44:01 +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.145443862732120 (code B ref 22404); Tue, 02 Feb 2016 18:44:01 +0000 Original-Received: (at 22404) by debbugs.gnu.org; 2 Feb 2016 18:43:47 +0000 Original-Received: from localhost ([127.0.0.1]:57052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfvW-0008M0-Vo for submit@debbugs.gnu.org; Tue, 02 Feb 2016 13:43:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52546) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfvU-0008Lk-L6 for 22404@debbugs.gnu.org; Tue, 02 Feb 2016 13:43:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQfvK-0008Lp-Co for 22404@debbugs.gnu.org; Tue, 02 Feb 2016 13:43:39 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfvK-0008Li-91; Tue, 02 Feb 2016 13:43:34 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2281 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aQfvJ-0006Sv-IP; Tue, 02 Feb 2016 13:43:34 -0500 In-reply-to: (message from Keith David Bershatsky on Tue, 02 Feb 2016 10:16:23 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:112286 Archived-At: > Date: Tue, 02 Feb 2016 10:16:23 -0800 > From: Keith David Bershatsky > Cc: 22404@debbugs.gnu.org > > 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 That depends where the hook will be called. If it is called before the changed contents is delivered to the glass, you won't see any such adverse effects, exactly like you don't see them today when window-scroll-functions are called after a large portion of redisplay already happened. > 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. Emacs display engine is highly optimized: if there's nothing to do when it is called the second time, it will detect that very quickly and return without doing anything. Specifically, if only cursor motion happened, redisplay is very fast. And the hook doesn't have to be dumb and call the second redisplay every time. It can be smarter, and only do so if it actually made some changes, like moved an overlay or scrolled the window. In the latter case, the comparison with just moving cursor is no longer valid. So if such problems do exist, they will need to be reported with specific use cases, because in general the current code already deals with this. > 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. I don't understand the "maybe" part. We are talking about values that are easily obtained from any Lisp program, so what are the problems you envision?