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#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window Date: Mon, 06 Jan 2014 05:45:25 +0200 Message-ID: <83bnzpu622.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1388979978 4002 80.91.229.3 (6 Jan 2014 03:46:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jan 2014 03:46:18 +0000 (UTC) Cc: 16129@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 06 04:46:24 2014 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 1W018w-0004ki-3D for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2014 04:46:22 +0100 Original-Received: from localhost ([::1]:60478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W018v-0004xw-DS for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Jan 2014 22:46:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W018j-0004nv-Kw for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 22:46:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W018d-0001o0-G5 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 22:46:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W018d-0001nw-Cg for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 22:46:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W018c-0004RK-MI for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 22:46: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: Mon, 06 Jan 2014 03:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16129-submit@debbugs.gnu.org id=B16129.138897994417037 (code B ref 16129); Mon, 06 Jan 2014 03:46:02 +0000 Original-Received: (at 16129) by debbugs.gnu.org; 6 Jan 2014 03:45:44 +0000 Original-Received: from localhost ([127.0.0.1]:37524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W018K-0004Qg-3I for submit@debbugs.gnu.org; Sun, 05 Jan 2014 22:45:44 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:61880) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W018G-0004QS-6V for 16129@debbugs.gnu.org; Sun, 05 Jan 2014 22:45:41 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MYY00B00NKB3P00@a-mtaout22.012.net.il> for 16129@debbugs.gnu.org; Mon, 06 Jan 2014 05:45:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MYY00BXMNS23T00@a-mtaout22.012.net.il>; Mon, 06 Jan 2014 05:45:38 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:83043 Archived-At: > Date: Mon, 6 Jan 2014 00:13:38 +0100 > From: Anders Lindgren > Cc: 16129@debbugs.gnu.org > > When "redisplay_window" is called, it goes into the case where > "try_cursor_movement" is called. > > Inside this routine, the row is picked up. The row (when using the TUTORIAL > example) has start and end at 46229. The point and last_point, however, are > 46228, so it assumes that the point haven't moved since the last redisplay. > > Clearly, "last_point" and "row" are not consistent with each other, which > is assumed by try_cursor_movement (if I read it correctly). > > The routine first declare this to be a "success" (in the neither forward > nor backward case). Later in the function it comes to the following > statement: > > if (PT < MATRIX_ROW_START_CHARPOS (row) > || PT > MATRIX_ROW_END_CHARPOS (row)) > > This fails, making the function return " CURSOR_MOVEMENT_MUST_SCROLL", > which is turn cause "redisplay_window" to recenter the window. Thanks. Your description is correct, and I already found that this is what happens. (The silence doesn't necessarily mean no one is doing anything about the bug report ;-) I didn't yet have the time to figure out why the last_point field of the window is equal to point, while last_cursor_vpos points to the screen line that does not contain point; my current suspicion is that the post-command-hook somehow causes that. But given that this is what happens, you will always see a recenter, because it means Emacs lost track of where point is in the window. When Emacs is confused about this, it always recenters as the last resort. This still doesn't say why redisplay is so slow in this case, which was the initial bug reported here. Stay tuned.