From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#32874: Unwanted scrolling in edebug `f' command when follow-mode is active Date: Sat, 29 Sep 2018 15:37:29 +0000 Message-ID: <20180929153729.GD5008@ACM> References: <20180929140957.GB5008@ACM> <83lg7k5q2o.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1538235731 21924 195.159.176.226 (29 Sep 2018 15:42:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 15:42:11 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32874@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 29 17:42: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 1g6HNe-0005at-I4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 17:42:06 +0200 Original-Received: from localhost ([::1]:51347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6HPk-0007sD-LI for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 11:44:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6HPb-0007kL-Mh for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 11:44:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6HPW-00017Q-EM for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 11:44:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6HPW-000178-A8 for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6HPW-0001zy-6c for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Sep 2018 15:44: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.15382357867597 (code B ref 32874); Sat, 29 Sep 2018 15:44:02 +0000 Original-Received: (at 32874) by debbugs.gnu.org; 29 Sep 2018 15:43:06 +0000 Original-Received: from localhost ([127.0.0.1]:59072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6HOb-0001yT-Tp for submit@debbugs.gnu.org; Sat, 29 Sep 2018 11:43:06 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:45410 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1g6HOZ-0001yI-Pu for 32874@debbugs.gnu.org; Sat, 29 Sep 2018 11:43:04 -0400 Original-Received: (qmail 6656 invoked by uid 3782); 29 Sep 2018 15:43:02 -0000 Original-Received: from acm.muc.de (p5B146BF5.dip0.t-ipconnect.de [91.20.107.245]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 29 Sep 2018 17:43:01 +0200 Original-Received: (qmail 21945 invoked by uid 1000); 29 Sep 2018 15:37:29 -0000 Content-Disposition: inline In-Reply-To: <83lg7k5q2o.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:150765 Archived-At: Hello, Eli. On Sat, Sep 29, 2018 at 17:35:43 +0300, Eli Zaretskii wrote: > > 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? sit-for is called right after (edebug-overlay-arrow), I think, to ensure that the newly placed arrow is actually drawn on the screen. I can't think of any replacement for this sit-for at the moment. > > 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. OK, that sounds like a good reason for not having such a hook. :-( > > 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. Thanks! I'll have a look at pre-redisplay-function, and see if I can do anything with it. -- Alan Mackenzie (Nuremberg, Germany).