From unknown Fri Jun 20 05:37:30 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18545 <18545@debbugs.gnu.org> To: bug#18545 <18545@debbugs.gnu.org> Subject: Status: 24.4.50: Bug - forward-line inside with-selected-window Reply-To: bug#18545 <18545@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:37:30 +0000 retitle 18545 24.4.50: Bug - forward-line inside with-selected-window reassign 18545 emacs submitter 18545 lompik@voila.fr severity 18545 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 09:39:21 2014 Received: (at submit) by debbugs.gnu.org; 24 Sep 2014 13:39:21 +0000 Received: from localhost ([127.0.0.1]:50543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWmmv-0006qF-87 for submit@debbugs.gnu.org; Wed, 24 Sep 2014 09:39:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40811) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWmmr-0006q3-K1 for submit@debbugs.gnu.org; Wed, 24 Sep 2014 09:39:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWmmY-0002bW-Uc for submit@debbugs.gnu.org; Wed, 24 Sep 2014 09:39:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWmmY-0002V0-Sr for submit@debbugs.gnu.org; Wed, 24 Sep 2014 09:38:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWmia-0007Kr-1y for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 09:34:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWmiU-000144-MG for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 09:34:51 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:60218 helo=smtpout.voila.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWmiU-00013E-H5 for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 09:34:46 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d19 with ME id v1ab1o00L1zLhPN031abGN; Wed, 24 Sep 2014 15:34:35 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Wed, 24 Sep 2014 15:34:35 +0200 X-ME-IP: 108.79.16.77 Date: Wed, 24 Sep 2014 15:34:35 +0200 (CEST) From: lompik@voila.fr To: bug-gnu-emacs@gnu.org Message-ID: <1107752996.69181411565675842.JavaMail.www@wwinf7125> Subject: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, The command `forward-line` fails (no error message) inside a `with-selected= -window` statement with=20 Here's some steps to reproduce this bug. It is not reproducible with 24.3. 1. emacs -Q 2. In scratch copy these line and C-M-x (global-set-key (kbd "C-`") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (forward-line 1)))) 3. Use these commands: C-x C-f (select one with lots of file in directory) C-x C-+ (increase font size) C-+=20 tab=20 tab (open *Completion* window) C-x o (other-window) C-x o=20 C-x C-+ (increase font size in *Completion* window, you might need more C-+= ) C-+=20 C-+ C-+ C-+=20 C-x o (switch back to mnibuffer) C-h k a (as help while in minibuffer, Important!!) C-` (forward-line in *Completion* window) C-`=20 C-`=20 C-` C-` .....(at some point fails to scroll screen Normal expected behavior is to be able to type C-` until the end of the lis= t in the *Completions* window. With this bug, you will be unable to go past= a line that is=20 truncated or half displayed. (for example https://cloud.githubusercontent.c= om/assets/3791334/4373312/be814774-432b-11e4-8add-47167bc1ef9c.png) Regards ! ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 11:14:13 2014 Received: (at 18545) by debbugs.gnu.org; 24 Sep 2014 15:14:13 +0000 Received: from localhost ([127.0.0.1]:50918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWoGi-0000sk-8o for submit@debbugs.gnu.org; Wed, 24 Sep 2014 11:14:12 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:45800) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWoGg-0000sc-6F for 18545@debbugs.gnu.org; Wed, 24 Sep 2014 11:14:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVOnWBcZ/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNiCgI0hkXjnoHFoQiBKsDg0wh X-IPAS-Result: ArYGAIDvNVOnWBcZ/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNiCgI0hkXjnoHFoQiBKsDg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90759122" Received: from 167-88-23-25.cpe.teksavvy.com (HELO pastel.home) ([167.88.23.25]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2014 11:14:09 -0400 Received: by pastel.home (Postfix, from userid 20848) id 820A060664; Wed, 24 Sep 2014 11:14:09 -0400 (EDT) From: Stefan Monnier To: lompik@voila.fr Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: References: <1107752996.69181411565675842.JavaMail.www@wwinf7125> Date: Wed, 24 Sep 2014 11:14:09 -0400 In-Reply-To: <1107752996.69181411565675842.JavaMail.www@wwinf7125> (lompik@voila.fr's message of "Wed, 24 Sep 2014 15:34:35 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The command `forward-line` fails (no error message) inside > a `with-selected-window` statement with Could you try it in Emacs-24.3.93 (which is the main focus for bug-fixing right now)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 11:50:49 2014 Received: (at 18545) by debbugs.gnu.org; 24 Sep 2014 15:50:49 +0000 Received: from localhost ([127.0.0.1]:50928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWoq8-0001nQ-6U for submit@debbugs.gnu.org; Wed, 24 Sep 2014 11:50:48 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:24152 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWoq4-0001nF-Tz for 18545@debbugs.gnu.org; Wed, 24 Sep 2014 11:50:46 -0400 Received: from wwinf7132 ([10.232.48.99]) by mwinf5d09 with ME id v3qj1o00328QPlE033qjPa; Wed, 24 Sep 2014 17:50:43 +0200 X-ME-Helo: wwinf7132 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Wed, 24 Sep 2014 17:50:43 +0200 X-ME-IP: 163.188.149.4 Date: Wed, 24 Sep 2014 17:50:43 +0200 (CEST) From: lompik@voila.fr To: Stefan Monnier Message-ID: <1007089618.101441411573843117.JavaMail.www@wwinf7132> In-Reply-To: Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [163.188.149.4] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I confirm the issue on Emacs 24.3.93 (build on 2014-08-15). > Message du 24/09/14 =C3=A0 17h14 > De : "Stefan Monnier"=20 > A : lompik@voila.fr > Copie =C3=A0 : 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > The command `forward-line` fails (no error message) inside > > a `with-selected-window` statement with >=20 > Could you try it in Emacs-24.3.93 (which is the main focus for > bug-fixing right now)? >=20 >=20 > Stefan >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 09:55:35 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 13:55:35 +0000 Received: from localhost ([127.0.0.1]:51956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX9W9-0007iN-J9 for submit@debbugs.gnu.org; Thu, 25 Sep 2014 09:55:34 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:58142) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX9W4-0007hl-Bs for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 09:55:29 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NCG00F00LN6J900@mtaout29.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 16:54:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCG009Y6MNJN580@mtaout29.012.net.il>; Thu, 25 Sep 2014 16:54:55 +0300 (IDT) Date: Thu, 25 Sep 2014 16:55:26 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <1007089618.101441411573843117.JavaMail.www@wwinf7132> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83vbobvm7l.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <1107752996.69181411565675842.JavaMail.www@wwinf7125> <1007089618.101441411573843117.JavaMail.www@wwinf7132> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 24 Sep 2014 17:50:43 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > I confirm the issue on Emacs 24.3.93 (build on 2014-08-15). > > > > Message du 24/09/14 à 17h14 > > De : "Stefan Monnier" > > A : lompik@voila.fr > > Copie à : 18545@debbugs.gnu.org > > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window > > > > > The command `forward-line` fails (no error message) inside > > > a `with-selected-window` statement with If you add (message "%s" (point)) to the form inside with-selected-window, you will see that forward-line does its job perfectly. Also, the line number in the mode line gets incremented, even if you don't make the above addition. The problem is that the window showing the *Completions* buffer is not scrolled to bring point into view. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 09:59:53 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 13:59:53 +0000 Received: from localhost ([127.0.0.1]:52202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX9aL-0007rZ-D2 for submit@debbugs.gnu.org; Thu, 25 Sep 2014 09:59:53 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:56352) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX9aI-0007rN-SM for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 09:59:51 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NCG00100MEHS500@mtaout25.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 16:54:53 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCG00HS6MNHMA80@mtaout25.012.net.il>; Thu, 25 Sep 2014 16:54:53 +0300 (IDT) Date: Thu, 25 Sep 2014 16:59:49 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83vbobvm7l.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83tx3vvm0a.fsf@gnu.org> References: <1107752996.69181411565675842.JavaMail.www@wwinf7125> <1007089618.101441411573843117.JavaMail.www@wwinf7132> <83vbobvm7l.fsf@gnu.org> X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This works OK in v24.3, so it's a regression. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.181 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This works OK in v24.3, so it's a regression. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.181 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) This works OK in v24.3, so it's a regression. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 11:20:44 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 15:20:44 +0000 Received: from localhost ([127.0.0.1]:52211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXAqZ-0001YJ-RV for submit@debbugs.gnu.org; Thu, 25 Sep 2014 11:20:44 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:32965) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXAqT-0001Y5-7t for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 11:20:38 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCG00800QELHW00@mtaout26.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 18:18:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCG00PS1QJ20Z70@mtaout26.012.net.il>; Thu, 25 Sep 2014 18:18:38 +0300 (IDT) Date: Thu, 25 Sep 2014 18:20:34 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83tx3vvm0a.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83sijfvi9p.fsf@gnu.org> References: <1107752996.69181411565675842.JavaMail.www@wwinf7125> <1007089618.101441411573843117.JavaMail.www@wwinf7132> <83vbobvm7l.fsf@gnu.org> <83tx3vvm0a.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Eli Zaretskii > Cc: 18545@debbugs.gnu.org > > This works OK in v24.3, so it's a regression. The patch below seems to fix the problem. It catches the situation where try_window failed to redisplay the window, in which case we shouldn't "goto done" as if we succeeded. === modified file 'src/xdisp.c' --- src/xdisp.c 2014-09-18 15:10:33 +0000 +++ src/xdisp.c 2014-09-25 15:15:42 +0000 @@ -16293,6 +16293,11 @@ redisplay_window (Lisp_Object window, bo } */ } + else if (w->cursor.vpos < 0) + { + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } #ifdef GLYPH_DEBUG debug_method_add (w, "forced window start"); From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 13:41:51 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 17:41:51 +0000 Received: from localhost ([127.0.0.1]:52264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXD38-0005Gi-V4 for submit@debbugs.gnu.org; Thu, 25 Sep 2014 13:41:51 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:29714 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXD36-0005GX-0S for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 13:41:49 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d10 with ME id vVhm1o00B1zLhPN03VhmiZ; Thu, 25 Sep 2014 19:41:46 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Thu, 25 Sep 2014 19:41:46 +0200 X-ME-IP: 108.79.16.77 Date: Thu, 25 Sep 2014 19:41:46 +0200 (CEST) From: lompik@voila.fr To: EliZaretskii Message-ID: <1675814983.52741411666906414.JavaMail.www@wwinf7125> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1924_30126404.1411666906397" X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) ------=_Part_1924_30126404.1411666906397 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It does if the point goes completely off the window. However it still does = not scroll in the case where the pointer is partly off window and partly in= side. In the=20 screenshot attached, the pointer is just above the modeline and I am unable= to calling forward-line has no effect. The cursor got in this current posi= tion by a=20 series of forward-line. Hopefully this is clear. > Message du 25/09/14 =C3=A0 17h20 > De : "Eli Zaretskii"=20 > A : lompik@voila.fr > Copie =C3=A0 : 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > From: Eli Zaretskii=20 > > Cc: 18545@debbugs.gnu.org > >=20 > > This works OK in v24.3, so it's a regression. >=20 > The patch below seems to fix the problem. It catches the situation > where try_window failed to redisplay the window, in which case we > shouldn't "goto done" as if we succeeded. >=20 >=20 > =3D=3D=3D modified file 'src/xdisp.c' > --- src/xdisp.c 2014-09-18 15:10:33 +0000 > +++ src/xdisp.c 2014-09-25 15:15:42 +0000 > @@ -16293,6 +16293,11 @@ redisplay_window (Lisp_Object window, bo > } > */ > } > + else if (w->cursor.vpos < 0) > + { > + clear_glyph_matrix (w->desired_matrix); > + goto try_to_scroll; > + } >=20 > #ifdef GLYPH_DEBUG > debug_method_add (w, "forced window start"); >=20 >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ ------=_Part_1924_30126404.1411666906397 Content-Type: image/png; name=cursoroff.png content-transfer-encoding: base64 Content-Disposition: attachment; size=14519; filename=cursoroff.png iVBORw0KGgoAAAANSUhEUgAAAXYAAABPCAIAAABwPnnjAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC AK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dE AP8A/wD/oL2nkwAAAAlvRkZzAAAAAgAAAooAVQqzagAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAl2 cEFnAAAKAAAABaAAGW6cRQAAKDpJREFUeNrtnXVcVNkXwM+bZgKG7lSkBAkLC7EFUbF1LQTXWBtd 1zVwXdZ29WdiByqiiC0GiImJlJQo3Q0zw/S83x80wjDEsLr7vp/5Z2beu+/cc+49975zC6msrITm YDAYgIGBgdExcJgKMDAw5AfmYjAwMOQI5mIwMDDkCOZiMDAw5EjLLkbC/XTtydFrRQJMSRgYGO2F 0OI/Yu6nWx8f6pvMn6pOkjk5SUH0iqmhXwEAgDp82kUfA4XOkVOcH/78fyc+xebwJUQFbQuLRduc +6kgAGj5y5Dlm77qrpzj684kyF2MtvGdiIGB8V26mHaBUzXfeF6XJ6gI2XQzrPOSFefF7twaWTh4 yIa1Okoov7hArEdHAAAA5eYVF0v4aAZXAkx5i/GdaAMD4weC0NnpUbSNKSDEq5A7M1VBfm42quzu 6TDIGN+kFmtPnn6qF4tqrEaSvxjfiTYwMH4gWnExgtf35g3jskUIw8R06ppRU2wo1Z0HELE/Xg4/ HfQ5tRwlquuMWDBqoYuaAiI1qZTXPhvfRecLKToGg3pKosKzK1WM5/zpNsWcJO0+btbuSYHhHACA i/P2XwQAwDns+sXXkdz+15CWhUdZebcOhF17ml8qBCCQNWz6bt3dz5jU/gSlgYryI96dvfDpXWIl D4CgqDZkzZQ1w+h4rFRi/HdcDOiazV/UTQtX+fbckzO/hRoHjuvNAED5cYcCNoZQxy9zX2II2eER x3ZdFWt7rrInS6lWotL8hEKV+X87K9+9tf+pmuf2yeilW+f+TnA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 P9B9BzI2TZ1uAAAAAElFTkSuQmCC ------=_Part_1924_30126404.1411666906397-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 13:51:43 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 17:51:44 +0000 Received: from localhost ([127.0.0.1]:52269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDCh-0006lK-B3 for submit@debbugs.gnu.org; Thu, 25 Sep 2014 13:51:43 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:52409) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDCe-0006lA-R4 for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 13:51:42 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCG00000X6LU700@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 20:51:39 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCG000K1XM2C380@a-mtaout22.012.net.il>; Thu, 25 Sep 2014 20:51:39 +0300 (IDT) Date: Thu, 25 Sep 2014 20:51:38 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <1675814983.52741411666906414.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83d2ajvb9x.fsf@gnu.org> References: <1675814983.52741411666906414.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 25 Sep 2014 19:41:46 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > It does if the point goes completely off the window. However it still does not scroll in the case where the pointer is partly off window and partly inside. And that is _after_ applying the patch? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 14:14:40 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 18:14:40 +0000 Received: from localhost ([127.0.0.1]:52281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDYt-0007Ld-He for submit@debbugs.gnu.org; Thu, 25 Sep 2014 14:14:39 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:20044 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDYr-0007LV-Qi for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 14:14:38 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d27 with ME id vWEc1o00D1zLhPN03WEcTZ; Thu, 25 Sep 2014 20:14:36 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Thu, 25 Sep 2014 20:14:36 +0200 X-ME-IP: 108.79.16.77 Date: Thu, 25 Sep 2014 20:14:36 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <290964377.56621411668876487.JavaMail.www@wwinf7125> In-Reply-To: <83d2ajvb9x.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) yes _after_ the patch. > Message du 25/09/14 =C3=A0 19h51 > De : "Eli Zaretskii"=20 > A : lompik@voila.fr > Copie =C3=A0 : 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > Date: Thu, 25 Sep 2014 19:41:46 +0200 (CEST) > > From: lompik@voila.fr > > Cc: 18545@debbugs.gnu.org > >=20 > > It does if the point goes completely off the window. However it still d= oes not scroll in the case where the pointer is partly off window and partl= y inside. >=20 > And that is _after_ applying the patch? >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 14:31:36 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 18:31:36 +0000 Received: from localhost ([127.0.0.1]:52286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDpH-0007ms-8F for submit@debbugs.gnu.org; Thu, 25 Sep 2014 14:31:35 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:52479) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXDpD-0007mY-La for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 14:31:33 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCG00G00YWT6G00@mtaout26.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 21:29:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCG00G07ZD5KE10@mtaout26.012.net.il>; Thu, 25 Sep 2014 21:29:29 +0300 (IDT) Date: Thu, 25 Sep 2014 21:31:25 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <290964377.56621411668876487.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83a95nv9fm.fsf@gnu.org> References: <290964377.56621411668876487.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 25 Sep 2014 20:14:36 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > > yes _after_ the patch. Can you tell me how to reproduce this? I don't see this in the recipe you described in your bug report. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 15:06:04 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 19:06:04 +0000 Received: from localhost ([127.0.0.1]:52316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXEMe-0000Ev-CC for submit@debbugs.gnu.org; Thu, 25 Sep 2014 15:06:04 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:29226 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXEMc-0000EV-82 for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 15:06:03 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d68 with ME id vX601o00D1zLhPN03X60rn; Thu, 25 Sep 2014 21:06:00 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Thu, 25 Sep 2014 21:06:00 +0200 X-ME-IP: 108.79.16.77 Date: Thu, 25 Sep 2014 21:06:00 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <968311419.64081411671960492.JavaMail.www@wwinf7125> In-Reply-To: <83a95nv9fm.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I will have to take some time to do some more research provide you with a r= eproducible minimal example.. The one I have now involves the *helm* librar= y. > Message du 25/09/14 =C3=A0 20h31 > De : "Eli Zaretskii"=20 > A : lompik@voila.fr > Copie =C3=A0 : 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > Date: Thu, 25 Sep 2014 20:14:36 +0200 (CEST) > > From: lompik@voila.fr > > Cc: 18545@debbugs.gnu.org > >=20 > >=20 > > yes _after_ the patch. >=20 > Can you tell me how to reproduce this? I don't see this in the recipe > you described in your bug report. >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 15:18:34 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 19:18:34 +0000 Received: from localhost ([127.0.0.1]:52325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXEYk-0000YP-5G for submit@debbugs.gnu.org; Thu, 25 Sep 2014 15:18:34 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:65067) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXEYh-0000YF-0b for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 15:18:31 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCH001001L1N900@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 22:18:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCH001IU1MTAQ60@a-mtaout22.012.net.il>; Thu, 25 Sep 2014 22:18:29 +0300 (IDT) Date: Thu, 25 Sep 2014 22:18:29 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <968311419.64081411671960492.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <8361gbv796.fsf@gnu.org> References: <968311419.64081411671960492.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 25 Sep 2014 21:06:00 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > I will have to take some time to do some more research provide you with a reproducible minimal example. Thanks in advance. Having a minimal reproducer means we are half-way to a solution. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 16:05:48 2014 Received: (at 18545) by debbugs.gnu.org; 25 Sep 2014 20:05:48 +0000 Received: from localhost ([127.0.0.1]:52338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXFIO-0001jP-6X for submit@debbugs.gnu.org; Thu, 25 Sep 2014 16:05:47 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:53113 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXFIK-0001jE-05 for 18545@debbugs.gnu.org; Thu, 25 Sep 2014 16:05:41 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d42 with ME id vY5c1o00L1zLhPN03Y5cbo; Thu, 25 Sep 2014 22:05:36 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Thu, 25 Sep 2014 22:05:36 +0200 X-ME-IP: 108.79.16.77 Date: Thu, 25 Sep 2014 22:05:36 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <1532440199.73121411675536923.JavaMail.www@wwinf7125> In-Reply-To: <8361gbv796.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) here's a related scrolling involving the lisp function recenter: 1. emacs -Q 2. define those binding: (global-set-key (kbd "C-`") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (forward-line 1)))) (global-set-key (kbd "C-~") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (forward-line -1)))) (global-set-key (kbd "C-;") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (recenter 5)))) 3. do: C-x C-f -> in a directory with lots of file. tab tab -> open completion buffer C-` -> to until scrolling down the *completion* buffer hit "C-;" -> nothing happens. it should recenter.=20 hit "C-'`" -> it recenter then move one line down Regards > Message du 25/09/14 =C3=A0 21h18 > De : "Eli Zaretskii"=20 > A : lompik@voila.fr > Copie =C3=A0 : 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > Date: Thu, 25 Sep 2014 21:06:00 +0200 (CEST) > > From: lompik@voila.fr > > Cc: 18545@debbugs.gnu.org > >=20 > > I will have to take some time to do some more research provide you with= a reproducible minimal example. >=20 > Thanks in advance. Having a minimal reproducer means we are half-way > to a solution. >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 03:31:28 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 07:31:28 +0000 Received: from localhost ([127.0.0.1]:52546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXPzw-0005FT-49 for submit@debbugs.gnu.org; Fri, 26 Sep 2014 03:31:27 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:44839) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXPzq-0005FF-Pa for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 03:31:22 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCH00F00YUZ0K00@mtaout26.012.net.il> for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 10:29:21 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCH00DC5ZGXNI30@mtaout26.012.net.il>; Fri, 26 Sep 2014 10:29:21 +0300 (IDT) Date: Fri, 26 Sep 2014 10:31:18 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <1532440199.73121411675536923.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83wq8qu9bt.fsf@gnu.org> References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 25 Sep 2014 22:05:36 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > here's a related scrolling involving the lisp function recenter: > > 1. emacs -Q > 2. define those binding: > > > (global-set-key (kbd "C-`") '(lambda () > (interactive) > (with-selected-window (get-buffer-window "*Completions*") > (forward-line 1)))) > > (global-set-key (kbd "C-~") '(lambda () > (interactive) > (with-selected-window (get-buffer-window "*Completions*") > (forward-line -1)))) > > (global-set-key (kbd "C-;") '(lambda () > (interactive) > (with-selected-window (get-buffer-window "*Completions*") > (recenter 5)))) > > 3. do: > > C-x C-f -> in a directory with lots of file. > tab tab -> open completion buffer > C-` -> to until scrolling down the *completion* buffer > > hit "C-;" -> nothing happens. it should recenter. > hit "C-'`" -> it recenter then move one line down I'm not sure this is related to this bug. The problem here was that the display engine was not considering for redisplay the window showing the *Completions* buffer. The patch below fixes that. === modified file 'src/window.c' --- src/window.c 2014-09-11 08:47:34 +0000 +++ src/window.c 2014-09-26 07:28:02 +0000 @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and w->start_at_line_beg = (bytepos == BEGV_BYTE || FETCH_BYTE (bytepos - 1) == '\n'); + wset_redisplay (w); + set_buffer_internal (obuf); return Qnil; } From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 08:48:32 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 12:48:32 +0000 Received: from localhost ([127.0.0.1]:52861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXUwp-0006HQ-Th for submit@debbugs.gnu.org; Fri, 26 Sep 2014 08:48:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23866) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXUwm-0006HG-7N for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 08:48:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMFCws0EhQYDSSIBAjSGReOegeEOAEDqRmBaoNMIQ X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMFCws0EhQYDSSIBAjSGReOegeEOAEDqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90940002" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Sep 2014 08:48:27 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2461F861E; Fri, 26 Sep 2014 08:48:27 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> Date: Fri, 26 Sep 2014 08:48:27 -0400 In-Reply-To: <83wq8qu9bt.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Sep 2014 10:31:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I'm not sure this is related to this bug. The problem here was that > the display engine was not considering for redisplay the window > showing the *Completions* buffer. The patch below fixes that. > === modified file 'src/window.c' > --- src/window.c 2014-09-11 08:47:34 +0000 > +++ src/window.c 2014-09-26 07:28:02 +0000 > @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and w-> start_at_line_beg = (bytepos == BEGV_BYTE || > FETCH_BYTE (bytepos - 1) == '\n'); > + wset_redisplay (w); > + > set_buffer_internal (obuf); > return Qnil; > } Hmm... Now that make me wonder: Why does (with-selected-window (get-buffer-window "*Completions*") (recenter 5)) require an explicit call to wset_redisplay from recenter, whereas (with-selected-window (get-buffer-window "*Completions*") (forward-line 1)) doesn't need an explicit call to wset_redisplay (or bset_redisplay) from forward-line? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 09:30:01 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 13:30:01 +0000 Received: from localhost ([127.0.0.1]:52871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXVax-0007Gw-Fj for submit@debbugs.gnu.org; Fri, 26 Sep 2014 09:30:00 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:50387) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXVap-0007Gc-CH for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 09:29:53 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NCI00L00EYDYL00@mtaout27.012.net.il> for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 16:24:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCI00O2YFWKAU10@mtaout27.012.net.il>; Fri, 26 Sep 2014 16:24:20 +0300 (IDT) Date: Fri, 26 Sep 2014 16:29:42 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83k34qtsqh.fsf@gnu.org> References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > Date: Fri, 26 Sep 2014 08:48:27 -0400 > > Why does > > (with-selected-window (get-buffer-window "*Completions*") > (recenter 5)) > > require an explicit call to wset_redisplay from recenter, whereas > > (with-selected-window (get-buffer-window "*Completions*") > (forward-line 1)) > > doesn't need an explicit call to wset_redisplay (or bset_redisplay) from > forward-line? I think that's because forward-line moves point, while recenter doesn't. But if you'd like to add wset_redisplay to forward-line, I won't object. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 10:13:49 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 14:13:49 +0000 Received: from localhost ([127.0.0.1]:53214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXWHN-0008PD-2C for submit@debbugs.gnu.org; Fri, 26 Sep 2014 10:13:49 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64468) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXWHK-0008P4-JL for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 10:13:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90947389" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Sep 2014 10:13:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 7DA47653D; Fri, 26 Sep 2014 10:13:45 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> <83k34qtsqh.fsf@gnu.org> Date: Fri, 26 Sep 2014 10:13:45 -0400 In-Reply-To: <83k34qtsqh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Sep 2014 16:29:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> Why does >> (with-selected-window (get-buffer-window "*Completions*") >> (recenter 5)) >> require an explicit call to wset_redisplay from recenter, whereas >> (with-selected-window (get-buffer-window "*Completions*") >> (forward-line 1)) >> doesn't need an explicit call to wset_redisplay (or bset_redisplay) from >> forward-line? > I think that's because forward-line moves point, while recenter > doesn't. But I don't see why moving point would help: calling wset_redisplay should only change the fact that this window is considered for redisplay, so if it's needed for the recenter case, that means that without it, the window would not be considered at all, which in turn should imply that in the forward-line case we wouldn't notice that point has changed, unless set_point_both ends up calling bset_redisplay somehow (but I fail to see how). > But if you'd like to add wset_redisplay to forward-line, I won't > object. If it's not needed, I'd rather not add it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 11:21:03 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 15:21:03 +0000 Received: from localhost ([127.0.0.1]:53226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXXKQ-0001py-ST for submit@debbugs.gnu.org; Fri, 26 Sep 2014 11:21:03 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:54751) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXXKN-0001pM-Tx for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 11:21:01 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NCI00J00L12CA00@mtaout29.012.net.il> for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 18:20:25 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCI00FYWLA1PW30@mtaout29.012.net.il>; Fri, 26 Sep 2014 18:20:25 +0300 (IDT) Date: Fri, 26 Sep 2014 18:20:48 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83h9zutnlb.fsf@gnu.org> References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> <83k34qtsqh.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > Date: Fri, 26 Sep 2014 10:13:45 -0400 > > >> Why does > >> (with-selected-window (get-buffer-window "*Completions*") > >> (recenter 5)) > >> require an explicit call to wset_redisplay from recenter, whereas > >> (with-selected-window (get-buffer-window "*Completions*") > >> (forward-line 1)) > >> doesn't need an explicit call to wset_redisplay (or bset_redisplay) from > >> forward-line? > > I think that's because forward-line moves point, while recenter > > doesn't. > > But I don't see why moving point would help: calling wset_redisplay > should only change the fact that this window is considered for > redisplay There are redisplay optimizations that don't depend on whether we consider a window for redisplay; see around line 13700 in xdisp.c from emacs-24. You will see a little ways below that place that we test point against its recorded value in w->last_point, for example. > so if it's needed for the recenter case, that means that > without it, the window would not be considered at all 'with-selected-window makes' the offending window selected, and the selected window is always considered for redisplay, right? > which in turn should imply that in the forward-line case we wouldn't > notice that point has changed, unless set_point_both ends up calling > bset_redisplay somehow (but I fail to see how). If you really want me to come up with a detailed explanation of why the forward-line case doesn't need wset_redisplay, I can do that, but it will require some digging. My fixes where based on turning on trace-redisplay and observing thereafter that, in the forward-line case the offending window was shown in the trace, but always with an indication that the forced window-start was OK, whereas in the recenter case the offending window was not shown at all in the trace. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 15:32:23 2014 Received: (at 18545) by debbugs.gnu.org; 26 Sep 2014 19:32:23 +0000 Received: from localhost ([127.0.0.1]:53313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXbFa-0001La-O2 for submit@debbugs.gnu.org; Fri, 26 Sep 2014 15:32:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64340) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXbFU-0001LK-8U for 18545@debbugs.gnu.org; Fri, 26 Sep 2014 15:32:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMQCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMQCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90978349" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Sep 2014 15:32:11 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3F3F5653F; Fri, 26 Sep 2014 15:32:11 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> <83k34qtsqh.fsf@gnu.org> <83h9zutnlb.fsf@gnu.org> Date: Fri, 26 Sep 2014 15:32:11 -0400 In-Reply-To: <83h9zutnlb.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Sep 2014 18:20:48 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> >> Why does >> >> (with-selected-window (get-buffer-window "*Completions*") >> >> (recenter 5)) >> >> require an explicit call to wset_redisplay from recenter, whereas >> >> (with-selected-window (get-buffer-window "*Completions*") >> >> (forward-line 1)) >> >> doesn't need an explicit call to wset_redisplay (or bset_redisplay) from >> >> forward-line? >> > I think that's because forward-line moves point, while recenter >> > doesn't. >> But I don't see why moving point would help: calling wset_redisplay >> should only change the fact that this window is considered for >> redisplay > There are redisplay optimizations that don't depend on whether we > consider a window for redisplay; see around line 13700 in xdisp.c from > emacs-24. You will see a little ways below that place that we test > point against its recorded value in w->last_point, for example. Right, but these are only for the current-buffer/selected-window, whereas the example modifies another window (and another buffer), so they first need to be considered (via [bwf]set_redisplay) before anything else will look at them. >> so if it's needed for the recenter case, that means that >> without it, the window would not be considered at all > 'with-selected-window makes' the offending window selected, and the > selected window is always considered for redisplay, right? No. If it were the wset_redisplay you added would have been a no-op. Oh, wait I see it now. We do test if point changed, in redisplay_window:15965: if (!just_this_one_p && REDISPLAY_SOME_P () && !w->redisplay && !f->redisplay && !buffer->text->redisplay && BUF_PT (buffer) == w->last_point) return; So indeed changing point ends up doing the moral equivalent of bset_redisplay. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 03:05:42 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 07:05:42 +0000 Received: from localhost ([127.0.0.1]:53457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXm4a-0005Sq-0N for submit@debbugs.gnu.org; Sat, 27 Sep 2014 03:05:40 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:33768) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXm4W-0005Sg-VE for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 03:05:38 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NCJ00J00SJ47B00@mtaout29.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 10:05:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCJ00KGKT0CD200@mtaout29.012.net.il>; Sat, 27 Sep 2014 10:05:01 +0300 (IDT) Date: Sat, 27 Sep 2014 10:05:19 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83wq8qu9bt.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83bnq1tufk.fsf@gnu.org> References: <1532440199.73121411675536923.JavaMail.www@wwinf7125> <83wq8qu9bt.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 26 Sep 2014 10:31:18 +0300 > From: Eli Zaretskii > Cc: 18545@debbugs.gnu.org > > > Date: Thu, 25 Sep 2014 22:05:36 +0200 (CEST) > > From: lompik@voila.fr > > Cc: 18545@debbugs.gnu.org > > > > here's a related scrolling involving the lisp function recenter: > > > > 1. emacs -Q > > 2. define those binding: > > > > > > (global-set-key (kbd "C-`") '(lambda () > > (interactive) > > (with-selected-window (get-buffer-window "*Completions*") > > (forward-line 1)))) > > > > (global-set-key (kbd "C-~") '(lambda () > > (interactive) > > (with-selected-window (get-buffer-window "*Completions*") > > (forward-line -1)))) > > > > (global-set-key (kbd "C-;") '(lambda () > > (interactive) > > (with-selected-window (get-buffer-window "*Completions*") > > (recenter 5)))) > > > > 3. do: > > > > C-x C-f -> in a directory with lots of file. > > tab tab -> open completion buffer > > C-` -> to until scrolling down the *completion* buffer > > > > hit "C-;" -> nothing happens. it should recenter. > > hit "C-'`" -> it recenter then move one line down > > I'm not sure this is related to this bug. The problem here was that > the display engine was not considering for redisplay the window > showing the *Completions* buffer. The patch below fixes that. > > === modified file 'src/window.c' > --- src/window.c 2014-09-11 08:47:34 +0000 > +++ src/window.c 2014-09-26 07:28:02 +0000 > @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and > w->start_at_line_beg = (bytepos == BEGV_BYTE || > FETCH_BYTE (bytepos - 1) == '\n'); > > + wset_redisplay (w); > + > set_buffer_internal (obuf); > return Qnil; > } Does this fix the other problem which you saw with scrolling? (I doubt it does.) If so, could you please tell me how to reproduce that? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 03:35:46 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 07:35:46 +0000 Received: from localhost ([127.0.0.1]:53461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXmXh-0006D2-FL for submit@debbugs.gnu.org; Sat, 27 Sep 2014 03:35:45 -0400 Received: from mout.gmx.net ([212.227.15.15]:59734) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXmXe-0006Cr-SK for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 03:35:43 -0400 Received: from [188.22.34.249] ([188.22.34.249]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LnfuZ-1YCMDy2n3n-00huEI; Sat, 27 Sep 2014 09:35:33 +0200 Message-ID: <542668BA.6010800@gmx.at> Date: Sat, 27 Sep 2014 09:35:22 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii , lompik@voila.fr Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> In-Reply-To: <83a95nv9fm.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:HXN7gvJ1gIbBTL1jwPOt4EFIiiT1hEaNpOlPHHsguyXX5luPJ4w 9ZMCLMckPkVfGO7F+dQm+Vnm/zwhQ1FspiASkEuOl+nAvDbtcTgMMaifAp1CISJzNfccKmf ChuFsYVKzNEv41pf+5NuiPQ0UQVX3hKn2cOwilVmqCGUGasrtaPS/MTqIZ5hFNNlF3ijHvp 5x9ZKH00xhS0exZs6IsxA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Can you tell me how to reproduce this? I don't see this in the recipe > you described in your bug report. I can reproduce something similar here but it hardly makes sense to share my recipe. The bug manifests itself such that after an implicit `forward-line' the cursor appears stuck in a partially visible line at the bottom of a window. That window has a sibling on the right. On Windows these siblings must be in the lower half of a split frame. On Gtk no vertical splitting is needed. The cursor continues to move by one line when keeping the down key (which implicitly runs `forward-line' here) pressed for some three seconds and gets stuck again immediately. Some additional particularities: (1) The bug is not reproducible with Emacs 24-4, only with current trunk. (2) My settings are needed and must be in .emacs. Starting emacs -Q, putting my .emacs contents in *scratch* and doing an `eval-buffer' there does not reproduce it. (3) My frame must be fully maximized. Any other form of maximization doesn't trigger it. (4) Your patch doesn't fix it. A breakpoint set there is never hit. The bug might be related to your changes from 2014-07-09. For example the following excerpt from a gdb session seems suspicious (the build is with your patch but it doesn't matter): (gdb) break xdisp.c:16261 Breakpoint 3 at 0x1050f51: file xdisp.c, line 16261. [...] (gdb) bt #0 redisplay_window (window=..., just_this_one_p=false) at xdisp.c:16261 #1 0x0104a340 in redisplay_window_0 (window=...) at xdisp.c:14322 #2 0x01191406 in internal_condition_case_1 (bfun=0x104a30a , arg=..., handlers=..., hfun=0x104a2e6 ) at eval.c:1368 #3 0x0104a2cb in redisplay_windows (window=...) at xdisp.c:14302 #4 0x0104a280 in redisplay_windows (window=...) at xdisp.c:14296 #5 0x0104a280 in redisplay_windows (window=...) at xdisp.c:14296 #6 0x01049291 in redisplay_internal () at xdisp.c:13901 #7 0x01047276 in redisplay () at xdisp.c:13181 #8 0x01104bad in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x82f7ef, end_time=0x0) at keyboard.c:2594 #9 0x0111297b in read_key_sequence (keybuf=0x82f8e4, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9178 #10 0x01102665 in command_loop_1 () at keyboard.c:1467 #11 0x011912f3 in internal_condition_case (bfun=0x11022e0 , handlers=..., hfun=0x1101b4b ) at eval.c:1344 #12 0x01101f96 in command_loop_2 (ignore=...) at keyboard.c:1198 #13 0x01190892 in internal_catch (tag=..., func=0x1101f72 , arg=...) at eval.c:1105 #14 0x01101f50 in command_loop () at keyboard.c:1177 #15 0x011016e7 in recursive_edit_1 () at keyboard.c:787 #16 0x011018a4 in Frecursive_edit () at keyboard.c:858 #17 0x010ff600 in main (argc=1, argv=0xa32808) at emacs.c:1643 Lisp Backtrace: "redisplay_internal (C function)" (0x206c3b4) (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. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 04:53:31 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 08:53:31 +0000 Received: from localhost ([127.0.0.1]:53469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXnkw-00086G-QT for submit@debbugs.gnu.org; Sat, 27 Sep 2014 04:53:31 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:47465) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXnks-000863-7T for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 04:53:28 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NCJ00G00XR98Z00@a-mtaout21.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 11:53:24 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCJ00GV1Y104R90@a-mtaout21.012.net.il>; Sat, 27 Sep 2014 11:53:24 +0300 (IDT) Date: Sat, 27 Sep 2014 11:53:09 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <542668BA.6010800@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <838ul5tpfu.fsf@gnu.org> References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> <542668BA.6010800@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 09:35:22 +0200 > From: martin rudalics > CC: 18545@debbugs.gnu.org > > > Can you tell me how to reproduce this? I don't see this in the recipe > > you described in your bug report. > > I can reproduce something similar here but it hardly makes sense to > share my recipe. The bug manifests itself such that after an implicit > `forward-line' the cursor appears stuck in a partially visible line at > the bottom of a window. That window has a sibling on the right. On > Windows these siblings must be in the lower half of a split frame. On > Gtk no vertical splitting is needed. The cursor continues to move by > one line when keeping the down key (which implicitly runs `forward-line' > here) pressed for some three seconds and gets stuck again immediately. 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? > Some additional particularities: > > (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. I'd like to hear from the OP (lompik@voila.fr) whether the bug observed with Helm is reproducible in the latest pretest 24.3.93 or in the emacs-24 branch. > 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. > (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. 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 06:02:11 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 10:02:12 +0000 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 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 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 Message-ID: <54268B0B.1020203@gmx.at> Date: Sat, 27 Sep 2014 12:01:47 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> <542668BA.6010800@gmx.at> <838ul5tpfu.fsf@gnu.org> In-Reply-To: <838ul5tpfu.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:9lRbm4VZx9sjv2fyyq8uiBXr+HPFKArcPIAyBi6ZyFYR7rRBVuy +WoxLySiVfA0bW2bb4zIVFEoBVCR7Z8L+ICHZcGo6w66LWOCKnbgePg5urcGbR1kKEZhh9Q wo1AA7+4TeGqnmZL+a193wvmSNLFzGPxQWebnitXZaPwLszANeYBxJhsZV3idur6diEkQqb QwZ9pOZZwt6l1x+mDgmdQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 07:22:29 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 11:22:29 +0000 Received: from localhost ([127.0.0.1]:53507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXq56-0003Ne-HG for submit@debbugs.gnu.org; Sat, 27 Sep 2014 07:22:29 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:54128) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXq52-0003NU-V5 for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 07:22:26 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NCK007004UYXC00@a-mtaout23.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 14:22:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK007DL4XAUU40@a-mtaout23.012.net.il>; Sat, 27 Sep 2014 14:22:22 +0300 (IDT) Date: Sat, 27 Sep 2014 14:22:08 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <54268B0B.1020203@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <8361g9tijj.fsf@gnu.org> References: <290964377.56621411668876487.JavaMail.www@wwinf7125> <83a95nv9fm.fsf@gnu.org> <542668BA.6010800@gmx.at> <838ul5tpfu.fsf@gnu.org> <54268B0B.1020203@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 12:01:47 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > 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. 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.) 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? > >> (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. Actually, I'm not so sure those are strange: rare situations with pixel dimensions might be only exposed by such techniques. > > 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. > 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) If this doesn't work, perhaps you didn't build with -g3, or your compiler is buggy. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 09:37:11 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 13:37:12 +0000 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 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 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 Message-ID: <5426BD71.4000705@gmx.at> Date: Sat, 27 Sep 2014 15:36:49 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> In-Reply-To: <8361g9tijj.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------030207020109010702010404" X-Provags-ID: V03:K0:bTbVNTNXexCd3jAs++Wi2zITqd5lzBvAPl0pPQzZbbnpr268nnV nYBXzNTkkqnxQfvN+JEq53J/O12/o+jW608gQKMfjY51mNkSUnC5m0X7c57g7NA71jsKhOE YlPnuOhcp7UWLhNYxEThCnx9ZycSV9FB+PgaxZdp18Oy+cQN0mUzsmHEcQgrqb2wuSxMdmI bVkYTwJx41yW8BVqGt7bA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 10:45:25 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 14:45:25 +0000 Received: from localhost ([127.0.0.1]:53838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXtFU-0001GS-MC for submit@debbugs.gnu.org; Sat, 27 Sep 2014 10:45:25 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:55854 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXtFO-0001GE-BS for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 10:45:20 -0400 Received: from wwinf7115 ([10.232.48.59]) by mwinf5d03 with ME id wElG1o00D1GdWEa03ElGgH; Sat, 27 Sep 2014 16:45:16 +0200 X-ME-Helo: wwinf7115 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Sat, 27 Sep 2014 16:45:16 +0200 X-ME-IP: 216.158.241.51 Date: Sat, 27 Sep 2014 16:45:16 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <1928358084.38631411829116532.JavaMail.www@wwinf7115> In-Reply-To: <83bnq1tufk.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [216.158.241.51] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) I can only do some tests from Sunday. Thanks >=20 > Does this fix the other problem which you saw with scrolling? (I > doubt it does.) If so, could you please tell me how to reproduce > that? >=20 > Thanks. >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 11:46:16 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 15:46:16 +0000 Received: from localhost ([127.0.0.1]:53842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXuCN-0002ks-TJ for submit@debbugs.gnu.org; Sat, 27 Sep 2014 11:46:16 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:60855) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXuCK-0002kf-EW for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 11:46:13 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NCK00800GKVOB00@a-mtaout23.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 18:46:10 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK008PCH4XM440@a-mtaout23.012.net.il>; Sat, 27 Sep 2014 18:46:10 +0300 (IDT) Date: Sat, 27 Sep 2014 18:45:56 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <1928358084.38631411829116532.JavaMail.www@wwinf7115> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <8338bdt6bv.fsf@gnu.org> References: <1928358084.38631411829116532.JavaMail.www@wwinf7115> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 16:45:16 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > > I can only do some tests from Sunday. OK, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 12:06:37 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 16:06:37 +0000 Received: from localhost ([127.0.0.1]:53846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXuW4-0003GD-Cn for submit@debbugs.gnu.org; Sat, 27 Sep 2014 12:06:36 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:58952) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXuW1-0003Fy-0a for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 12:06:34 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NCK00G00HCDQF00@mtaout25.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 19:01:36 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK0092UHUOFT80@mtaout25.012.net.il>; Sat, 27 Sep 2014 19:01:36 +0300 (IDT) Date: Sat, 27 Sep 2014 19:06:17 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <5426BD71.4000705@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83zjdlrqti.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Sat, 27 Sep 2014 15:36:49 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > 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. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.181 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Sat, 27 Sep 2014 15:36:49 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > 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. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.181 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) > Date: Sat, 27 Sep 2014 15:36:49 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > 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. AFAIU, it's indeed similar to the problem I solved with my previous patch (the one you have installed). > 117 > 122 [28 times] This says point doesn't move, which I don't understand how can happen. forward-line doesn't care about anything except moving point to the next line. > >> (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 But if new_vpos is 426 and row->height is 16, then the last row, which starts at y = 426, will end at y = 442, i.e. it's fully visible. This contradicts what you said earlier, that the last line is only partially visible. > >> 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. I get this: (gdb) p MATRIX_ROW_PARTIALLY_VISIBLE_P(w,row) $1 = 0 > > 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... Which GCC version is that? I have 4.8.1 here. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 13:25:10 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 17:25:10 +0000 Received: from localhost ([127.0.0.1]:53867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXvk5-0005EE-EU for submit@debbugs.gnu.org; Sat, 27 Sep 2014 13:25:09 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:41500) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXvk1-0005E3-PJ for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 13:25:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91043893" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Sep 2014 13:25:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id D61327ABB; Sat, 27 Sep 2014 13:25:04 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> Date: Sat, 27 Sep 2014 13:25:04 -0400 In-Reply-To: <83zjdlrqti.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Sep 2014 19:06:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, martin rudalics , 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > This says point doesn't move, which I don't understand how can > happen. forward-line doesn't care about anything except moving point > to the next line. That's odd, indeed. It can be explained if the redisplay ends up moving point to keep it in the window (instead of scrolling the window to follow point). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 13:35:45 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 17:35:45 +0000 Received: from localhost ([127.0.0.1]:53873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXvuK-0005Vq-1T for submit@debbugs.gnu.org; Sat, 27 Sep 2014 13:35:45 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:43465) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXvuD-0005Vb-60 for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 13:35:39 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NCK00300LMM0100@mtaout27.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 20:30:07 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK00LTRLY7XO60@mtaout27.012.net.il>; Sat, 27 Sep 2014 20:30:07 +0300 (IDT) Date: Sat, 27 Sep 2014 20:35:21 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83wq8prmp2.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, rudalics@gmx.at, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: martin rudalics , lompik@voila.fr, 18545@debbugs.gnu.org > Date: Sat, 27 Sep 2014 13:25:04 -0400 > > > This says point doesn't move, which I don't understand how can > > happen. forward-line doesn't care about anything except moving point > > to the next line. > > That's odd, indeed. It can be explained if the redisplay ends up moving > point to keep it in the window (instead of scrolling the window to > follow point). I don't think this can explain it: forward-line works on the buffer, and the location of point is (or should be, see below) printed _before_ Emacs enters redisplay, as part of running the command that called forward-line. This, of course, assumes that what Martin did was equivalent to the below: (defun my-fwd-line () (interactive) (forward-line 1) (message "%s" (point))) (define-key global-map [down] 'my-fwd-line) From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 13:53:06 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 17:53:06 +0000 Received: from localhost ([127.0.0.1]:53881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXwB8-0005vm-4D for submit@debbugs.gnu.org; Sat, 27 Sep 2014 13:53:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50617) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXwB5-0005va-7V for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 13:53:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91045496" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Sep 2014 13:53:02 -0400 Received: by pastel.home (Postfix, from userid 20848) id 57BEA3EAA; Sat, 27 Sep 2014 13:53:02 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Message-ID: 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> Date: Sat, 27 Sep 2014 13:53:02 -0400 In-Reply-To: <83wq8prmp2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Sep 2014 20:35:21 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, rudalics@gmx.at, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> That's odd, indeed. It can be explained if the redisplay ends up moving >> point to keep it in the window (instead of scrolling the window to >> follow point). > I don't think this can explain it: forward-line works on the buffer, > and the location of point is (or should be, see below) printed > _before_ Emacs enters redisplay, as part of running the command that > called forward-line. You assume that the value of point displayed is consistent with the one you see on the screen. But maybe the value of point printed is the one of the line *after* the last line. So after printing that value, redisplay re-sets point and at the end of the next command, the displayed point will be the same as the last displayed one. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:02:10 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:02:10 +0000 Received: from localhost ([127.0.0.1]:53916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxFw-0000VN-Vs for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:02:09 -0400 Received: from mout.gmx.net ([212.227.15.19]:53082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxFt-0000VD-UN for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:02:07 -0400 Received: from [194.118.140.218] ([194.118.140.218]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MLNpK-1XXPI33nDm-000dGb; Sat, 27 Sep 2014 21:02:02 +0200 Message-ID: <5427099F.6080406@gmx.at> Date: Sat, 27 Sep 2014 21:01:51 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> In-Reply-To: <83zjdlrqti.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:fPUVOVekXcKsZI1Hq5Sdy6LaqS61Ri5g+KbTOEp59abpUI3IVyO 8xGLuj5ndIZLAljwfLxxGGe/Cw//QI73Ck8SZoIL1l79YpWluufg1GGlGghEq2xrjyPv/EX OeijrPDJNfxPUuIQ8ZhaGbI9lKCR+tMKOhEscpDJn9FHhVza7joOQ5jwmSKuiiC3rwHlPcu Fg+a+DjClZPNGgnJ3iZTA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> 117 >> 122 [28 times] > > This says point doesn't move, which I don't understand how can > happen. forward-line doesn't care about anything except moving point > to the next line. But after 28 times point moves which is even less understandable. > But if new_vpos is 426 and row->height is 16, then the last row, which > starts at y = 426, will end at y = 442, i.e. it's fully visible. This > contradicts what you said earlier, that the last line is only > partially visible. Then why does cursor_row_fully_visible_p return 0 here? #0 cursor_row_fully_visible_p (w=0x5a25d78, force_p=0, current_matrix_p=0) at xdisp.c:15039 #1 0x01050f3f in redisplay_window (window=..., just_this_one_p=false) at xdisp.c:16250 #2 0x0104a340 in redisplay_window_0 (window=...) at xdisp.c:14322 #3 0x011913e2 in internal_condition_case_1 (bfun=0x104a30a , arg=..., handlers=..., hfun=0x104a2e6 ) at eval.c:1368 #4 0x0104a2cb in redisplay_windows (window=...) at xdisp.c:14302 #5 0x0104a280 in redisplay_windows (window=...) at xdisp.c:14296 #6 0x0104a280 in redisplay_windows (window=...) at xdisp.c:14296 #7 0x01049291 in redisplay_internal () at xdisp.c:13901 #8 0x01047276 in redisplay () at xdisp.c:13181 #9 0x01104b89 in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x82f7ef, end_time=0x0) at keyboard.c:2594 #10 0x01112957 in read_key_sequence (keybuf=0x82f8e4, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9178 #11 0x01102641 in command_loop_1 () at keyboard.c:1467 #12 0x011912cf in internal_condition_case (bfun=0x11022bc , handlers=..., hfun=0x1101b27 ) at eval.c:1344 #13 0x01101f72 in command_loop_2 (ignore=...) at keyboard.c:1198 #14 0x0119086e in internal_catch (tag=..., func=0x1101f4e , arg=...) at eval.c:1105 #15 0x01101f2c in command_loop () at keyboard.c:1177 #16 0x011016c3 in recursive_edit_1 () at keyboard.c:787 #17 0x01101880 in Frecursive_edit () at keyboard.c:858 #18 0x010ff5dc in main (argc=1, argv=0xa327e8) at emacs.c:1643 Lisp Backtrace: "redisplay_internal (C function)" (0x206c3b4) You probably mean I should answer that myself but honestly I don't understand cursor_row_fully_visible_p much. In any case, at least one pixel is missing visually. > Which GCC version is that? I have 4.8.1 here. 4.6.2. I'll try with Debian the next time. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:02:18 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:02:18 +0000 Received: from localhost ([127.0.0.1]:53919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxG5-0000Vi-9E for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:02:17 -0400 Received: from mout.gmx.net ([212.227.15.19]:62233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxG0-0000VX-Ty for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:02:15 -0400 Received: from [194.118.140.218] ([194.118.140.218]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Llmcq-1Y7I0T3D9s-00ZOCr; Sat, 27 Sep 2014 21:02:05 +0200 Message-ID: <542709A3.7090205@gmx.at> Date: Sat, 27 Sep 2014 21:01:55 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii , Stefan Monnier Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> In-Reply-To: <83wq8prmp2.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rWAo2H8yz7BLn1ev4rVbZhEyXtbMMahoTKxbwwWaSMxnoMLTr44 A62LJ6ybObkXUMXYnmPsCoMz6h+XLpRkIzzOG6oIiDrcTsn988wsbqpO30NlnPbVU325UEQ +3P6m35TgZlQuHUCnhfiwMFCxBYg/VNZ0JlQ/11AcrexGH0urLJbtFtqHmO1opGZT2dTxOy g4n4GZRVBKjSxCpX8lAHA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > I don't think this can explain it: forward-line works on the buffer, > and the location of point is (or should be, see below) printed > _before_ Emacs enters redisplay, as part of running the command that > called forward-line. This is a red herring. The values I print can't be attributed to a specific "failing" instance of `forward-line'. What you see is the readjusted value after scrolling was wrongly dismissed in the last round. With `before' and `after' around the `forward-line' call I get: before 97 after 102 before 102 after 107 before 107 after 112 before 112 after 117 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 before 117 after 122 So `forward-line' always skips five characters but point gets reset later on. > This, of course, assumes that what Martin did was equivalent to the > below: > > (defun my-fwd-line () > (interactive) > (forward-line 1) > (message "%s" (point))) That's precisely what I did. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:03:52 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:03:52 +0000 Received: from localhost ([127.0.0.1]:53924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxHc-0000YH-6f for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:03:52 -0400 Received: from mout.gmx.net ([212.227.15.18]:53749) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxHa-0000Y7-1X for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:03:50 -0400 Received: from [194.118.140.218] ([194.118.140.218]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MRGTX-1Xh7yc48xb-00UagO; Sat, 27 Sep 2014 21:03:42 +0200 Message-ID: <54270A02.2010907@gmx.at> Date: Sat, 27 Sep 2014 21:03:30 +0200 From: martin rudalics MIME-Version: 1.0 To: Stefan Monnier , Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:so9+qC5nzmUqKnqt2boBxT8+98WiB+Oe2cVm8hU0Q3ok8mTtSdC XPNRfuH1CJ/5jYE32qHPShP0fjMGI9T5DqYzHUPsOlYuHictWU29+v5G/I3+hkN5RzYYkFa r1CdvDmh8AA0xzbueuL6QUT49TTvv7OWOM4Bq4tyNUnwGiSnOGdqjn54sJk4CbaHdfKKKrX n5u/wAbjGOLNpLW4wGQFQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > You assume that the value of point displayed is consistent with the one > you see on the screen. But maybe the value of point printed is the one > of the line *after* the last line. So after printing that value, > redisplay re-sets point and at the end of the next command, the > displayed point will be the same as the last displayed one. Indeed. Redisplay moves point back exactly to where it was before. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:25:50 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:25:50 +0000 Received: from localhost ([127.0.0.1]:53929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxcr-00015O-Fu for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:25:49 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:58991) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxcn-00015D-Qj for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:25:47 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NCK00L00QT9OA00@a-mtaout20.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 22:25:44 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK00LFRRAVAU60@a-mtaout20.012.net.il>; Sat, 27 Sep 2014 22:25:44 +0300 (IDT) Date: Sat, 27 Sep 2014 22:25:30 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <5427099F.6080406@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83tx3ssw5x.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <5427099F.6080406@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 21:01:51 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > >> 117 > >> 122 [28 times] > > > > This says point doesn't move, which I don't understand how can > > happen. forward-line doesn't care about anything except moving point > > to the next line. > > But after 28 times point moves which is even less understandable. I don't think this is relevant. It could be related to blink-cursor-mode or some other feature that triggers a more thorough redisplay. (Try typing "M-x", for example.) The code part that seems to be involved in this is an optimization, so when it is not taken, you don't see the problem. > > But if new_vpos is 426 and row->height is 16, then the last row, which > > starts at y = 426, will end at y = 442, i.e. it's fully visible. This > > contradicts what you said earlier, that the last line is only > > partially visible. > > Then why does cursor_row_fully_visible_p return 0 here? Because w->cursor.y is 432, only 10 pixels from the window bottom, which is less than 16 pixels we need for the row. Hmm, I think I see the problem in the logic behind this part: if (!cursor_row_fully_visible_p (w, 0, 0)) { /* Point does appear, but on a line partly visible at end of window. Move it back to a fully-visible line. */ new_vpos = window_box_height (w); /* But if window_box_height suggests a Y coordinate that is not less than we already have, that line will clearly not be fully visible, so give up and scroll the display. This can happen when the default face uses a font whose dimensions are different from the frame's default font. */ if (new_vpos >= w->cursor.y) { w->cursor.vpos = -1; clear_glyph_matrix (w->desired_matrix); goto try_to_scroll; } What I think happens is that window_box_height tells us to put the cursor at y = 426, but the first row that fits that is too far down, due to the window size being not an integral multiple of the font height. So the condition to goto try_to_scroll needs to become smarter. Can you show all the values of MATRIX_ROW_BOTTOM_Y that are examined in this loop, after we determine that new_vpos should be 426: row = MATRIX_FIRST_TEXT_ROW (w->desired_matrix); while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos) ++row; > You probably mean I should answer that myself but honestly I don't > understand cursor_row_fully_visible_p much. Which part of it do you not understand? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:28:12 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:28:12 +0000 Received: from localhost ([127.0.0.1]:53934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxf9-00019G-Eb for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:28:11 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:50883) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxf7-000193-48 for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:28:09 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCK00400R1B8H00@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 22:28:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK003GCREVTJ70@a-mtaout22.012.net.il>; Sat, 27 Sep 2014 22:28:08 +0300 (IDT) Date: Sat, 27 Sep 2014 22:27:54 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <542709A3.7090205@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83sijcsw1x.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <542709A3.7090205@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 21:01:55 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > I don't think this can explain it: forward-line works on the buffer, > > and the location of point is (or should be, see below) printed > > _before_ Emacs enters redisplay, as part of running the command that > > called forward-line. > > This is a red herring. The values I print can't be attributed to a > specific "failing" instance of `forward-line'. What you see is the > readjusted value after scrolling was wrongly dismissed in the last > round. With `before' and `after' around the `forward-line' call I get: > [...] > before 117 > after 122 > before 117 > after 122 > [...] > So `forward-line' always skips five characters but point gets reset > later on. But that means the code is doing exactly what it was intended to do: move point back so that it is in view. IOW, "notabug". Right? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:38:33 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:38:33 +0000 Received: from localhost ([127.0.0.1]:53938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxpB-0001Qv-3d for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:38:33 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:60907) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXxp7-0001Qj-EL for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:38:30 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NCK00L00REYQ900@a-mtaout20.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 22:38:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK00L4FRVXAU80@a-mtaout20.012.net.il>; Sat, 27 Sep 2014 22:38:22 +0300 (IDT) Date: Sat, 27 Sep 2014 22:38:08 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <54270A02.2010907@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83r3ywsvkv.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 21:03:30 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > You assume that the value of point displayed is consistent with the one > > you see on the screen. But maybe the value of point printed is the one > > of the line *after* the last line. So after printing that value, > > redisplay re-sets point and at the end of the next command, the > > displayed point will be the same as the last displayed one. > > Indeed. Redisplay moves point back exactly to where it was before. Which is exactly what that code was written to do. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 27 15:55:58 2014 Received: (at 18545) by debbugs.gnu.org; 27 Sep 2014 19:55:58 +0000 Received: from localhost ([127.0.0.1]:53954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXy61-0001ri-9E for submit@debbugs.gnu.org; Sat, 27 Sep 2014 15:55:57 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:33278) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXy5y-0001rV-80 for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 15:55:55 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NCK00H00SLHSQ00@a-mtaout21.012.net.il> for 18545@debbugs.gnu.org; Sat, 27 Sep 2014 22:55:52 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCK00H2BSP4SG10@a-mtaout21.012.net.il>; Sat, 27 Sep 2014 22:55:52 +0300 (IDT) Date: Sat, 27 Sep 2014 22:55:38 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83r3ywsvkv.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: rudalics@gmx.at Message-id: <83ppegsurp.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 27 Sep 2014 22:38:08 +0300 > From: Eli Zaretskii > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > > > Date: Sat, 27 Sep 2014 21:03:30 +0200 > > From: martin rudalics > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > > > You assume that the value of point displayed is consistent with the one > > > you see on the screen. But maybe the value of point printed is the one > > > of the line *after* the last line. So after printing that value, > > > redisplay re-sets point and at the end of the next command, the > > > displayed point will be the same as the last displayed one. > > > > Indeed. Redisplay moves point back exactly to where it was before. > > Which is exactly what that code was written to do. Hmm... I wonder why did we enter this area of the code, i.e. why did this condition fire: /* Handle case where place to start displaying has been specified, unless the specified location is outside the accessible range. */ if (w->force_start || window_frozen_p (w)) Was w->force_start non-zero, or did window_frozen_p return non-zero? If the former, can you see where was the force_start flag set? (I'd be surprised if it's the latter, since windows are only frozen when we grow the minibuffer, which shouldn't be happening here, I think.) In general, if the force_start flag of a window is set, that means we shouldn't scroll, so bringing point back into view makes sense. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 05:33:53 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 09:33:53 +0000 Received: from localhost ([127.0.0.1]:54081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYArZ-0004dr-30 for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:33:53 -0400 Received: from mout.gmx.net ([212.227.15.15]:54310) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYArW-0004di-4Q for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 05:33:51 -0400 Received: from [93.82.13.243] ([93.82.13.243]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MgtWa-1Xu5QS3OfQ-00M6Ty; Sun, 28 Sep 2014 11:33:48 +0200 Message-ID: <5427D5F0.9050303@gmx.at> Date: Sun, 28 Sep 2014 11:33:36 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <5427099F.6080406@gmx.at> <83tx3ssw5x.fsf@gnu.org> In-Reply-To: <83tx3ssw5x.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:jZSoh0TVY/NyIx8Rum5VvlY0Xu21gsnip56pUMl24UpyGJfZAIe GRnDctRFuWbtzSVJWY4ZXjsRQy/WoZQfQo1mhOBEBG8L8DolLM6bFgTrbTcPD4KiQnhP0V1 oXsOIaiuDRxqtm6Ws5KQqSwHHuEwFujgB8tv6a5FnJwQVH0KGd2wQMST6k3Xc/az/hrD3nw KNUKpcxT9Qm9Sx8JE36Og== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> But after 28 times point moves which is even less understandable. > > I don't think this is relevant. It could be related to > blink-cursor-mode ... always turned off here ... > or some other feature that triggers a more thorough > redisplay. (Try typing "M-x", for example.) The code part that seems > to be involved in this is an optimization, so when it is not taken, > you don't see the problem. OK. But the only thing I do here is leaning on the button. > Can you show all the values of MATRIX_ROW_BOTTOM_Y that are examined > in this loop, after we determine that new_vpos should be 426: > > row = MATRIX_FIRST_TEXT_ROW (w->desired_matrix); > while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos) > ++row; Using while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos) { ++row; Vdebug_on_message = Fcons (Fcons (make_number (row->y), make_number (new_vpos)), Vdebug_on_message); } and nreverse on the value of Vdebug_on_message gets me a repeated pattern of (32 . 426) (48 . 426) (64 . 426) (80 . 426) (96 . 426) (112 . 426) (128 . 426) (144 . 426) (160 . 426) (176 . 426) (192 . 426) (208 . 426) (224 . 426) (240 . 426) (256 . 426) (272 . 426) (288 . 426) (304 . 426) (320 . 426) (336 . 426) (352 . 426) (368 . 426) (384 . 426) (400 . 426) (416 . 426) >> I don't >> understand cursor_row_fully_visible_p much. > > Which part of it do you not understand? Why it should return 1 in these two cases if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) return 1; and if (row->height >= window_height) { if (!force_p || MINI_WINDOW_P (w) || w->vscroll || w->cursor.vpos == 0) return 1; } martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 05:35:08 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 09:35:09 +0000 Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYAsl-0004g9-QK for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:35:08 -0400 Received: from mout.gmx.net ([212.227.15.15]:50177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYAsj-0004g0-6e for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 05:35:05 -0400 Received: from [93.82.13.243] ([93.82.13.243]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MGBB1-1XRrV92bJP-00F8DL; Sun, 28 Sep 2014 11:34:56 +0200 Message-ID: <5427D634.1070100@gmx.at> Date: Sun, 28 Sep 2014 11:34:44 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> In-Reply-To: <83ppegsurp.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:B8WIqJwRb/LAAeHeEqVLEBRFbp3OpYRQMiwkuDPnuVWcqAzthjA RhbLtOeR6mE/9J9xqbg5lE5A1fwn25lH63ZYC8BFMWdA6ihLn42FSMtCaBjCNpEs1KrHh6g p7CCXlDNe6srXI3V230z8mVaCN0vDuo61yzUDbJOWfGf0TtTZebwDst31To1926op2jNNQ+ PXgiYc/Xh+QAZHqGpon7w== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Hmm... I wonder why did we enter this area of the code, i.e. why did > this condition fire: > > /* Handle case where place to start displaying has been specified, > unless the specified location is outside the accessible range. */ > if (w->force_start || window_frozen_p (w)) > > Was w->force_start non-zero, or did window_frozen_p return non-zero? > If the former, can you see where was the force_start flag set? (I'd > be surprised if it's the latter, since windows are only frozen when we > grow the minibuffer, which shouldn't be happening here, I think.) > > In general, if the force_start flag of a window is set, that means we > shouldn't scroll, so bringing point back into view makes sense. That's likely me. Under certain conditions I do `recenter' with a negative argument in `post-command-hook' which basically looks like (recenter (max 0 (- (window-height) 7))) which triggers w->force_start being set here in xdisp.c: if (IT_CHARPOS (it) == PT) w->force_start = 1; So my case _is_ very likely special. Still "bringing point back into view" shouldn't make point appear on a partially visible line. Or am I missing something? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 12:30:05 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 16:30:05 +0000 Received: from localhost ([127.0.0.1]:54490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHMJ-0007m3-Ih for submit@debbugs.gnu.org; Sun, 28 Sep 2014 12:30:04 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:49623) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHMF-0007lH-SQ for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 12:30:01 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCM00H00DRL8P00@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 19:29:58 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM00HQ0DTY8L00@a-mtaout22.012.net.il>; Sun, 28 Sep 2014 19:29:58 +0300 (IDT) Date: Sun, 28 Sep 2014 19:29:47 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <5427D634.1070100@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83sijbn1xg.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> <5427D634.1070100@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 28 Sep 2014 11:34:44 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > Hmm... I wonder why did we enter this area of the code, i.e. why did > > this condition fire: > > > > /* Handle case where place to start displaying has been specified, > > unless the specified location is outside the accessible range. */ > > if (w->force_start || window_frozen_p (w)) > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero? > > If the former, can you see where was the force_start flag set? (I'd > > be surprised if it's the latter, since windows are only frozen when we > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > In general, if the force_start flag of a window is set, that means we > > shouldn't scroll, so bringing point back into view makes sense. > > That's likely me. Under certain conditions I do `recenter' with a > negative argument in `post-command-hook' which basically looks like > > (recenter (max 0 (- (window-height) 7))) > > which triggers w->force_start being set here in xdisp.c: > > if (IT_CHARPOS (it) == PT) > w->force_start = 1; That's what I thought. > So my case _is_ very likely special. Still "bringing point back into > view" shouldn't make point appear on a partially visible line. No, that's likely the bug here. I will look into that. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 12:33:52 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 16:33:52 +0000 Received: from localhost ([127.0.0.1]:54493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHPz-0007sQ-KA for submit@debbugs.gnu.org; Sun, 28 Sep 2014 12:33:51 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:50280) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHPw-0007sG-IU for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 12:33:49 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCM00H00DRL8P00@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 19:33:47 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM00HKDE0B8L10@a-mtaout22.012.net.il>; Sun, 28 Sep 2014 19:33:47 +0300 (IDT) Date: Sun, 28 Sep 2014 19:33:36 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <5427D5F0.9050303@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83r3yvn1r3.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <5427099F.6080406@gmx.at> <83tx3ssw5x.fsf@gnu.org> <5427D5F0.9050303@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 28 Sep 2014 11:33:36 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > >> I don't > >> understand cursor_row_fully_visible_p much. > > > > Which part of it do you not understand? > > Why it should return 1 in these two cases > > if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) > return 1; If a row is _not_ partially visible, it is _fully_ visible, right? > and > > if (row->height >= window_height) > { > if (!force_p || MINI_WINDOW_P (w) > || w->vscroll || w->cursor.vpos == 0) > return 1; > } There's a comment that that's supposed to explain this. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 13:51:38 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 17:51:38 +0000 Received: from localhost ([127.0.0.1]:54548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYIdF-0001PE-U7 for submit@debbugs.gnu.org; Sun, 28 Sep 2014 13:51:38 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:59582) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYIdC-0001P2-UW for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 13:51:36 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCM00F00HD21M00@mtaout26.012.net.il> for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 20:49:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM008O4HIQJ760@mtaout26.012.net.il>; Sun, 28 Sep 2014 20:49:38 +0300 (IDT) Date: Sun, 28 Sep 2014 20:51:22 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83sijbn1xg.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: rudalics@gmx.at Message-id: <83oatzmy5h.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> <5427D634.1070100@gmx.at> <83sijbn1xg.fsf@gnu.org> X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Sun, 28 Sep 2014 19:29:47 +0300 > From: Eli Zaretskii > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > > > Date: Sun, 28 Sep 2014 11:34:44 +0200 > > From: martin rudalics > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > > > Hmm... I wonder why did we enter this area of the code, i.e. why did > > > this condition fire: > > > > > > /* Handle case where place to start displaying has been specified, > > > unless the specified location is outside the accessible range. */ > > > if (w->force_start || window_frozen_p (w)) > > > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero? > > > If the former, can you see where was the force_start flag set? (I'd > > > be surprised if it's the latter, since windows are only frozen when we > > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > > > In general, if the force_start flag of a window is set, that means we > > > shouldn't scroll, so bringing point back into view makes sense. > > > > That's likely me. Under certain conditions I do `recenter' with a > > negative argument in `post-command-hook' which basically looks like > > > > (recenter (max 0 (- (window-height) 7))) > > > > which triggers w->force_start being set here in xdisp.c: > > > > if (IT_CHARPOS (it) == PT) > > w->force_start = 1; > > That's what I thought. > > > So my case _is_ very likely special. Still "bringing point back into > > view" shouldn't make point appear on a partially visible line. > > No, that's likely the bug here. I will look into that. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.182 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Sun, 28 Sep 2014 19:29:47 +0300 > From: Eli Zaretskii > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > > > Date: Sun, 28 Sep 2014 11:34:44 +0200 > > From: martin rudalics > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > > > Hmm... I wonder why did we enter this area of the code, i.e. why did > > > this condition fire: > > > > > > /* Handle case where place to start displaying has been specified, > > > unless the specified location is outside the accessible range. */ > > > if (w->force_start || window_frozen_p (w)) > > > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero? > > > If the former, can you see where was the force_start flag set? (I'd > > > be surprised if it's the latter, since windows are only frozen when we > > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > > > In general, if the force_start flag of a window is set, that means we > > > shouldn't scroll, so bringing point back into view makes sense. > > > > That's likely me. Under certain conditions I do `recenter' with a > > negative argument in `post-command-hook' which basically looks like > > > > (recenter (max 0 (- (window-height) 7))) > > > > which triggers w->force_start being set here in xdisp.c: > > > > if (IT_CHARPOS (it) == PT) > > w->force_start = 1; > > That's what I thought. > > > So my case _is_ very likely special. Still "bringing point back into > > view" shouldn't make point appear on a partially visible line. > > No, that's likely the bug here. I will look into that. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.182 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) > Date: Sun, 28 Sep 2014 19:29:47 +0300 > From: Eli Zaretskii > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > > > Date: Sun, 28 Sep 2014 11:34:44 +0200 > > From: martin rudalics > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > > > Hmm... I wonder why did we enter this area of the code, i.e. why did > > > this condition fire: > > > > > > /* Handle case where place to start displaying has been specified, > > > unless the specified location is outside the accessible range. */ > > > if (w->force_start || window_frozen_p (w)) > > > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero? > > > If the former, can you see where was the force_start flag set? (I'd > > > be surprised if it's the latter, since windows are only frozen when we > > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > > > In general, if the force_start flag of a window is set, that means we > > > shouldn't scroll, so bringing point back into view makes sense. > > > > That's likely me. Under certain conditions I do `recenter' with a > > negative argument in `post-command-hook' which basically looks like > > > > (recenter (max 0 (- (window-height) 7))) > > > > which triggers w->force_start being set here in xdisp.c: > > > > if (IT_CHARPOS (it) == PT) > > w->force_start = 1; > > That's what I thought. > > > So my case _is_ very likely special. Still "bringing point back into > > view" shouldn't make point appear on a partially visible line. > > No, that's likely the bug here. I will look into that. Does the patch below help? If not, can you tell where I goofed? === modified file 'src/xdisp.c' --- src/xdisp.c 2014-09-25 07:01:35 +0000 +++ src/xdisp.c 2014-09-28 17:45:22 +0000 @@ -16179,15 +16179,21 @@ redisplay_window (Lisp_Object window, bo && CHARPOS (startp) >= BEGV && CHARPOS (startp) <= ZV) { + ptrdiff_t it_charpos; + w->optional_new_start = 0; start_display (&it, w, startp); move_it_to (&it, PT, 0, it.last_visible_y, -1, MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); - if (IT_CHARPOS (it) == PT) - w->force_start = 1; - /* IT may overshoot PT if text at PT is invisible. */ - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT) - w->force_start = 1; + it_charpos = IT_CHARPOS (it); + if (line_bottom_y (&it) < it.last_visible_y) + { + if (it_charpos == PT) + w->force_start = 1; + /* IT may overshoot PT if text at PT is invisible. */ + else if (it_charpos > PT && CHARPOS (startp) <= PT) + w->force_start = 1; + } } force_start: From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 15:03:52 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 19:03:52 +0000 Received: from localhost ([127.0.0.1]:54567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYJl9-0003AD-Lz for submit@debbugs.gnu.org; Sun, 28 Sep 2014 15:03:51 -0400 Received: from mout.gmx.net ([212.227.15.15]:49332) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYJl6-0003A3-8a for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 15:03:48 -0400 Received: from [62.46.208.76] ([62.46.208.76]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MXIov-1XmqNh0tZV-00WDRY; Sun, 28 Sep 2014 21:03:36 +0200 Message-ID: <54285B85.9000007@gmx.at> Date: Sun, 28 Sep 2014 21:03:33 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> <5427D634.1070100@gmx.at> <83sijbn1xg.fsf@gnu.org> <83oatzmy5h.fsf@gnu.org> In-Reply-To: <83oatzmy5h.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:k7eupDvsWCiiGDSodabsntQ0vQQDl9OdHLv2JrGKHprUG+5wa+8 AijQf+sX3QaoYfqUUxckL9hB0YICjibckITCE913IUxTsVlxgzmpsyYan+CTajvqlK3eXlK 8tbjjQW50nvP0kJarciWQqmvGV/2kShjkS7UBg2cAX2AYBf81uDQreJ3HjParwPccHUbeOe ZZ9Ki4dDVxjPI89MXc8UQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Does the patch below help? Works like a charm (I was already about to rewrite my 10 years old code and get rid of that recentering rigmarole). Let's see whether it's of any help for lompik. Many thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 15:04:13 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 19:04:13 +0000 Received: from localhost ([127.0.0.1]:54571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYJlU-0003BC-G6 for submit@debbugs.gnu.org; Sun, 28 Sep 2014 15:04:12 -0400 Received: from mout.gmx.net ([212.227.15.18]:61759) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYJlS-0003B4-8T for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 15:04:11 -0400 Received: from [62.46.208.76] ([62.46.208.76]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lkwc9-1Y91xX0jif-00anfA; Sun, 28 Sep 2014 21:04:02 +0200 Message-ID: <54285BA0.6080205@gmx.at> Date: Sun, 28 Sep 2014 21:04:00 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <5427099F.6080406@gmx.at> <83tx3ssw5x.fsf@gnu.org> <5427D5F0.9050303@gmx.at> <83r3yvn1r3.fsf@gnu.org> In-Reply-To: <83r3yvn1r3.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:NKKF2C/AW0A/gG+V+1ZG87jmpm7b3T6F35nA4BIiuMahv4IM0W8 6iLejzV5poznzIxByIvTIHm4kOQXA6crrnUA5FlEACGjrgtsELLWNBEFgSKngwOEaKW8MaY OXUXRahwUsFpQwtSg7M1uLqpL4kbaQeBytUqs/e6UfP3mDiqsVKRT8HzFSaghlU2Je9eKBA L8ilXgCw0RL8eRIsYfkEA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> >> I don't >> >> understand cursor_row_fully_visible_p much. >> > >> > Which part of it do you not understand? >> >> Why it should return 1 in these two cases >> >> if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) >> return 1; > > If a row is _not_ partially visible, it is _fully_ visible, right? Hmmm ... yes. Unless it's completely invisible. I was probably fooled by the inverted uses of fully and partially visible. >> and >> >> if (row->height >= window_height) >> { >> if (!force_p || MINI_WINDOW_P (w) >> || w->vscroll || w->cursor.vpos == 0) >> return 1; >> } > > There's a comment that that's supposed to explain this. I don't understand the || w->vscroll || w->cursor.vpos == 0 disjuncts in the second conditional. But I presume that this case is too obscure anyway. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 15:24:47 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 19:24:47 +0000 Received: from localhost ([127.0.0.1]:54575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYK5O-0003dl-HM for submit@debbugs.gnu.org; Sun, 28 Sep 2014 15:24:46 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:40720) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYK5L-0003db-8O for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 15:24:44 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NCM00700LGG2000@mtaout27.012.net.il> for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 22:19:14 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM002D0LO2VL40@mtaout27.012.net.il>; Sun, 28 Sep 2014 22:19:14 +0300 (IDT) Date: Sun, 28 Sep 2014 22:24:30 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <54285BA0.6080205@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83mw9jmtu9.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <5427099F.6080406@gmx.at> <83tx3ssw5x.fsf@gnu.org> <5427D5F0.9050303@gmx.at> <83r3yvn1r3.fsf@gnu.org> <54285BA0.6080205@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 28 Sep 2014 21:04:00 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > I don't understand the > > || w->vscroll || w->cursor.vpos == 0 > > disjuncts in the second conditional. I think w->vscroll means the window is vscrolled, and so the fact that a row is not fully visible doesn't count (since that's what vscroll does), and w->cursor.vpos == 0 means you have a very tall row that is taller than the window, in which case it again gains us nothing to consider it not fully visible. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 15:26:08 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 19:26:08 +0000 Received: from localhost ([127.0.0.1]:54579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYK6i-0003g6-A4 for submit@debbugs.gnu.org; Sun, 28 Sep 2014 15:26:08 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:38595) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYK6f-0003fw-JM for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 15:26:06 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NCM00500LUY4F00@mtaout29.012.net.il> for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 22:25:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM00MX4LYGV260@mtaout29.012.net.il>; Sun, 28 Sep 2014 22:25:28 +0300 (IDT) Date: Sun, 28 Sep 2014 22:25:53 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <54285B85.9000007@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83lhp3mtry.fsf@gnu.org> 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> <5427D634.1070100@gmx.at> <83sijbn1xg.fsf@gnu.org> <83oatzmy5h.fsf@gnu.org> <54285B85.9000007@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 28 Sep 2014 21:03:33 +0200 > From: martin rudalics > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > > Does the patch below help? > > Works like a charm Thanks. And you say the problem it fixes is not visible on the emacs-24 branch? Or did I misunderstand? (The offending code is identical on the branch.) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 16:25:55 2014 Received: (at 18545) by debbugs.gnu.org; 28 Sep 2014 20:25:55 +0000 Received: from localhost ([127.0.0.1]:54591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYL2Z-00052j-1g for submit@debbugs.gnu.org; Sun, 28 Sep 2014 16:25:55 -0400 Received: from mout.gmx.net ([212.227.17.20]:53430) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYL2X-00052b-DX for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 16:25:54 -0400 Received: from [178.191.138.136] ([178.191.138.136]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LwW8p-1YKUt71hHz-018GLG; Sun, 28 Sep 2014 22:25:50 +0200 Message-ID: <54286ECC.7090900@gmx.at> Date: Sun, 28 Sep 2014 22:25:48 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window 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> <5426BD71.4000705@gmx.at> <83zjdlrqti.fsf@gnu.org> <83wq8prmp2.fsf@gnu.org> <54270A02.2010907@gmx.at> <83r3ywsvkv.fsf@gnu.org> <83ppegsurp.fsf@gnu.org> <5427D634.1070100@gmx.at> <83sijbn1xg.fsf@gnu.org> <83oatzmy5h.fsf@gnu.org> <54285B85.9000007@gmx.at> <83lhp3mtry.fsf@gnu.org> In-Reply-To: <83lhp3mtry.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:L9r33ybKzS2jmHc9P/ta8iiCA3077nwi+Q0/sWlNHWHW/Xhoac8 EhsxSjHfFim8QvXDwkK3r5EUQ6G/ZFUXfT/xoO9XXJAcwrFCtLqjEeq8JICBmjqtxdleo8K gAM9ulQw1SiFfCtTj4Tfbitq6/y0WkTOwHtMmxCd+t1blnIhhAKk4vxhDzvu6szJWPiUih7 03LOX4Q+CMSWflGvx6xbA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18545 Cc: lompik@voila.fr, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > And you say the problem it fixes is not visible on the emacs-24 > branch? Or did I misunderstand? (The offending code is identical on > the branch.) No. My problem is not visible on the emacs-24 branch. And now that you asked: When I turn off horizontal scroll bars, the problem is not visible on an unpatched trunk either. So the problem was introduced by the presence of horizontal scroll bars. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 20:31:10 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 00:31:10 +0000 Received: from localhost ([127.0.0.1]:54646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYOrt-0002ij-CE for submit@debbugs.gnu.org; Sun, 28 Sep 2014 20:31:09 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:42559 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYOrq-0002iY-KV for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 20:31:08 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d64 with ME id woX41o00C1zLhPN03oX4A2; Mon, 29 Sep 2014 02:31:04 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Mon, 29 Sep 2014 02:31:04 +0200 X-ME-IP: 108.79.16.77 Date: Mon, 29 Sep 2014 02:31:04 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii , rudalics@gmx.at Message-ID: <379420908.148791411950664752.JavaMail.www@wwinf7125> In-Reply-To: <83oatzmy5h.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) It still wrong scroll with all the 3 patches.I guess it is configuration sp= ecific + a call to "C-h k a".Fortunately, I had some some time to spend on = it and here's a=20 minimal example: 1. emacs -Q 2. define following settings: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;; ;; scale minibuffer font up on entering (defun my-minibuffer-setup () (set (make-local-variable 'face-remapping-alist) '((default :height 1.8)))) (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup) ;; make *Completions* buffer editable and add header line + insert "hello w= orld" as overlay (global-set-key (kbd "C-!") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (blink-cursor-mode -1) (read-only-mode 0) (goto-char 0) (let ((start (point))) (setq header-line-format (propertize "Header line appears here" 'face 'header-line)) (insert "test:") (overlay-put (make-overlay (point-at-bol) (point-at-eol)) 'display "Hello World") (insert "\n") (put-text-property start (point) 'face '(:family "Sans Serif" :foreground "black" :height 1.3 :weight bold) = ))))) ; some key-bindings to navigate *Completion* buffer from minibuffer=20 (global-set-key (kbd "C-`") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (forward-line 1)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3. hit the following key sequence: C-x C-f -> in a folder with lots of files [tab]x2 -> open completion buffer C-! -> modify completion buffer C-h k a -> Show help for letter "a" (Important ! skipping this results in n= o bug )=20 C-` until bottom of *Completions* buffer -> no scrolling, I have applied the 3 patches that you supplied on emacs bzr revno 117517. I= have tested this on 24.3.93 as well. Regards, Lompik. > Message du 28/09/14 =C3=A0 19h51 > De : "Eli Zaretskii"=20 > A : rudalics@gmx.at > Copie =C3=A0 : lompik@voila.fr, 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > Date: Sun, 28 Sep 2014 19:29:47 +0300 > > From: Eli Zaretskii=20 > > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > >=20 > > > Date: Sun, 28 Sep 2014 11:34:44 +0200 > > > From: martin rudalics=20 > > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > >=20 > > > > Hmm... I wonder why did we enter this area of the code, i.e. why di= d > > > > this condition fire: > > > > > > > > /* Handle case where place to start displaying has been specified, > > > > unless the specified location is outside the accessible range. */ > > > > if (w->force_start || window_frozen_p (w)) > > > > > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero= ? > > > > If the former, can you see where was the force_start flag set? (I'd > > > > be surprised if it's the latter, since windows are only frozen when= we > > > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > > > > > In general, if the force_start flag of a window is set, that means = we > > > > shouldn't scroll, so bringing point back into view makes sense. > > >=20 > > > That's likely me. Under certain conditions I do `recenter' with a > > > negative argument in `post-command-hook' which basically looks like > > >=20 > > > (recenter (max 0 (- (window-height) 7))) > > >=20 > > > which triggers w->force_start being set here in xdisp.c: > > >=20 > > > if (IT_CHARPOS (it) =3D=3D PT) > > > w->force_start =3D 1; > >=20 > > That's what I thought. > >=20 > > > So my case _is_ very likely special. Still "bringing point back into > > > view" shouldn't make point appear on a partially visible line. > >=20 > > No, that's likely the bug here. I will look into that. >=20 > Does the patch below help? If not, can you tell where I goofed? >=20 > =3D=3D=3D modified file 'src/xdisp.c' > --- src/xdisp.c 2014-09-25 07:01:35 +0000 > +++ src/xdisp.c 2014-09-28 17:45:22 +0000 > @@ -16179,15 +16179,21 @@ redisplay_window (Lisp_Object window, bo > && CHARPOS (startp) >=3D BEGV > && CHARPOS (startp) <=3D ZV) > { > + ptrdiff_t it_charpos; > + > w->optional_new_start =3D 0; > start_display (&it, w, startp); > move_it_to (&it, PT, 0, it.last_visible_y, -1, > MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); > - if (IT_CHARPOS (it) =3D=3D PT) > - w->force_start =3D 1; > - /* IT may overshoot PT if text at PT is invisible. */ > - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <=3D PT) > - w->force_start =3D 1; > + it_charpos =3D IT_CHARPOS (it); > + if (line_bottom_y (&it) < it.last_visible_y) > + { > + if (it_charpos =3D=3D PT) > + w->force_start =3D 1; > + /* IT may overshoot PT if text at PT is invisible. */ > + else if (it_charpos > PT && CHARPOS (startp) <=3D PT) > + w->force_start =3D 1; > + } > } >=20 > force_start: >=20 >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 02:16:42 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 06:16:42 +0000 Received: from localhost ([127.0.0.1]:54771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUGH-0002qS-HQ for submit@debbugs.gnu.org; Mon, 29 Sep 2014 02:16:41 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:45838) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUGD-0002qF-MR for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 02:16:39 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NCN00100FZXJU00@a-mtaout22.012.net.il> for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 09:16:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCN0014MG3JI120@a-mtaout22.012.net.il>; Mon, 29 Sep 2014 09:16:32 +0300 (IDT) Date: Mon, 29 Sep 2014 09:16:22 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <379420908.148791411950664752.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83iok7lznt.fsf@gnu.org> References: <379420908.148791411950664752.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: rudalics@gmx.at, 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 29 Sep 2014 02:31:04 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > C-x C-f -> in a folder with lots of files > [tab]x2 -> open completion buffer > C-! -> modify completion buffer > C-h k a -> Show help for letter "a" (Important ! skipping this results in no bug ) > C-` until bottom of *Completions* buffer -> no scrolling, > > > I have applied the 3 patches that you supplied on emacs bzr revno 117517. I have tested this on 24.3.93 as well. Thanks. This is indeed very similar to what Martin presented, i.e. forward-line moves point outside of the window, and then redisplay returns point back into the view. But since the change that fixed Martin's case doesn't fix this one, I guess some other place in the code is setting the force_start flag of the window. I will look into this. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 09:47:47 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 13:47:47 +0000 Received: from localhost ([127.0.0.1]:55057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYbIo-0006ai-EP for submit@debbugs.gnu.org; Mon, 29 Sep 2014 09:47:47 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:60141) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYbIk-0006aV-1m for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 09:47:44 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NCO00M000XFGU00@a-mtaout20.012.net.il> for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 16:47:40 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCO00M050ZF5L50@a-mtaout20.012.net.il>; Mon, 29 Sep 2014 16:47:40 +0300 (IDT) Date: Mon, 29 Sep 2014 16:47:31 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <83iok7lznt.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <83a95imtcc.fsf@gnu.org> References: <379420908.148791411950664752.JavaMail.www@wwinf7125> <83iok7lznt.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 29 Sep 2014 09:16:22 +0300 > From: Eli Zaretskii > Cc: 18545@debbugs.gnu.org > > > Date: Mon, 29 Sep 2014 02:31:04 +0200 (CEST) > > From: lompik@voila.fr > > Cc: 18545@debbugs.gnu.org > > > > C-x C-f -> in a folder with lots of files > > [tab]x2 -> open completion buffer > > C-! -> modify completion buffer > > C-h k a -> Show help for letter "a" (Important ! skipping this results in no bug ) > > C-` until bottom of *Completions* buffer -> no scrolling, > > > > > > I have applied the 3 patches that you supplied on emacs bzr revno 117517. I have tested this on 24.3.93 as well. > > Thanks. This is indeed very similar to what Martin presented, > i.e. forward-line moves point outside of the window, and then > redisplay returns point back into the view. But since the change that > fixed Martin's case doesn't fix this one, I guess some other place in > the code is setting the force_start flag of the window. > > I will look into this. It's a god-awful mess. In this use case, we enter that code not because of the force_start flag, but because of the frame's frozen_window_starts flag. That flag is set when we resize the minibuffer window, and it currently acts almost like the force_start flag. (There's a function window_frozen_p, which attempts to exempt some special windows from this "frozen-start" state, but it cannot handle this complicated case, because by the time redisplay kicks in, the fact that *Completions* was at some point displayed by the selected window is long forgotten, and its window is now just like any other one.) The best solution I can propose is in the patch below, which is a cumulative patch against the emacs-24 branch, and is supposed to fix all of these problems. It fixes this last problem by treating the frozen_window_starts flag as advisory, i.e. like we treat the optional_new_start flag of a window. Please test it. I will commit it later today (to get it into the next pretest). === modified file 'src/window.c' --- src/window.c 2014-09-11 08:47:34 +0000 +++ src/window.c 2014-09-29 06:03:36 +0000 @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and w->start_at_line_beg = (bytepos == BEGV_BYTE || FETCH_BYTE (bytepos - 1) == '\n'); + wset_redisplay (w); + set_buffer_internal (obuf); return Qnil; } === modified file 'src/xdisp.c' --- src/xdisp.c 2014-09-18 15:10:33 +0000 +++ src/xdisp.c 2014-09-29 13:13:42 +0000 @@ -15027,6 +15027,10 @@ run_window_scroll_functions (Lisp_Object If FORCE_P is non-zero, return 0 even if partial visible cursor row is higher than window. + If CURRENT_MATRIX_P is non-zero, use the information from the + window's current glyph matrix; otherwise uze the desired glyph + matrix. + A value of 0 means the caller should do scrolling as if point had gone off the screen. */ @@ -16136,26 +16140,47 @@ redisplay_window (Lisp_Object window, bo /* If someone specified a new starting point but did not insist, check whether it can be used. */ - if (w->optional_new_start + if ((w->optional_new_start || window_frozen_p (w)) && CHARPOS (startp) >= BEGV && CHARPOS (startp) <= ZV) { + ptrdiff_t it_charpos; + w->optional_new_start = 0; start_display (&it, w, startp); move_it_to (&it, PT, 0, it.last_visible_y, -1, MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); - if (IT_CHARPOS (it) == PT) - w->force_start = 1; - /* IT may overshoot PT if text at PT is invisible. */ - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT) - w->force_start = 1; + /* Record IT's position now, since line_bottom_y might change + that. */ + it_charpos = IT_CHARPOS (it); + /* Make sure we set the force_start flag only if the cursor row + will be fully visible. Otherwise, the code under force_start + label below will try to move point back into view, which is + not what the code which sets optional_new_start wants. */ + if (line_bottom_y (&it) < it.last_visible_y && !w->force_start) + { + if (it_charpos == PT) + w->force_start = 1; + /* IT may overshoot PT if text at PT is invisible. */ + else if (it_charpos > PT && CHARPOS (startp) <= PT) + w->force_start = 1; +#ifdef GLYPH_DEBUG + if (w->force_start) + { + if (window_frozen_p (w)) + debug_method_add (w, "set force_start from frozen window start"); + else + debug_method_add (w, "set force_start from optional_new_start"); + } +#endif + } } force_start: /* Handle case where place to start displaying has been specified, unless the specified location is outside the accessible range. */ - if (w->force_start || window_frozen_p (w)) + if (w->force_start) { /* We set this later on if we have to adjust point. */ int new_vpos = -1; @@ -16200,7 +16225,7 @@ redisplay_window (Lisp_Object window, bo goto need_larger_matrices; } - if (w->cursor.vpos < 0 && !window_frozen_p (w)) + if (w->cursor.vpos < 0) { /* If point does not appear, try to move point so it does appear. The desired matrix has been built above, so we @@ -16293,6 +16318,11 @@ redisplay_window (Lisp_Object window, bo } */ } + if (w->cursor.vpos < 0 || !cursor_row_fully_visible_p (w, 0, 0)) + { + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } #ifdef GLYPH_DEBUG debug_method_add (w, "forced window start"); @@ -16357,7 +16387,8 @@ redisplay_window (Lisp_Object window, bo || CHARPOS (startp) == BEGV || !window_outdated (w))) { - int d1, d2, d3, d4, d5, d6; + int d1, d2, d5, d6; + int rtop, rbot; /* If first window line is a continuation line, and window start is inside the modified region, but the first change is before @@ -16386,10 +16417,14 @@ redisplay_window (Lisp_Object window, bo doing so will move point from its correct position instead of scrolling the window to bring point into view. See bug#9324. */ - && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6)) + && pos_visible_p (w, PT, &d1, &d2, &rtop, &rbot, &d5, &d6) + && rtop == 0 && rbot == 0) { w->force_start = 1; SET_TEXT_POS_FROM_MARKER (startp, w->start); +#ifdef GLYPH_DEBUG + debug_method_add (w, "recomputed window start in continuation line"); +#endif goto force_start; } From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 10:21:48 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 14:21:48 +0000 Received: from localhost ([127.0.0.1]:55534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYbpi-0007UM-Nx for submit@debbugs.gnu.org; Mon, 29 Sep 2014 10:21:47 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:17593 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYbpe-0007U8-W7 for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 10:21:44 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d12 with ME id x2Mg1o0051zLhPN032MgWs; Mon, 29 Sep 2014 16:21:40 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Mon, 29 Sep 2014 16:21:40 +0200 X-ME-IP: 108.79.16.77 Date: Mon, 29 Sep 2014 16:21:40 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <156699050.231851412000500133.JavaMail.www@wwinf7125> In-Reply-To: <83a95imtcc.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Works great ! Thank you ! >=20 > It's a god-awful mess. In this use case, we enter that code not > because of the force_start flag, but because of the frame's > frozen_window_starts flag. That flag is set when we resize the > minibuffer window, and it currently acts almost like the force_start > flag. (There's a function window_frozen_p, which attempts to exempt > some special windows from this "frozen-start" state, but it cannot > handle this complicated case, because by the time redisplay kicks in, > the fact that *Completions* was at some point displayed by the > selected window is long forgotten, and its window is now just like any > other one.) >=20 > The best solution I can propose is in the patch below, which is a > cumulative patch against the emacs-24 branch, and is supposed to fix > all of these problems. It fixes this last problem by treating the > frozen_window_starts flag as advisory, i.e. like we treat the > optional_new_start flag of a window. >=20 > Please test it. I will commit it later today (to get it into the next > pretest). >=20 > =3D=3D=3D modified file 'src/window.c' > --- src/window.c 2014-09-11 08:47:34 +0000 > +++ src/window.c 2014-09-29 06:03:36 +0000 > @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and=20 > w->start_at_line_beg =3D (bytepos =3D=3D BEGV_BYTE || > FETCH_BYTE (bytepos - 1) =3D=3D '\n'); >=20 > + wset_redisplay (w); > + > set_buffer_internal (obuf); > return Qnil; > } >=20 > =3D=3D=3D modified file 'src/xdisp.c' > --- src/xdisp.c 2014-09-18 15:10:33 +0000 > +++ src/xdisp.c 2014-09-29 13:13:42 +0000 > @@ -15027,6 +15027,10 @@ run_window_scroll_functions (Lisp_Object > If FORCE_P is non-zero, return 0 even if partial visible cursor row > is higher than window. >=20 > + If CURRENT_MATRIX_P is non-zero, use the information from the > + window's current glyph matrix; otherwise uze the desired glyph > + matrix. > + > A value of 0 means the caller should do scrolling > as if point had gone off the screen. */ >=20 > @@ -16136,26 +16140,47 @@ redisplay_window (Lisp_Object window, bo >=20 > /* If someone specified a new starting point but did not insist, > check whether it can be used. */ > - if (w->optional_new_start > + if ((w->optional_new_start || window_frozen_p (w)) > && CHARPOS (startp) >=3D BEGV > && CHARPOS (startp) <=3D ZV) > { > + ptrdiff_t it_charpos; > + > w->optional_new_start =3D 0; > start_display (&it, w, startp); > move_it_to (&it, PT, 0, it.last_visible_y, -1, > MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); > - if (IT_CHARPOS (it) =3D=3D PT) > - w->force_start =3D 1; > - /* IT may overshoot PT if text at PT is invisible. */ > - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <=3D PT) > - w->force_start =3D 1; > + /* Record IT's position now, since line_bottom_y might change > + that. */ > + it_charpos =3D IT_CHARPOS (it); > + /* Make sure we set the force_start flag only if the cursor row > + will be fully visible. Otherwise, the code under force_start > + label below will try to move point back into view, which is > + not what the code which sets optional_new_start wants. */ > + if (line_bottom_y (&it) < it.last_visible_y && !w->force_start) > + { > + if (it_charpos =3D=3D PT) > + w->force_start =3D 1; > + /* IT may overshoot PT if text at PT is invisible. */ > + else if (it_charpos > PT && CHARPOS (startp) <=3D PT) > + w->force_start =3D 1; > +#ifdef GLYPH_DEBUG > + if (w->force_start) > + { > + if (window_frozen_p (w)) > + debug_method_add (w, "set force_start from frozen window start"); > + else > + debug_method_add (w, "set force_start from optional_new_start"); > + } > +#endif > + } > } >=20 > force_start: >=20 > /* Handle case where place to start displaying has been specified, > unless the specified location is outside the accessible range. */ > - if (w->force_start || window_frozen_p (w)) > + if (w->force_start) > { > /* We set this later on if we have to adjust point. */ > int new_vpos =3D -1; > @@ -16200,7 +16225,7 @@ redisplay_window (Lisp_Object window, bo > goto need_larger_matrices; > } >=20 > - if (w->cursor.vpos < 0 && !window_frozen_p (w)) > + if (w->cursor.vpos < 0) > { > /* If point does not appear, try to move point so it does > appear. The desired matrix has been built above, so we > @@ -16293,6 +16318,11 @@ redisplay_window (Lisp_Object window, bo > } > */ > } > + if (w->cursor.vpos < 0 || !cursor_row_fully_visible_p (w, 0, 0)) > + { > + clear_glyph_matrix (w->desired_matrix); > + goto try_to_scroll; > + } >=20 > #ifdef GLYPH_DEBUG > debug_method_add (w, "forced window start"); > @@ -16357,7 +16387,8 @@ redisplay_window (Lisp_Object window, bo > || CHARPOS (startp) =3D=3D BEGV > || !window_outdated (w))) > { > - int d1, d2, d3, d4, d5, d6; > + int d1, d2, d5, d6; > + int rtop, rbot; >=20 > /* If first window line is a continuation line, and window start > is inside the modified region, but the first change is before > @@ -16386,10 +16417,14 @@ redisplay_window (Lisp_Object window, bo > doing so will move point from its correct position > instead of scrolling the window to bring point into view. > See bug#9324. */ > - && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6)) > + && pos_visible_p (w, PT, &d1, &d2, &rtop, &rbot, &d5, &d6) > + && rtop =3D=3D 0 && rbot =3D=3D 0) > { > w->force_start =3D 1; > SET_TEXT_POS_FROM_MARKER (startp, w->start); > +#ifdef GLYPH_DEBUG > + debug_method_add (w, "recomputed window start in continuation line"); > +#endif > goto force_start; > } >=20 >=20 >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 12:49:29 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 16:49:30 +0000 Received: from localhost ([127.0.0.1]:55574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYe8e-0002eI-Mk for submit@debbugs.gnu.org; Mon, 29 Sep 2014 12:49:29 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:40379) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYe8Z-0002e6-FA for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 12:49:25 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCO00D0095T1G00@mtaout26.012.net.il> for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 19:47:27 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCO00AAK9B32H30@mtaout26.012.net.il>; Mon, 29 Sep 2014 19:47:27 +0300 (IDT) Date: Mon, 29 Sep 2014 19:49:13 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <156699050.231851412000500133.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <838ul2mkxi.fsf@gnu.org> References: <156699050.231851412000500133.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 29 Sep 2014 16:21:40 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > Works great ! Thank you ! Thanks for testing. I would actually like to commit a slightly different patch below, which should be safer, as it won't fail with very tall lines which are taller than the window in which you scroll. So if you have time, please try the patch below. I already verified that it works with all 3 of your recipes, but I understand that your real use case is with Helm, which I don't have and couldn't try. Thanks. === modified file 'src/window.c' --- src/window.c 2014-09-11 08:47:34 +0000 +++ src/window.c 2014-09-29 06:03:36 +0000 @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and w->start_at_line_beg = (bytepos == BEGV_BYTE || FETCH_BYTE (bytepos - 1) == '\n'); + wset_redisplay (w); + set_buffer_internal (obuf); return Qnil; } === modified file 'src/xdisp.c' --- src/xdisp.c 2014-09-18 15:10:33 +0000 +++ src/xdisp.c 2014-09-29 16:35:45 +0000 @@ -15027,6 +15027,10 @@ run_window_scroll_functions (Lisp_Object If FORCE_P is non-zero, return 0 even if partial visible cursor row is higher than window. + If CURRENT_MATRIX_P is non-zero, use the information from the + window's current glyph matrix; otherwise uze the desired glyph + matrix. + A value of 0 means the caller should do scrolling as if point had gone off the screen. */ @@ -16136,26 +16140,48 @@ redisplay_window (Lisp_Object window, bo /* If someone specified a new starting point but did not insist, check whether it can be used. */ - if (w->optional_new_start + if ((w->optional_new_start || window_frozen_p (w)) && CHARPOS (startp) >= BEGV && CHARPOS (startp) <= ZV) { + ptrdiff_t it_charpos; + w->optional_new_start = 0; start_display (&it, w, startp); move_it_to (&it, PT, 0, it.last_visible_y, -1, MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); - if (IT_CHARPOS (it) == PT) - w->force_start = 1; - /* IT may overshoot PT if text at PT is invisible. */ - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT) - w->force_start = 1; + /* Record IT's position now, since line_bottom_y might change + that. */ + it_charpos = IT_CHARPOS (it); + /* Make sure we set the force_start flag only if the cursor row + will be fully visible. Otherwise, the code under force_start + label below will try to move point back into view, which is + not what the code which sets optional_new_start wants. */ + if ((it.current_y == 0 || line_bottom_y (&it) < it.last_visible_y) + && !w->force_start) + { + if (it_charpos == PT) + w->force_start = 1; + /* IT may overshoot PT if text at PT is invisible. */ + else if (it_charpos > PT && CHARPOS (startp) <= PT) + w->force_start = 1; +#ifdef GLYPH_DEBUG + if (w->force_start) + { + if (window_frozen_p (w)) + debug_method_add (w, "set force_start from frozen window start"); + else + debug_method_add (w, "set force_start from optional_new_start"); + } +#endif + } } force_start: /* Handle case where place to start displaying has been specified, unless the specified location is outside the accessible range. */ - if (w->force_start || window_frozen_p (w)) + if (w->force_start) { /* We set this later on if we have to adjust point. */ int new_vpos = -1; @@ -16200,7 +16226,7 @@ redisplay_window (Lisp_Object window, bo goto need_larger_matrices; } - if (w->cursor.vpos < 0 && !window_frozen_p (w)) + if (w->cursor.vpos < 0) { /* If point does not appear, try to move point so it does appear. The desired matrix has been built above, so we @@ -16293,6 +16319,11 @@ redisplay_window (Lisp_Object window, bo } */ } + if (w->cursor.vpos < 0 || !cursor_row_fully_visible_p (w, 0, 0)) + { + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } #ifdef GLYPH_DEBUG debug_method_add (w, "forced window start"); @@ -16357,7 +16388,8 @@ redisplay_window (Lisp_Object window, bo || CHARPOS (startp) == BEGV || !window_outdated (w))) { - int d1, d2, d3, d4, d5, d6; + int d1, d2, d5, d6; + int rtop, rbot; /* If first window line is a continuation line, and window start is inside the modified region, but the first change is before @@ -16382,14 +16414,20 @@ redisplay_window (Lisp_Object window, bo && compute_window_start_on_continuation_line (w) /* It doesn't make sense to force the window start like we do at label force_start if it is already known that point - will not be visible in the resulting window, because + will not be fully visible in the resulting window, because doing so will move point from its correct position instead of scrolling the window to bring point into view. See bug#9324. */ - && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6)) + && pos_visible_p (w, PT, &d1, &d2, &rtop, &rbot, &d5, &d6) + /* A very tall row could need more than the window height, + in which case we accept that it is partially visible. */ + && (rtop != 0) == (rbot != 0)) { w->force_start = 1; SET_TEXT_POS_FROM_MARKER (startp, w->start); +#ifdef GLYPH_DEBUG + debug_method_add (w, "recomputed window start in continuation line"); +#endif goto force_start; } From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 18:56:45 2014 Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 22:56:45 +0000 Received: from localhost ([127.0.0.1]:55633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYjs4-0004O3-Qp for submit@debbugs.gnu.org; Mon, 29 Sep 2014 18:56:45 -0400 Received: from smtpout1.voila.fr ([193.252.22.125]:37920 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYjs1-0004Ns-6w for 18545@debbugs.gnu.org; Mon, 29 Sep 2014 18:56:42 -0400 Received: from wwinf7125 ([10.232.48.92]) by mwinf5d28 with ME id xAwe1o00A1zLhPN03Awe95; Tue, 30 Sep 2014 00:56:38 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Tue, 30 Sep 2014 00:56:38 +0200 X-ME-IP: 108.79.16.77 Date: Tue, 30 Sep 2014 00:56:38 +0200 (CEST) From: lompik@voila.fr To: Eli Zaretskii Message-ID: <1431677111.300361412031398151.JavaMail.www@wwinf7125> In-Reply-To: <838ul2mkxi.fsf@gnu.org> Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 18545 Cc: 18545@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: lompik@voila.fr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) I tested revno 117521. No more issues.=20 I also experimented with increased font size + tall lines (which were trunc= ated) in buffer and was unable to reproduce the issue.=20 Thanks again ! > Thanks for testing. I would actually like to commit a slightly > different patch below, which should be safer, as it won't fail with > very tall lines which are taller than the window in which you scroll. >=20 > So if you have time, please try the patch below. I already verified > that it works with all 3 of your recipes, but I understand that your > real use case is with Helm, which I don't have and couldn't try. >=20 > Thanks. >=20 > =3D=3D=3D modified file 'src/window.c' > --- src/window.c 2014-09-11 08:47:34 +0000 > +++ src/window.c 2014-09-29 06:03:36 +0000 > @@ -5897,6 +5897,8 @@ and redisplay normally--don't erase and=20 > w->start_at_line_beg =3D (bytepos =3D=3D BEGV_BYTE || > FETCH_BYTE (bytepos - 1) =3D=3D '\n'); >=20 > + wset_redisplay (w); > + > set_buffer_internal (obuf); > return Qnil; > } >=20 > =3D=3D=3D modified file 'src/xdisp.c' > --- src/xdisp.c 2014-09-18 15:10:33 +0000 > +++ src/xdisp.c 2014-09-29 16:35:45 +0000 > @@ -15027,6 +15027,10 @@ run_window_scroll_functions (Lisp_Object > If FORCE_P is non-zero, return 0 even if partial visible cursor row > is higher than window. >=20 > + If CURRENT_MATRIX_P is non-zero, use the information from the > + window's current glyph matrix; otherwise uze the desired glyph > + matrix. > + > A value of 0 means the caller should do scrolling > as if point had gone off the screen. */ >=20 > @@ -16136,26 +16140,48 @@ redisplay_window (Lisp_Object window, bo >=20 > /* If someone specified a new starting point but did not insist, > check whether it can be used. */ > - if (w->optional_new_start > + if ((w->optional_new_start || window_frozen_p (w)) > && CHARPOS (startp) >=3D BEGV > && CHARPOS (startp) <=3D ZV) > { > + ptrdiff_t it_charpos; > + > w->optional_new_start =3D 0; > start_display (&it, w, startp); > move_it_to (&it, PT, 0, it.last_visible_y, -1, > MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); > - if (IT_CHARPOS (it) =3D=3D PT) > - w->force_start =3D 1; > - /* IT may overshoot PT if text at PT is invisible. */ > - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <=3D PT) > - w->force_start =3D 1; > + /* Record IT's position now, since line_bottom_y might change > + that. */ > + it_charpos =3D IT_CHARPOS (it); > + /* Make sure we set the force_start flag only if the cursor row > + will be fully visible. Otherwise, the code under force_start > + label below will try to move point back into view, which is > + not what the code which sets optional_new_start wants. */ > + if ((it.current_y =3D=3D 0 || line_bottom_y (&it) < it.last_visible_y) > + && !w->force_start) > + { > + if (it_charpos =3D=3D PT) > + w->force_start =3D 1; > + /* IT may overshoot PT if text at PT is invisible. */ > + else if (it_charpos > PT && CHARPOS (startp) <=3D PT) > + w->force_start =3D 1; > +#ifdef GLYPH_DEBUG > + if (w->force_start) > + { > + if (window_frozen_p (w)) > + debug_method_add (w, "set force_start from frozen window start"); > + else > + debug_method_add (w, "set force_start from optional_new_start"); > + } > +#endif > + } > } >=20 > force_start: >=20 > /* Handle case where place to start displaying has been specified, > unless the specified location is outside the accessible range. */ > - if (w->force_start || window_frozen_p (w)) > + if (w->force_start) > { > /* We set this later on if we have to adjust point. */ > int new_vpos =3D -1; > @@ -16200,7 +16226,7 @@ redisplay_window (Lisp_Object window, bo > goto need_larger_matrices; > } >=20 > - if (w->cursor.vpos < 0 && !window_frozen_p (w)) > + if (w->cursor.vpos < 0) > { > /* If point does not appear, try to move point so it does > appear. The desired matrix has been built above, so we > @@ -16293,6 +16319,11 @@ redisplay_window (Lisp_Object window, bo > } > */ > } > + if (w->cursor.vpos < 0 || !cursor_row_fully_visible_p (w, 0, 0)) > + { > + clear_glyph_matrix (w->desired_matrix); > + goto try_to_scroll; > + } >=20 > #ifdef GLYPH_DEBUG > debug_method_add (w, "forced window start"); > @@ -16357,7 +16388,8 @@ redisplay_window (Lisp_Object window, bo > || CHARPOS (startp) =3D=3D BEGV > || !window_outdated (w))) > { > - int d1, d2, d3, d4, d5, d6; > + int d1, d2, d5, d6; > + int rtop, rbot; >=20 > /* If first window line is a continuation line, and window start > is inside the modified region, but the first change is before > @@ -16382,14 +16414,20 @@ redisplay_window (Lisp_Object window, bo > && compute_window_start_on_continuation_line (w) > /* It doesn't make sense to force the window start like we > do at label force_start if it is already known that point > - will not be visible in the resulting window, because > + will not be fully visible in the resulting window, because > doing so will move point from its correct position > instead of scrolling the window to bring point into view. > See bug#9324. */ > - && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6)) > + && pos_visible_p (w, PT, &d1, &d2, &rtop, &rbot, &d5, &d6) > + /* A very tall row could need more than the window height, > + in which case we accept that it is partially visible. */ > + && (rtop !=3D 0) =3D=3D (rbot !=3D 0)) > { > w->force_start =3D 1; > SET_TEXT_POS_FROM_MARKER (startp, w->start); > +#ifdef GLYPH_DEBUG > + debug_method_add (w, "recomputed window start in continuation line"); > +#endif > goto force_start; > } >=20 >=20 >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/ From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 22:38:30 2014 Received: (at 18545-done) by debbugs.gnu.org; 30 Sep 2014 02:38:30 +0000 Received: from localhost ([127.0.0.1]:55700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYnKf-0001Pe-00 for submit@debbugs.gnu.org; Mon, 29 Sep 2014 22:38:29 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:47330) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYnKZ-0001PQ-4O for 18545-done@debbugs.gnu.org; Mon, 29 Sep 2014 22:38:24 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NCP00I000C2OK00@a-mtaout23.012.net.il> for 18545-done@debbugs.gnu.org; Tue, 30 Sep 2014 05:38:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCP00I1M0NWN320@a-mtaout23.012.net.il>; Tue, 30 Sep 2014 05:38:20 +0300 (IDT) Date: Tue, 30 Sep 2014 05:38:13 +0300 From: Eli Zaretskii Subject: Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window In-reply-to: <1431677111.300361412031398151.JavaMail.www@wwinf7125> X-012-Sender: halo1@inter.net.il To: lompik@voila.fr Message-id: <831tqtn88a.fsf@gnu.org> References: <1431677111.300361412031398151.JavaMail.www@wwinf7125> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18545-done Cc: 18545-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Tue, 30 Sep 2014 00:56:38 +0200 (CEST) > From: lompik@voila.fr > Cc: 18545@debbugs.gnu.org > > I tested revno 117521. No more issues. > > I also experimented with increased font size + tall lines (which were truncated) in buffer and was unable to reproduce the issue. > > Thanks again ! OK, thanks. I'm closing this bug. From unknown Fri Jun 20 05:37:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 28 Oct 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator