From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Date: Sat, 27 Sep 2014 15:36:49 +0200 Message-ID: <5426BD71.4000705@gmx.at> References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> <542668BA.6010800@gmx.at> <838ul5tpfu.fsf@gnu.org> <54268B0B.1020203@gmx.at> <8361g9tijj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030207020109010702010404" X-Trace: ger.gmane.org 1411825117 20432 80.91.229.3 (27 Sep 2014 13:38:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2014 13:38:37 +0000 (UTC) Cc: lompik@voila.fr, 18545@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 27 15:38:30 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 1XXsCh-00020v-Fz for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Sep 2014 15:38:27 +0200 Original-Received: from localhost ([::1]:55868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXsCh-0005df-4c for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Sep 2014 09:38:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXsCW-0005da-L9 for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 09:38:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXsCP-0004tm-2v for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 09:38:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXsCO-0004rg-Vr for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 09:38:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XXsCJ-0007y1-11 for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 09:38:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Sep 2014 13:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18545 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18545-submit@debbugs.gnu.org id=B18545.141182503230565 (code B ref 18545); Sat, 27 Sep 2014 13:38:02 +0000 Original-Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 13:37:12 +0000 Original-Received: from localhost ([127.0.0.1]:53539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXsBR-0007ws-Iw for submit@debbugs.gnu.org; Sat, 27 Sep 2014 09:37:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:60403) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXsBJ-0007wY-Uf for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 09:37:03 -0400 Original-Received: from [93.82.76.138] ([93.82.76.138]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LaWlT-1Xyuep1kb9-00mIAb; Sat, 27 Sep 2014 15:37:00 +0200 In-Reply-To: <8361g9tijj.fsf@gnu.org> X-Provags-ID: V03:K0:bTbVNTNXexCd3jAs++Wi2zITqd5lzBvAPl0pPQzZbbnpr268nnV nYBXzNTkkqnxQfvN+JEq53J/O12/o+jW608gQKMfjY51mNkSUnC5m0X7c57g7NA71jsKhOE YlPnuOhcp7UWLhNYxEThCnx9ZycSV9FB+PgaxZdp18Oy+cQN0mUzsmHEcQgrqb2wuSxMdmI bVkYTwJx41yW8BVqGt7bA== X-UI-Out-Filterresults: notjunk:1; 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:93792 Archived-At: This is a multi-part message in MIME format. --------------030207020109010702010404 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > AFAIU, this means the window is not being redrawn on each > forward-line; not even its mode line is updated. You should be able > to confirm this if you turn on trace-redisplay (assuming you've built > with GLYPH_DEBUG, a.k.a. "--enable-checking=glyphs") -- you will not > see the window announced in the trace. (Btw, turning off > blink-cursor-mode removes a lot of clutter from the redisplay trace, > so I suggest to do that in these experiments.) I attach an output, can't make much head or tail of it. The *sidebar* window is the one with the problem, the .emacs window the one on the right of it. > If you add to the function that calls forward-line a message showing > point, do you see the value of point move on each forward-line even > though the window is not redrawn? Simply copied from the *Messages* buffer the positions appear as: 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97 102 107 112 117 122 [28 times] 127 132 [21 times] 137 [23 times] 142 [23 times] 147 [7 times] Auto-saving... 147 [3 times] 152 157 [22 times] 162 [23 times] 167 [23 times] 172 [9 times] Each line contains four characters and apparently stuttering begins at position 122. >> > if (!cursor_row_fully_visible_p (w, 0, 0)) >> > { >> > w->cursor.vpos = -1; >> > clear_glyph_matrix (w->desired_matrix); >> > goto try_to_scroll; >> > } >> > >> > after the call to set_cursor_from_row on line 16322. >> > >> > If this doesn't work, please see why. >> >> It fails to do anything because running cursor_row_fully_visible_p >> returns at >> >> if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) >> return 1; >> >> and this one apparently fails to detect that the row is partially visible >> because of >> >> (gdb) p row->height >> $5 = 16 >> (gdb) p row->visible_height >> $6 = 16 >> >> Any ideas? > > What is last_visible_y in that window? To see that, step into > try_window called on line 16235, wait until it calls start_display, > and look at it.last_visible_y. At the xdisp.c line reading: while (it.current_y < it.last_visible_y) I have (gdb) p it.last_visible_y $7 = 442 and (just to confirm the earlier posted) at the xdisp.c line reading if (new_vpos >= w->cursor.y) I have: (gdb) p new_vpos $10 = 426 (gdb) p w->cursor.y $11 = 432 >> BTW is there a way to print the value returned by a macro in gdb? > > Yes, just print it: > > (gdb) p MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) Here I get (gdb) p MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) No symbol "__FILE__" in current context. > If this doesn't work, perhaps you didn't build with -g3, I used CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' > or your > compiler is buggy. Hmm... martin As an aside, in my function calling `forward-line' I found this ;; (unless (pos-visible-in-window-p (point) (selected-window)) ;; (recenter (- (window-height) 2)))) ; what for did I use that ? commented out at least since 2008-06-24. Apparently something here did behave differently many years ago. BTW, the bug does not disappear when I comment in those lines. --------------030207020109010702010404 Content-Type: text/plain; charset=windows-1252; name="trace-redisplay.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="trace-redisplay.txt" redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_preserve_echo_area (8) redisplay_internal 0 trying display optimization 1 017fce48 ( *Minibuf-1*): optimization 1 redisplay_internal 0 01963f50 (*scratch*): same window start 01963f50 (*scratch*): 1 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (50, 500, 16, 426) expose_window (50, 500, 16, 426) expose_frame (0, 926, 50, 16) expose_window (0, 926, 50, 16) expose_frame (0, 926, 1664, 16) expose_window (0, 926, 72, 16) expose_window (72, 926, 1592, 16) expose_frame (72, 926, 1592, 16) expose_window (72, 926, 0, 16) expose_window (72, 926, 1592, 16) redisplay_preserve_echo_area (8) redisplay_internal 0 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 redisplay_preserve_echo_area (9) redisplay_internal 0 04fa38f0 ( *sidebar*): cursor movement redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 04fa38f0 ( *sidebar*): same window start 04fa38f0 ( *sidebar*): 1 redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (0, 564, 50, 16) expose_window (0, 564, 50, 16) expose_frame (72, 868, 1592, 48) expose_window (72, 868, 0, 48) expose_window (72, 868, 1592, 48) redisplay_preserve_echo_area (8) redisplay_internal 0 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 redisplay_preserve_echo_area (9) redisplay_internal 0 04fa38f0 ( *sidebar*): cursor movement redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 836, 1592, 80) expose_window (72, 836, 0, 80) expose_window (72, 836, 1592, 80) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 836, 1592, 80) expose_window (72, 836, 0, 80) expose_window (72, 836, 1592, 80) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 644, 1592, 272) expose_window (72, 644, 0, 272) expose_window (72, 644, 1592, 272) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 564, 1592, 352) expose_window (72, 564, 0, 352) expose_window (72, 564, 1592, 352) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 580, 1592, 336) expose_window (72, 580, 0, 336) expose_window (72, 580, 1592, 336) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 580, 1592, 320) expose_window (72, 580, 0, 320) expose_window (72, 580, 1592, 320) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 612, 1592, 160) expose_window (72, 612, 0, 160) expose_window (72, 612, 1592, 160) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame garbaged redisplay_preserve_echo_area (11) redisplay_internal 0 01963f50 (*scratch*): same window start 01963f50 (*scratch*): 1 04fa38f0 ( *sidebar*): same window start 04fa38f0 ( *sidebar*): 1 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 500, 1592, 416) expose_window (72, 500, 0, 416) expose_window (72, 500, 1592, 416) expose_frame (72, 804, 1592, 16) expose_window (72, 804, 0, 16) expose_window (72, 804, 1592, 16) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 740, 1592, 176) expose_window (72, 740, 0, 176) expose_window (72, 740, 1592, 176) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 756, 1592, 48) expose_window (72, 756, 0, 48) expose_window (72, 756, 1592, 48) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 772, 1592, 48) expose_window (72, 772, 0, 48) expose_window (72, 772, 1592, 48) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 788, 1592, 112) expose_window (72, 788, 0, 112) expose_window (72, 788, 1592, 112) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 804, 1592, 48) expose_window (72, 804, 0, 48) expose_window (72, 804, 1592, 48) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 820, 1592, 48) expose_window (72, 820, 0, 48) expose_window (72, 820, 1592, 48) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): forced window start expose_frame (72, 804, 1592, 48) expose_window (72, 804, 0, 48) expose_window (72, 804, 1592, 48) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling expose_frame (72, 836, 1592, 64) expose_window (72, 836, 0, 64) expose_window (72, 836, 1592, 64) redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_internal 0 04fa38f0 ( *sidebar*): forced window start 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 04f98ad0 (.emacs): try_scrolling redisplay_preserve_echo_area (8) redisplay_internal 0 04f98ad0 (.emacs): same window start 04f98ad0 (.emacs): 1 redisplay_preserve_echo_area (9) redisplay_internal 0 04fa38f0 ( *sidebar*): cursor movement redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 04fa38f0 ( *sidebar*): same window start 04fa38f0 ( *sidebar*): 1 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 redisplay_preserve_echo_area (8) redisplay_internal 0 --------------030207020109010702010404--