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 12:01:47 +0200 Message-ID: <54268B0B.1020203@gmx.at> References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> <542668BA.6010800@gmx.at> <838ul5tpfu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411812213 5497 80.91.229.3 (27 Sep 2014 10:03:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2014 10:03:33 +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 12:03:26 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 1XXoqb-0004M4-Sf for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Sep 2014 12:03:26 +0200 Original-Received: from localhost ([::1]:55177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXoqb-0000Dd-HG for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Sep 2014 06:03:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXoqR-0000DX-8J for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 06:03:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXoqJ-0004bc-Ny for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 06:03:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXoqJ-0004aA-Kr for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 06:03:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XXoqE-0001NX-8q for bug-gnu-emacs@gnu.org; Sat, 27 Sep 2014 06:03:02 -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 10:03: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.14118121325228 (code B ref 18545); Sat, 27 Sep 2014 10:03:02 +0000 Original-Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 10:02:12 +0000 Original-Received: from localhost ([127.0.0.1]:53483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXopO-0001MD-VD for submit@debbugs.gnu.org; Sat, 27 Sep 2014 06:02:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:54143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXopM-0001M4-Ei for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 06:02:09 -0400 Original-Received: from [188.22.34.249] ([188.22.34.249]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LhOvA-1Y2X0o0zBI-00mXMa; Sat, 27 Sep 2014 12:01:58 +0200 In-Reply-To: <838ul5tpfu.fsf@gnu.org> X-Provags-ID: V03:K0:9lRbm4VZx9sjv2fyyq8uiBXr+HPFKArcPIAyBi6ZyFYR7rRBVuy +WoxLySiVfA0bW2bb4zIVFEoBVCR7Z8L+ICHZcGo6w66LWOCKnbgePg5urcGbR1kKEZhh9Q wo1AA7+4TeGqnmZL+a193wvmSNLFzGPxQWebnitXZaPwLszANeYBxJhsZV3idur6diEkQqb QwZ9pOZZwt6l1x+mDgmdQ== 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:93790 Archived-At: > Do you see the line number in the mode line of that window increasing, > after the cursor gets stuck, each time forward-line is run in that > window? It gets updated normally until and including when the cursor is at the partially visible line. After that it gets updated with every stuttering step, that is, when after three seconds the display actually scrolls. So FWIW the line number is congruent wrt to what I see on the screen. >> (1) The bug is not reproducible with Emacs 24-4, only with current >> trunk. > > That's strange, since the code to which you pointed is present in both > branches. The remaining aspects like the need for a maximized frame and the fact that the changes must be in my .emacs are much more strange. >> The bug might be related to your changes from 2014-07-09. > > I guess you meant 2014-07-04? There are no changes in all of xdisp.c > from 2014-07-09 or from a day before or after that (to account for > possible local time differences). A bzr revno would be useful. I took the dates from trunk's ChangeLog. On the release they appear as of 2014-07-04. More precisely I meant this change: * xdisp.c (redisplay_window): If redisplay of a window ends up with point in a partially visible line at end of the window, make sure the amended position of point actually has smaller Y coordinate; if not, give up and scroll the display. (Bug#17905) >> (gdb) p new_vpos >> $1 = 426 >> (gdb) p w->cursor.y >> $2 = 432 >> (gdb) >> >> In this particular case the display should be scrolled since otherwise >> point ends up on the partially visible line. But the test >> >> if (new_vpos >= w->cursor.y) >> >> fails to trigger that. > > I cannot test a fix unless I have a way to reproduce the problem. I can trigger the problem instantaneously here, so I can do anything you propose. OTOH sharing my recipe could be a very tedious endeavour. > Since you can reproduce it, could you propose a solution? One simple > solution would be to add this: > > 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? BTW is there a way to print the value returned by a macro in gdb? martin