From unknown Fri Jun 20 07:11:18 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#9782 <9782@debbugs.gnu.org> To: bug#9782 <9782@debbugs.gnu.org> Subject: Status: 24.0.90; move-to-window-line not taking header line into account Reply-To: bug#9782 <9782@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:11:18 +0000 retitle 9782 24.0.90; move-to-window-line not taking header line into accou= nt reassign 9782 emacs submitter 9782 David Engster severity 9782 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 08:04:47 2011 Received: (at submit) by debbugs.gnu.org; 18 Oct 2011 12:04:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RG8PX-0003RP-FZ for submit@debbugs.gnu.org; Tue, 18 Oct 2011 08:04:47 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RG8PT-0003RB-W1 for submit@debbugs.gnu.org; Tue, 18 Oct 2011 08:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG8OO-0005fg-Ha for submit@debbugs.gnu.org; Tue, 18 Oct 2011 08:03:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,FROM_12LTRDOM, RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:53913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8OO-0005fS-BH for submit@debbugs.gnu.org; Tue, 18 Oct 2011 08:03:36 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8OI-00071A-E0 for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 08:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG8OH-0005dh-3T for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 08:03:30 -0400 Received: from randomsample.de ([83.169.19.17]:34501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8OG-0005cL-R0 for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 08:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=PLvN+HUL41j09wcV/SKXAxPJRDBA0xaaVVtSq1/OtkE=; b=Z2mxaxPwDt/vkbO7CSv2dpi3phWNfBAr8SnQ69JpRHfWfVj+UsIEwrKRAax2lIRrrVJFiz6FQtPq4eiTmEeM1OjTV2lcC1uAvCI3JxHlqeg9oTZdWrny1YrVCvEDKulf; Received: from ibookg4-c2.pc.gwdg.de ([134.76.4.219]) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RG8O8-0003V9-1l for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 14:03:20 +0200 From: David Engster To: bug-gnu-emacs@gnu.org Subject: 24.0.90; move-to-window-line not taking header line into account Date: Tue, 18 Oct 2011 14:03:13 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) Recipe: * emacs -Q * Enter in scratch buffer: (move-to-window-line (cdr (posn-actual-col-row (posn-at-point)))) and enter an additional newline so this is not the last line in the buffer. * Move behind last bracket an hit C-x C-e * Cursor will move to beginning of line, as expected. * Now do M-: (setq header-line-format "") RET * Evaluate the above again. You'll see that cursor now will move to the beginning of the next line, which is wrong. This behavior occurs since rev. 106022, which fixed posn-actual-col-row when a header-line is active, but it seems move-to-window-line now has to be fixed as well. Cheers, David From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 10:01:15 2011 Received: (at 9782) by debbugs.gnu.org; 18 Oct 2011 14:01:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGAEF-0006Hk-7L for submit@debbugs.gnu.org; Tue, 18 Oct 2011 10:01:15 -0400 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGAEB-0006Hc-F8 for 9782@debbugs.gnu.org; Tue, 18 Oct 2011 10:01:13 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RGADD-0008JI-Ht; Tue, 18 Oct 2011 10:00:11 -0400 Date: Tue, 18 Oct 2011 10:00:11 -0400 Message-Id: From: Eli Zaretskii To: David Engster In-reply-to: (message from David Engster on Tue, 18 Oct 2011 14:03:13 +0200) Subject: Re: bug#9782: 24.0.90; move-to-window-line not taking header line into account References: X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9782 Cc: 9782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: David Engster > Date: Tue, 18 Oct 2011 14:03:13 +0200 > > Recipe: > > * emacs -Q > > * Enter in scratch buffer: > > (move-to-window-line (cdr (posn-actual-col-row (posn-at-point)))) > > and enter an additional newline so this is not the last line in the buffer. > > * Move behind last bracket an hit C-x C-e > > * Cursor will move to beginning of line, as expected. > > * Now do M-: (setq header-line-format "") RET > > * Evaluate the above again. You'll see that cursor now will move to the > beginning of the next line, which is wrong. > > > This behavior occurs since rev. 106022, which fixed posn-actual-col-row > when a header-line is active, but it seems move-to-window-line now has > to be fixed as well. Please provide some arguments as to why the current behavior is wrong. posn-actual-col-row returns a _row_ derived from a pixel position, while move-to-window-line accepts a _line_number_ starting from the beginning of the text displayed in the window. These two are not the same. Unless I'm mistaken, I see many users of move-to-window-line that would break if we make the change you suggest. E.g., what will happen to code that does this: (move-to-window-line 0) when there's a header line in the buffer, if your suggestion is implemented? Put it another way, the posn-* family of function deals with mouse events, which are inherently oblivious to where text is displayed and where we have window decorations. By contrast, move-to-window-line belongs to a different family of functions, one that deals with lines of text. Please show where this reasoning is wrong. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 10:24:47 2011 Received: (at 9782) by debbugs.gnu.org; 18 Oct 2011 14:24:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGAb0-0006o2-R4 for submit@debbugs.gnu.org; Tue, 18 Oct 2011 10:24:47 -0400 Received: from randomsample.de ([83.169.19.17]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGAax-0006nr-0U for 9782@debbugs.gnu.org; Tue, 18 Oct 2011 10:24:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=m73NlHFdxJhK2ZxXemE47xAQ6a8wXZ1cXaGNN1HWT8Q=; b=ISmxZi7ceKkzrsR6ZSubl4XX0+/Raz9Smx49Ly8VAQ1tM/Ilm2L3KNa4IOarcS/7Xg9eQM0Vja6Ue5P6Bw+SPFxJzmWOvAxfTscjxkt10GlyqL6dUbtYZ1KA3Zyg0Ko3; Received: from ibookg4-c2.pc.gwdg.de ([134.76.4.219]) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RGAa0-0000tW-3R; Tue, 18 Oct 2011 16:23:44 +0200 From: David Engster To: Eli Zaretskii Subject: Re: bug#9782: 24.0.90; move-to-window-line not taking header line into account In-Reply-To: (Eli Zaretskii's message of "Tue, 18 Oct 2011 10:00:11 -0400") References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (darwin) Date: Tue, 18 Oct 2011 16:23:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 9782 Cc: 9782@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) Eli Zaretskii writes: >> From: David Engster >> Date: Tue, 18 Oct 2011 14:03:13 +0200 >> > >> Recipe: >> >> * emacs -Q >> >> * Enter in scratch buffer: >> >> (move-to-window-line (cdr (posn-actual-col-row (posn-at-point)))) >> >> and enter an additional newline so this is not the last line in the buffer. >> >> * Move behind last bracket an hit C-x C-e >> >> * Cursor will move to beginning of line, as expected. >> >> * Now do M-: (setq header-line-format "") RET >> >> * Evaluate the above again. You'll see that cursor now will move to the >> beginning of the next line, which is wrong. >> >> >> This behavior occurs since rev. 106022, which fixed posn-actual-col-row >> when a header-line is active, but it seems move-to-window-line now has >> to be fixed as well. > > Please provide some arguments as to why the current behavior is wrong. > > posn-actual-col-row returns a _row_ derived from a pixel position, > while move-to-window-line accepts a _line_number_ starting from the > beginning of the text displayed in the window. These two are not the > same. Unless I'm mistaken, I see many users of move-to-window-line > that would break if we make the change you suggest. E.g., what will > happen to code that does this: > > (move-to-window-line 0) > > when there's a header line in the buffer, if your suggestion is > implemented? Yes, this would be wrong, obviously. > Put it another way, the posn-* family of function deals with mouse > events, which are inherently oblivious to where text is displayed and > where we have window decorations. By contrast, move-to-window-line > belongs to a different family of functions, one that deals with lines > of text. > > Please show where this reasoning is wrong. I can't. My report was motivated by seeing that the tooltip display of company-mode (currently in ELPA) broke due to the change in posn-actual-col-row. Company-mode happens to depend on the above test case, that means it first determines the actual row at point, moves to (1+ row) through move-to-window-line and then displays the overlay there. I don't know why it chooses this way to do this, but it has worked for years, so I figured move-to-window-line has to be fixed. If this new behavior is the correct one, then please close this report and I will send a bug report to the author of company-mode. Thanks, David From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 12:02:33 2011 Received: (at 9782-done) by debbugs.gnu.org; 18 Oct 2011 16:02:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGC7c-0000dv-2B for submit@debbugs.gnu.org; Tue, 18 Oct 2011 12:02:32 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGC7Y-0000di-Kn for 9782-done@debbugs.gnu.org; Tue, 18 Oct 2011 12:02:30 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LT900M00R2Z8E00@a-mtaout20.012.net.il> for 9782-done@debbugs.gnu.org; Tue, 18 Oct 2011 18:00:40 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LT900MFQR528G00@a-mtaout20.012.net.il>; Tue, 18 Oct 2011 18:00:38 +0200 (IST) Date: Tue, 18 Oct 2011 18:00:39 +0200 From: Eli Zaretskii Subject: Re: bug#9782: 24.0.90; move-to-window-line not taking header line into account In-reply-to: X-012-Sender: halo1@inter.net.il To: David Engster Message-id: <83mxcyuw60.fsf@gnu.org> References: X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 9782-done Cc: 9782-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: David Engster > Cc: 9782@debbugs.gnu.org > Date: Tue, 18 Oct 2011 16:23:37 +0200 > > My report was motivated by seeing that the tooltip display of > company-mode (currently in ELPA) broke due to the change in > posn-actual-col-row. Company-mode happens to depend on the above test > case, that means it first determines the actual row at point, moves to > (1+ row) through move-to-window-line and then displays the overlay > there. I don't know why it chooses this way to do this, but it has > worked for years, so I figured move-to-window-line has to be fixed. If > this new behavior is the correct one, then please close this report and > I will send a bug report to the author of company-mode. I'm closing the bug report. My opinion is that company-mode should either change the way it computes the line to move to, or account for the header-line itself (e.g., by looking at the value of header-line-format). If the author of that package disagrees, I suggest that he or she starts a discussion on emacs-devel. Thanks. From unknown Fri Jun 20 07:11:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Nov 2011 12:24:04 +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