From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32874: Unwanted scrolling in edebug `f' command when follow-mode is active Date: Sat, 29 Sep 2018 17:35:43 +0300 Message-ID: <83lg7k5q2o.fsf@gnu.org> References: <20180929140957.GB5008@ACM> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1538231711 27295 195.159.176.226 (29 Sep 2018 14:35:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 14:35:11 +0000 (UTC) Cc: 32874@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 29 16:35:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6GKo-0006yH-Vm for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 16:35:07 +0200 Original-Received: from localhost ([::1]:51191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6GMv-0001WM-3Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 10:37:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6GMj-0001W8-I5 for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 10:37:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6GMg-0002wL-Dd for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 10:37:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6GMg-0002wD-94 for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 10:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6GMg-0000Ff-4K for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 10:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Sep 2018 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32874-submit@debbugs.gnu.org id=B32874.1538231766888 (code B ref 32874); Sat, 29 Sep 2018 14:37:02 +0000 Original-Received: (at 32874) by debbugs.gnu.org; 29 Sep 2018 14:36:06 +0000 Original-Received: from localhost ([127.0.0.1]:59027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6GLm-0000EF-7b for submit@debbugs.gnu.org; Sat, 29 Sep 2018 10:36:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6GLk-0000Dm-5E for 32874@debbugs.gnu.org; Sat, 29 Sep 2018 10:36:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6GLb-0002MV-Ha for 32874@debbugs.gnu.org; Sat, 29 Sep 2018 10:35:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6GLb-0002MR-E5; Sat, 29 Sep 2018 10:35:55 -0400 Original-Received: from [176.228.60.248] (port=1763 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g6GLb-0005zj-44; Sat, 29 Sep 2018 10:35:55 -0400 In-reply-to: <20180929140957.GB5008@ACM> (message from Alan Mackenzie on Sat, 29 Sep 2018 14:09:57 +0000) 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" Xref: news.gmane.org gmane.emacs.bugs:150760 Archived-At: > Date: Sat, 29 Sep 2018 14:09:57 +0000 > From: Alan Mackenzie > > The immediate cause of this is at edebug--recursive-edit L+86, where > there is a call to (sit-for 0). If this call is commented out, and the > bug scenario repeated, there is no spurious scrolling. That call is > there for a reason, however, so this isn't a fix for the bug. What is the reason for calling sit-for? Can the call to sit-for be replaced with something else when follow-mode is in effect and we aren't in the last window of the follow group? > The use of post-command-hook for follow mode is clearly suboptimal. > Follow mode is essentially a part of redisplay, so it ought to get called > from a redisplay hook. The trouble is, `redisplay-hook' doesn't exist. Actually, redisplay-hook is not well defined, because different potential customers of such a hook would like that hook to be called from different parts of the redisplay cycle and under different conditions. Thus we have pre-redisplay-function instead, and a few other specialized hooks the display engine calls, like window-scroll-functions. > The best available hooks which might serve seem to be > pre-redisplay-function or pre-redisplay-functions. Unfortunately, these > are called too late, after redisplay has already determined which windows > to operate on. That's not true: pre-redisplay-function is called _before_ the display engine determines what window(s) might need to be redrawn.