From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: Tab-line breaks windows of follow-mode Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Nov 2021 18:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 51590@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16359640775190 (code B ref -1); Wed, 03 Nov 2021 18:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Nov 2021 18:27:57 +0000 Received: from localhost ([127.0.0.1]:41184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miKzN-0001Ld-JP for submit@debbugs.gnu.org; Wed, 03 Nov 2021 14:27:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:49194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miKzL-0001LW-RH for submit@debbugs.gnu.org; Wed, 03 Nov 2021 14:27:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miKzL-0001ls-Ld for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 14:27:55 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:36593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miKzH-0004JD-FQ for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 14:27:55 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6E9C9FF80A for ; Wed, 3 Nov 2021 18:27:48 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET Date: Wed, 03 Nov 2021 20:24:18 +0200 Message-ID: <86bl31xfl9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.6 (--) In emacs -Q visit a long buffer, split the window horizontally, and enable 'M-x follow-mode'. A partially-visible bottom line of the left window will help to observe that the same line is completely visible at the top of the right window. This is a nice feature that allows follow-mode to work correctly. Now enable 'M-x global-tab-line-mode' and observe that the same line is still visible at the top of the right window, whereas the bottom line of the left window shows another partially-visible line. This is a bug. The most low-level function of follow-mode is follow-calc-win-end. When global-tab-line-mode is enabled, follow-calc-win-end returns the same values as when global-tab-line-mode is disabled. I don't understand what more low-level function doesn't take into account the height of the tab-line. Maybe the problem is in pos-visible-in-window-p? Or maybe different values returned by window-inside-pixel-edges and window-end? From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: Tab-line breaks windows of follow-mode Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Nov 2021 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16359645486250 (code B ref 51590); Wed, 03 Nov 2021 18:36:02 +0000 Received: (at 51590) by debbugs.gnu.org; 3 Nov 2021 18:35:48 +0000 Received: from localhost ([127.0.0.1]:41215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miL6y-0001ck-8L for submit@debbugs.gnu.org; Wed, 03 Nov 2021 14:35:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miL6w-0001cU-7p for 51590@debbugs.gnu.org; Wed, 03 Nov 2021 14:35:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miL6q-0005oc-2f; Wed, 03 Nov 2021 14:35:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=04h72p67V8z8gBTPJw+MlQRa58iHgU8mYE9C2EE6aFw=; b=WdTo6qrVBW5F onApvO2RWs4v1SA5GcjH0KmnJqgMi4DIXAp7VjI7qcXRM1cch11JJd+4bkpefuN6IC4zREHjevB5O TDE5l292UJBN095x2+/gBVyK+WF0fxNQ25caqHNlrbUXAXnndEdr8QrQaTcDc9BfIpNZXKKgfk3Zy fzkMlBQGvHzznD6tEcmDTmOGhGaVVRp/gVroWiYpMMfaSJFyxqNyHmxBUkJZolcMa9idwrqGvzeOQ tcYYtIcJqCb1W88VKuNVgAePMT0Z7RhASPk8FfN5d5lohjnqkfsB7z6AjSx1wkIEooNQZQVPb5D+U favw0R1KBT/P8DMcjRh+VA==; Received: from [87.69.77.57] (port=3646 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miL6o-0005E4-BJ; Wed, 03 Nov 2021 14:35:39 -0400 Date: Wed, 03 Nov 2021 20:35:36 +0200 Message-Id: <83h7ctgk93.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86bl31xfl9.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 03 Nov 2021 20:24:18 +0200) References: <86bl31xfl9.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Juri Linkov > Date: Wed, 03 Nov 2021 20:24:18 +0200 > > The most low-level function of follow-mode is follow-calc-win-end. > When global-tab-line-mode is enabled, follow-calc-win-end > returns the same values as when global-tab-line-mode is disabled. Can you step through that function and see which part is misbehaving there? > I don't understand what more low-level function doesn't take > into account the height of the tab-line. Maybe the problem is > in pos-visible-in-window-p? Or maybe different values returned > by window-inside-pixel-edges and window-end? I don't know the answer, but I see that header-line-format is mentioned in one place in follow.el, and that is not a good sign... From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 17:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16360474905671 (code B ref 51590); Thu, 04 Nov 2021 17:39:01 +0000 Received: (at 51590) by debbugs.gnu.org; 4 Nov 2021 17:38:10 +0000 Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miggk-0001TO-2I for submit@debbugs.gnu.org; Thu, 04 Nov 2021 13:38:10 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:47977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miggT-0001S1-RS; Thu, 04 Nov 2021 13:38:08 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id EF6D6200003; Thu, 4 Nov 2021 17:37:46 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> Date: Thu, 04 Nov 2021 19:29:28 +0200 In-Reply-To: <83h7ctgk93.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 Nov 2021 20:35:36 +0200") Message-ID: <86pmrf3l9m.fsf_-_@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) --=-=-= Content-Type: text/plain retitle 51590 follow-mode is broken with header-line and tab-line quit >> The most low-level function of follow-mode is follow-calc-win-end. >> When global-tab-line-mode is enabled, follow-calc-win-end >> returns the same values as when global-tab-line-mode is disabled. > > Can you step through that function and see which part is misbehaving > there? > >> I don't understand what more low-level function doesn't take >> into account the height of the tab-line. Maybe the problem is >> in pos-visible-in-window-p? Or maybe different values returned >> by window-inside-pixel-edges and window-end? > > I don't know the answer, but I see that header-line-format is > mentioned in one place in follow.el, and that is not a good sign... Indeed, I tested with the header-line, and it has the same problem, so retitled this bug report. After trial and error, I arrived to the following patch that completely fixes these problems. However, I can't explain how it works. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=follow-line-height.patch diff --git a/lisp/follow.el b/lisp/follow.el index b64f4cb734..327c66d5ff 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -679,6 +679,7 @@ follow-scroll-down (goto-char start) (vertical-motion (- (- (window-height win) (if header-line-format 2 1) + (if tab-line-format 2 1) next-screen-context-lines))) (set-window-start win (point)) (goto-char start) @@ -946,8 +947,10 @@ follow-calc-win-end used." (let* ((win (or win (selected-window))) (edges (window-inside-pixel-edges win)) - (ht (- (nth 3 edges) (nth 1 edges))) - (last-line-pos (posn-point (posn-at-x-y 0 (1- ht) win)))) + (ht (+ (- (nth 3 edges) (nth 1 edges)) + (window-header-line-height win) + (window-tab-line-height win))) + (last-line-pos (posn-point (posn-at-x-y 0 (- ht 1) win)))) (if (pos-visible-in-window-p last-line-pos win) (let ((end (window-end win t))) (list end (pos-visible-in-window-p (point-max) win))) --=-=-=-- From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Alan Mackenzie Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163605162020242 (code B ref 51590); Thu, 04 Nov 2021 18:47:02 +0000 Received: (at 51590) by debbugs.gnu.org; 4 Nov 2021 18:47:00 +0000 Received: from localhost ([127.0.0.1]:43520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihlM-0005GB-B5 for submit@debbugs.gnu.org; Thu, 04 Nov 2021 14:47:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihlJ-0005A8-U8 for 51590@debbugs.gnu.org; Thu, 04 Nov 2021 14:46:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mihlD-0001TY-Kq; Thu, 04 Nov 2021 14:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=870vPQrqlz2Mi+ODqH0Ma7HfKyUZezM5ikJJ/NMH5C0=; b=WRfncgoO4UQV ta7qPWYn0MHtf1qkxs0iwn76IOakhW1pjk8yhPIR6ZqgGWqfbjm2AdhbdPFfEKJF9J0zCyg/sevrX PefFYRyjYaaSLLAC8L2eZTc7Sk/nnrRsYA6hcs2Pj8ps2n2NXHbe6AC/KgtrvJniRTwY+PAcTdva6 0hFz17FrYWFNsC4dXiBHUHr4f/KDD//xu6EpXvhivZwq39Z1ASKeg71EkCaxazPRm3KDI+eQ+o9uc sfjzZF3a4vjjA+Pzr0N2F+v0QDrJ+VksMYDfKOqK7rMsgUwN6ncNG81Tl01e3p7trrAuhSXYDNzjm v7w7cpgj+KAM26ZAn9npDA==; Received: from [87.69.77.57] (port=4898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mihlD-0004kF-6H; Thu, 04 Nov 2021 14:46:51 -0400 Date: Thu, 04 Nov 2021 20:46:45 +0200 Message-Id: <835yt7g3my.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86pmrf3l9m.fsf_-_@mail.linkov.net> (message from Juri Linkov on Thu, 04 Nov 2021 19:29:28 +0200) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Juri Linkov > Cc: 51590@debbugs.gnu.org > Date: Thu, 04 Nov 2021 19:29:28 +0200 > > After trial and error, I arrived to the following patch that completely > fixes these problems. However, I can't explain how it works. Alan, any comments? From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Eli Zaretskii Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163605196723106 (code B ref 51590); Thu, 04 Nov 2021 18:53:02 +0000 Received: (at 51590) by debbugs.gnu.org; 4 Nov 2021 18:52:47 +0000 Received: from localhost ([127.0.0.1]:43563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihqx-00060b-BX for submit@debbugs.gnu.org; Thu, 04 Nov 2021 14:52:47 -0400 Received: from mout.gmx.net ([212.227.15.19]:39985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihqv-00060O-PL for 51590@debbugs.gnu.org; Thu, 04 Nov 2021 14:52:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636051959; bh=nC6w5wqmOphcLHtKXGH4yULZcUZDMOcAkALTuU3UPKM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=OMyqrojS8etaiekniiyekxrIx/e5azFqgWOqkud0OpQECFuu8RuzHVVZDsnQQHohd vhx8UPQBeEEpts0IIxUMGzmAZFKOvzli+5qyJfSh5/zBZzJHxXUzpJyHheWQC1mP1T Qjdurw59QtLwUgv9Lx2i7RJcNA6UixfID+tmt++s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.102] ([213.142.97.76]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfYPi-1mGFmo0wmG-00g1BN; Thu, 04 Nov 2021 19:52:38 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> From: martin rudalics Message-ID: Date: Thu, 4 Nov 2021 19:52:33 +0100 MIME-Version: 1.0 In-Reply-To: <86pmrf3l9m.fsf_-_@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:H19qSvmgB7qGuvqRVHppn9LeTjA6D8lMLKJ1GITupaZH+F6s15j wMrh5SBrEy3HeS4MzWJJuLEgAqQNxzC2vaXTtx9xl/ECIIatbfLQIdQldc/c57SgSPfT3N+ Niniw4lgLt76PCimOQpqzzvy0GuP1aJOU0ChYjF6x+YnBb39+A59cEailWq1+2+d2dz0z4K a9SvAPzCjbzF30PIYkY3w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:a3s/Rm5gqCc=:UVeMdb54zHYcwv2I/HGmUu lUB/5Al8rkiHkwQqj/S/PLC1pR2ZtzfZoUsfiEQM8FW/FW7KFEgHyt3IIy/tgfoN+hokfRMb1 yUQBZA3heCthBiwTWO6RBS6FE6KLUZ6kt1y2TcAZ9Rohut0eaRUrSEJBBo/3P1q75tmWeDICU 3WQLVGDkQoc+2IEOxNCPW0uTuvHoemrySWB1xsK1kQMFq5Q1HPJQiISaLSPW0curh/0hr4YPe rlR3kXu0vIg9UYRg3Z8hBQSFi6LqxaIu774SJ+XFN3mQM9ex8/0X3P8r7PdcMFt7YmzoiQ5It SG2BYFKpfuN0ViL2HKmFTts/jvBrZs5ASeBOk4ZkpcnL0h8AJmbpa4w1zUN8Qv7Bnfb61dtGg quLRTLMCYIu/Cz9V0ETk7f4//eY/TkBiQSxAoRMQl66s9y/5XB5E9WEVto0u/l5a8aWd1NoAb 6pegLu4Uxt502H/H8LBWohjBDaUfh6vlCkhG8E9nSX2HQKfWZ2Rdws9abLuyEj2XiY2FgH9Nw g8DL1CrCf0LkpOtPQJBhlfKnRbl8wdH0XX+94MoUEqIesFxobGTaEoF+dfzB2zpXT39pVJMgF fM5/eEzhrgaGJqKKokiebevoav/C2jCApFZdI6dA/S7yWLuwG8q7H3mb1bFJsVcZLvRTglkeF qfA79xUa5/ur8QgVSRNp/9OpmWLy73W3izRnw0+u6CmTHpM8ZLiPPBHQWAsMcGw7R5+A7GCgi 5AudSt6JK9pDFD0GCvHxoLo78zxcoXJmpywUv0Zt7yCXcoZT5aFYlKY/kEKsrbCoS+gSLAkk6 PFa3S96H7cRqqLkPUmEmLqfphiCAkLlHG03/0q7xF8px7Zuy7nGQfJe5lV/aS4i1nwmxtOCt4 WcrVMRUEVX9/35R2vleuBO2z4I+8kIrNJHnEuTJ2279XnrN2YBjK2fdgLULIhaH0rVUOJBhgt x6+QQpOgoeNzzLVg9wxUXUg6XQsvCqyf4xsJ3QCAYwsGxF870wxw8cnkwGzPlxQeidH1ACDh8 /XjP3iOHq0H1wuAt6XAydVbMtmn8HjUu6t96jzOV1R4n3b5npXwRqQ+2ayLKgxB4B/H7N/1FI 3XwnyI5VNxwseY= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) MHO.> After trial and error, I arrived to the following patch that completely > fixes these problems. However, I can't explain how it works. I didn't try but suppose it's still broken with a horizontal scroll bar, high mode lines, remapped faces and the like. This is mostly suited for TTYs I think. martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 19:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51590@debbugs.gnu.org, Juri Linkov Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163605279424540 (code B ref 51590); Thu, 04 Nov 2021 19:07:01 +0000 Received: (at 51590) by debbugs.gnu.org; 4 Nov 2021 19:06:34 +0000 Received: from localhost ([127.0.0.1]:43596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mii4I-0006Nk-FR for submit@debbugs.gnu.org; Thu, 04 Nov 2021 15:06:34 -0400 Received: from colin.muc.de ([193.149.48.1]:18507 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mii4H-0006NY-0Z for 51590@debbugs.gnu.org; Thu, 04 Nov 2021 15:06:33 -0400 Received: (qmail 96274 invoked by uid 3782); 4 Nov 2021 19:06:27 -0000 Received: from acm.muc.de (p4fe15967.dip0.t-ipconnect.de [79.225.89.103]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 04 Nov 2021 20:06:26 +0100 Received: (qmail 7944 invoked by uid 1000); 4 Nov 2021 19:06:26 -0000 Date: Thu, 4 Nov 2021 19:06:26 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <835yt7g3my.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Eli and Juri. On Thu, Nov 04, 2021 at 20:46:45 +0200, Eli Zaretskii wrote: > > From: Juri Linkov > > Cc: 51590@debbugs.gnu.org > > Date: Thu, 04 Nov 2021 19:29:28 +0200 > > After trial and error, I arrived to the following patch that completely > > fixes these problems. However, I can't explain how it works. > Alan, any comments? I'll have a look. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Nov 2021 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16360981644976 (code B ref 51590); Fri, 05 Nov 2021 07:43:01 +0000 Received: (at 51590) by debbugs.gnu.org; 5 Nov 2021 07:42:44 +0000 Received: from localhost ([127.0.0.1]:44741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mits3-0001IC-RS for submit@debbugs.gnu.org; Fri, 05 Nov 2021 03:42:43 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:43749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mits2-0001Hx-I7 for 51590@debbugs.gnu.org; Fri, 05 Nov 2021 03:42:43 -0400 Received: by mail-pg1-f182.google.com with SMTP id b4so7703093pgh.10 for <51590@debbugs.gnu.org>; Fri, 05 Nov 2021 00:42:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=8ZwK3C1EDHVkaUIJQBU8azFt97gWnpN1fel5j5RO2Lw=; b=P690o/sX4w/fTqj6kh25TAlzHDOMxKzLFbh++JsH7aDaT1Q3vPUm83v8v60iHnV8n0 McPX1ccs1E+l1SBYtfa9HGcdR50MM8ulM12+f6m2y/BLSlL3ckTt/gP5127tUm5/5b7K TJ5c67iP6oB57/znID36yskO/dfh5bNasg3TOXWCe4RLo53F+K3xRxRWe2YKMGs1QX/1 auqWi7mbIcIWaYEZrXM9rRTPsjow8zhYBtPxRAn/wZSJiLg9hGZDxYkgy0qnXox29cYU Nx9t5TqKrE9n8sqdGdr97Xn3P99JuvfmF7QOGMX3VZLtq5Dq1/ri6ya/ywFP2suexeKj 2XsQ== X-Gm-Message-State: AOAM533BxfYQsLPQTSs0f36qAOlBhYP1H83NexCh3durDH4neqSF7bcp Wb45RBa8Pw5YAwsBMil/rWwnhXgWUZLAZIjh4Lo= X-Google-Smtp-Source: ABdhPJwv9ZFNLLUc9tDVbGVt8pOk5RMhNXhxGkH6kunOVRKWUGf4aLtKw7k3t5ObBaA0P8h4aUhHNXJt51w/0O821AI= X-Received: by 2002:a63:86c1:: with SMTP id x184mr33823964pgd.114.1636098156694; Fri, 05 Nov 2021 00:42:36 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 5 Nov 2021 00:42:36 -0700 From: Stefan Kangas In-Reply-To: <86bl31xfl9.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 03 Nov 2021 20:24:18 +0200") References: <86bl31xfl9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Fri, 5 Nov 2021 00:42:36 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) Juri Linkov writes: > Now enable 'M-x global-tab-line-mode' and observe that > the same line is still visible at the top of the right window, > whereas the bottom line of the left window shows another > partially-visible line. This is a bug. Could this be related to Bug#47498? From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Nov 2021 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163610619518007 (code B ref 51590); Fri, 05 Nov 2021 09:57:02 +0000 Received: (at 51590) by debbugs.gnu.org; 5 Nov 2021 09:56:35 +0000 Received: from localhost ([127.0.0.1]:44856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mivxb-0004gN-If for submit@debbugs.gnu.org; Fri, 05 Nov 2021 05:56:35 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:54519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mivxY-0004g7-LU for 51590@debbugs.gnu.org; Fri, 05 Nov 2021 05:56:33 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id E7073240004; Fri, 5 Nov 2021 09:56:24 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <86bl31xfl9.fsf@mail.linkov.net> Date: Fri, 05 Nov 2021 10:55:32 +0200 In-Reply-To: (Stefan Kangas's message of "Fri, 5 Nov 2021 00:42:36 -0700") Message-ID: <86ilx7ylsj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> Now enable 'M-x global-tab-line-mode' and observe that >> the same line is still visible at the top of the right window, >> whereas the bottom line of the left window shows another >> partially-visible line. This is a bug. > > Could this be related to Bug#47498? Indeed, this is the same problem fixed by the same proposed patch. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Nov 2021 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163610731619864 (code B ref 51590); Fri, 05 Nov 2021 10:16:02 +0000 Received: (at 51590) by debbugs.gnu.org; 5 Nov 2021 10:15:16 +0000 Received: from localhost ([127.0.0.1]:44906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miwFf-0005AJ-Nr for submit@debbugs.gnu.org; Fri, 05 Nov 2021 06:15:15 -0400 Received: from mail-pg1-f171.google.com ([209.85.215.171]:35357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miwFd-00059v-I0 for 51590@debbugs.gnu.org; Fri, 05 Nov 2021 06:15:13 -0400 Received: by mail-pg1-f171.google.com with SMTP id p17so8004441pgj.2 for <51590@debbugs.gnu.org>; Fri, 05 Nov 2021 03:15:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=h9Ij3DS3Qg2ggUMRZlyyYmEeDA1WS6Kyd2ywXUBsA9A=; b=LodSieYBs9e/pNgKjU5z+zQ52jIIv0xvsRlH1ffjlfnEkaHQ23LA8JyXSEfi3D2TtI rgDoc6VD3LrHz/UoqdOIrz3MYARX8qZh915nnMp5sDfv6a8AI5AIoq0Tr8d1oE47QkaK hoWACBh5CBRxWDhL1hJKxKP9r/BO4BvRjX7wt6yp8dvhCRPOu9IUR5bePF5xWHOMPQnx naEFsl9//89+eaRCZox4njgKcklz5lF6uJa5Et2heeKIwKz/cfsPNGY3Q2kXFLlCfLY3 Imx613wOtM5d0rGfY33Pqu8zEV4LJD776L2/zm+amkV7YeNeEPO/fY01pfp/7Arwat4k lRPA== X-Gm-Message-State: AOAM5324C34yltuJ90cMzvu7v65J0a3orpqDPczoJSNrs95tE0/YvpJD hsU7/F8swHmaFjYOQ3+sLmdaQVyuQwmkcW/5mhg= X-Google-Smtp-Source: ABdhPJwFNbtlCQhYw7H1sFWI2jkFffaSc725CNy8BsVPYfK52oJLlNY0BxvwlIiVRpvP6pMRkcFJib/H+GhHZ3t6Nr4= X-Received: by 2002:a63:330f:: with SMTP id z15mr43784880pgz.42.1636107307889; Fri, 05 Nov 2021 03:15:07 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 5 Nov 2021 03:15:07 -0700 From: Stefan Kangas In-Reply-To: <86ilx7ylsj.fsf@mail.linkov.net> References: <86bl31xfl9.fsf@mail.linkov.net> <86ilx7ylsj.fsf@mail.linkov.net> MIME-Version: 1.0 Date: Fri, 5 Nov 2021 03:15:07 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) merge 47498 51590 thanks Juri Linkov writes: >> Could this be related to Bug#47498? > > Indeed, this is the same problem fixed by the same proposed patch. Thanks, I'm merging the bugs. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Nov 2021 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51590@debbugs.gnu.org, Juri Linkov Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163614874018093 (code B ref 51590); Fri, 05 Nov 2021 21:46:02 +0000 Received: (at 51590) by debbugs.gnu.org; 5 Nov 2021 21:45:40 +0000 Received: from localhost ([127.0.0.1]:47491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj71o-0004hk-EW for submit@debbugs.gnu.org; Fri, 05 Nov 2021 17:45:40 -0400 Received: from colin.muc.de ([193.149.48.1]:60383 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mj71m-0004hX-Lx for 51590@debbugs.gnu.org; Fri, 05 Nov 2021 17:45:39 -0400 Received: (qmail 67536 invoked by uid 3782); 5 Nov 2021 21:45:32 -0000 Received: from acm.muc.de (p4fe15881.dip0.t-ipconnect.de [79.225.88.129]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 05 Nov 2021 22:45:32 +0100 Received: (qmail 5233 invoked by uid 1000); 5 Nov 2021 21:45:32 -0000 Date: Fri, 5 Nov 2021 21:45:32 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <835yt7g3my.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Eli and Juri. On Thu, Nov 04, 2021 at 20:46:45 +0200, Eli Zaretskii wrote: > > From: Juri Linkov > > Cc: 51590@debbugs.gnu.org > > Date: Thu, 04 Nov 2021 19:29:28 +0200 > > After trial and error, I arrived to the following patch that completely > > fixes these problems. However, I can't explain how it works. > Alan, any comments? Yes. There's a bug in posn-at-x-y, in that either the function or the documentation is wrong. The doc says, rather unhelpfully, "By default, X and Y are relative to [the] text area of the selected window.". What does "[the] text area" mean? In other places, it means the same as "the body" of a window, which is the area of text not including the mode line, header line or tab-bar line. In posn-at-x-y, "the text area" _INCLUDES_ THE HEADER LINE. This can be verified, in a GUI Emacs with M-: (posn-point (posn-at-x-y 0 18)) ^^ This returns the buffer position of the earliest character in the window. The "18" means 18 pixels after the top of the header line. Surely it ought to mean 18 pixels after the top of the first buffer line in the window, i.e. the second window line. This is a bug. It has unfortunate consequences in (the current) follow-calc-win-end: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun follow-calc-win-end (&optional win) "Calculate the end position for window WIN. Return (END-POS END-OF-BUFFER). Actually, the position returned is the start of the line after the last fully-visible line in WIN. END-OF-BUFFER is t when EOB is fully-visible in WIN. If WIN is nil, the selected window is used." (let* ((win (or win (selected-window))) (edges (window-inside-pixel-edges win)) (ht (- (nth 3 edges) (nth 1 edges))) <======= 1 (last-line-pos (posn-point (posn-at-x-y 0 (1- ht) win)))) <== 2 (if (pos-visible-in-window-p last-line-pos win) <======= 3 (let ((end (window-end win t))) (list end (pos-visible-in-window-p (point-max) win))) (list last-line-pos nil)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At 1, ht "the height" is the height of the "body" of the window, i.e. all lines not including the header-line or mode-line. At 2, posn-point intends to find the bottom pixel in the text part of the window. If there is a partial line there, posn-at-x-y will be in the partial line, otherwise it will be in the last line of the window. last-line-pos is the buffer position of whichever line that was. At 3, pos-visible-in-window-p will return nil for the partial line or t for the full line. In the nil case, the function result is the partial line, in the t case, it's (window-end ...). This is all well and good. But because of the bug in posn-at-x-y, when there's a partial line there, at 2 last-line-pos is set one line too far towards point-max. Thus, at 3, pos-visible-in-window-p spuriously returns t. (window-end) now returns the line after the partial line, which is wrong. It would appear this behaviour of posn-at-x-y is also in Emacs 27.2. It would probably be catastrophic to fix posn-at-x-y, since so many programs will have compensated for this bug. So, we should probably fix the doc of the function. But we can fix follow-calc-win-end, by replacing the form at 2 with: (last-line-pos (posn-point (+ (posn-at-x-y 0 (1- ht) win) (window-header-line-height win)))) And I think we (probably me ;-) should go through the elisp manual and doc strings replacing vague phrases like "the text area of the window" with explicit descriptions involving "the header line", etc. Juri, I'm sorry I haven't looked at the first hunk of your patch yet, the one in follow-scroll-down. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 07:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163618207418480 (code B ref 51590); Sat, 06 Nov 2021 07:02:01 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 07:01:14 +0000 Received: from localhost ([127.0.0.1]:48201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjFhS-0004o0-ID for submit@debbugs.gnu.org; Sat, 06 Nov 2021 03:01:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjFhP-0004nl-5I for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 03:01:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjFhG-0000QK-Vc; Sat, 06 Nov 2021 03:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=L0djatk7JFjWbN5RmabyUDEUQgE/pjP3EQBR0wc5EuI=; b=iMsjYviu0PYH kODLBUsdc71SmWg+B/3IKiqZcY+2yMosvZaSHCszAc4Gcr/6qKta3i8qLLYOSsm8sAFAwld8xIHBa uhhuD6vmjpzvW9JeehAVDSkQSjK2WmnllUTRAts43zeBakMTF5I/05W4YZj6TajJ/6e1HgTBa1oA2 aSFHQ3kBKkYfH++N0mj194YaK6NT9oDbmQhc6xfTuwxddwdGsGoz6PBDINNxCxopzBY9sk2ljMTHs Gf28eILlEFSCvt42/Hz9ANk2LTLuQ/v8oZyIPQ0Gvh6b13TQRTpiTl/mFN2UQUZlWH/U0Ra/62QmW TkCftSnhCV20rqmTyhZWxg==; Received: from [87.69.77.57] (port=2559 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjFhE-0002Ev-Ik; Sat, 06 Nov 2021 03:01:01 -0400 Date: Sat, 06 Nov 2021 09:00:44 +0200 Message-Id: <8335o9dazn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Mackenzie on Fri, 5 Nov 2021 21:45:32 +0000) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Fri, 5 Nov 2021 21:45:32 +0000 > Cc: Juri Linkov , 51590@debbugs.gnu.org > From: Alan Mackenzie > > Yes. There's a bug in posn-at-x-y, in that either the function or the > documentation is wrong. It isn't a bug, it is a deliberately implemented behavior. See also bug#15783. > The doc says, rather unhelpfully, "By default, X and Y are relative to > [the] text area of the selected window.". What does "[the] text area" > mean? In the ELisp manual, type "i text area of a window RET" and read there. I've now made changes there to make clear that the header-line and the tab-line _are_ included in the text area. > In posn-at-x-y, "the text area" _INCLUDES_ THE HEADER LINE. Yes. As it should. > It would appear this behaviour of posn-at-x-y is also in Emacs 27.2. It > would probably be catastrophic to fix posn-at-x-y, since so many > programs will have compensated for this bug. So, we should probably fix > the doc of the function. Done on the emacs-28 branch. > But we can fix follow-calc-win-end, by replacing the form at 2 with: > > (last-line-pos (posn-point (+ (posn-at-x-y 0 (1- ht) win) > (window-header-line-height win)))) What about the tab-line (which AFAIU was the trigger for this bug)? > And I think we (probably me ;-) should go through the elisp manual and > doc strings replacing vague phrases like "the text area of the window" > with explicit descriptions involving "the header line", etc. That'd be going overboard. We could place a cross-reference in some of those places to the "Frame Layout" node, though. Suggestions for such places are welcome. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 11:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16361994628077 (code B ref 51590); Sat, 06 Nov 2021 11:52:02 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 11:51:02 +0000 Received: from localhost ([127.0.0.1]:48632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjKDt-000260-Kw for submit@debbugs.gnu.org; Sat, 06 Nov 2021 07:51:02 -0400 Received: from colin.muc.de ([193.149.48.1]:26916 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjKDq-00025g-3M for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 07:51:00 -0400 Received: (qmail 46340 invoked by uid 3782); 6 Nov 2021 11:50:51 -0000 Received: from acm.muc.de (p2e5d54e0.dip0.t-ipconnect.de [46.93.84.224]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 06 Nov 2021 12:50:51 +0100 Received: (qmail 12834 invoked by uid 1000); 6 Nov 2021 11:50:48 -0000 Date: Sat, 6 Nov 2021 11:50:48 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8335o9dazn.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Eli. On Sat, Nov 06, 2021 at 09:00:44 +0200, Eli Zaretskii wrote: > > Date: Fri, 5 Nov 2021 21:45:32 +0000 > > Cc: Juri Linkov , 51590@debbugs.gnu.org > > From: Alan Mackenzie > > Yes. There's a bug in posn-at-x-y, in that either the function or the > > documentation is wrong. > It isn't a bug, it is a deliberately implemented behavior. See also > bug#15783. > > The doc says, rather unhelpfully, "By default, X and Y are relative to > > [the] text area of the selected window.". What does "[the] text area" > > mean? > In the ELisp manual, type "i text area of a window RET" and read there. > I've now made changes there to make clear that the header-line and the > tab-line _are_ included in the text area. I'm just confused at the moment, after having spent several hours trying to sort things out in my head. I think "window body" and "window text area" mean the same thing, but I'm not sure. The picture in elisp page "Basic Windows" seems to show "window body height" as NOT including the header line or tab line. That picture seems to show the header line as being ABOVE the text area, not part of it. The current implementation of posn-at-x-y includes the header line in its Y coordinate, BUT NOT THE TAB LINE. I think this is a bug. window-inside-pixel-edges, aka (window-edges &optional WINDOW BODY ABSOLUTE PIXELWISE) with BODY and PIXELWISE non-nil, returns (according to the elisp page) "the edges of WINDOW's body". This "body" DOES NOT include the tab line or the header line. When I run the function on an info page with tab-bar-mode enabled in my tty I get: (0 2 240 65) ^ .. This would appear to contradict the above notion of "body" as including the header and tab lines. It seems to me that we really need two distinct terms here, one for the text area of the buffer including the header and tab lines, and another for the "pure" text area without those lines. Maybe something like "extended body" vs. "text area", or something like that. > > In posn-at-x-y, "the text area" _INCLUDES_ THE HEADER LINE. > Yes. As it should. OK. > > It would appear this behaviour of posn-at-x-y is also in Emacs 27.2. It > > would probably be catastrophic to fix posn-at-x-y, since so many > > programs will have compensated for this bug. So, we should probably fix > > the doc of the function. > Done on the emacs-28 branch. Thanks! > > But we can fix follow-calc-win-end, by replacing the form at 2 with: > > (last-line-pos (posn-point (+ (posn-at-x-y 0 (1- ht) win) > > (window-header-line-height win)))) Actually, that's not right. It should be (last-line-pos (posn-point (posn-at-x-y 0 (+ (1- ht) (window-header-line-height win))))) , but that's a mere detail. It appears to solve much of Juri's bug. > What about the tab-line (which AFAIU was the trigger for this bug)? Yes, that needs to be incorporated, too. The other hunk of Juri's patch, in follow-scroll-down, is needed, but I don't think it's quite right when combined with my suggestion for follow-calc-win-end above. > > And I think we (probably me ;-) should go through the elisp manual and > > doc strings replacing vague phrases like "the text area of the window" > > with explicit descriptions involving "the header line", etc. > That'd be going overboard. We could place a cross-reference in some > of those places to the "Frame Layout" node, though. Suggestions for > such places are welcome. OK. But I think there's confusion in the manual and doc strings, and even the code, and that it's not just me. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 12:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163620079910132 (code B ref 51590); Sat, 06 Nov 2021 12:14:01 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 12:13:19 +0000 Received: from localhost ([127.0.0.1]:48654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjKZS-0002dL-48 for submit@debbugs.gnu.org; Sat, 06 Nov 2021 08:13:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjKZO-0002d6-6o for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 08:13:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjKZH-0001iq-OY; Sat, 06 Nov 2021 08:13:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nvY7hi1MclL0tR7YLhX0MnMMLkfpauZkEW75X4p6kq4=; b=g3MDUMxmhfWX bDGzpsS0DX97vle1c70x9LXqOl6Z0RI9JuueZ7LdFbtmUM6lgqhrcPMgIc2pwn/VOea5Ast3Ffx9L LWV9v5r/xHwahWrd2VU68Qjxcy2yZ9/ZN3Dv5AyFAYq6H1JPx9ShYBGGYmQwKlmX/zqDzIyBIK8Sd JU8kqr3pNZX80oT2OCw5FLgVhwhbCtuoiCSVX+qyoh9xZ21Y0LKOTL0GCSxwwJ838r0HhFA2pRenX aURcE6wZHXU9gbImFUFbRqfRMtMa+NtfOal5EdIKBf/Fr9nC45YWxBAkMGtZvJ6hzaOHsKu0i+V0O 8u/I6qbP7KgZ3Bf+BFimvA==; Received: from [87.69.77.57] (port=2078 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjKZH-00052n-A4; Sat, 06 Nov 2021 08:13:07 -0400 Date: Sat, 06 Nov 2021 14:12:50 +0200 Message-Id: <83bl2xbhz1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Mackenzie on Sat, 6 Nov 2021 11:50:48 +0000) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Sat, 6 Nov 2021 11:50:48 +0000 > Cc: juri@linkov.net, 51590@debbugs.gnu.org > From: Alan Mackenzie > > > I've now made changes there to make clear that the header-line and the > > tab-line _are_ included in the text area. > > I'm just confused at the moment, after having spent several hours trying > to sort things out in my head. > > I think "window body" and "window text area" mean the same thing, but > I'm not sure. They aren't. "Text area" includes the header-line and the tab-line, the body doesn't. > The picture in elisp page "Basic Windows" seems to show "window body > height" as NOT including the header line or tab line. That picture > seems to show the header line as being ABOVE the text area, not part of > it. The updated picture doesn't have "text area" written on it at all. > The current implementation of posn-at-x-y includes the header line in > its Y coordinate, BUT NOT THE TAB LINE. I think this is a bug. Yes. Please fix it. > > > And I think we (probably me ;-) should go through the elisp manual and > > > doc strings replacing vague phrases like "the text area of the window" > > > with explicit descriptions involving "the header line", etc. > > > That'd be going overboard. We could place a cross-reference in some > > of those places to the "Frame Layout" node, though. Suggestions for > > such places are welcome. > > OK. But I think there's confusion in the manual and doc strings, and > even the code, and that it's not just me. _After_ my today's changes? If so, please show where is the confusing text. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163622348521955 (code B ref 51590); Sat, 06 Nov 2021 18:32:01 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 18:31:25 +0000 Received: from localhost ([127.0.0.1]:50593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQTN-0005hn-F6 for submit@debbugs.gnu.org; Sat, 06 Nov 2021 14:31:25 -0400 Received: from mout.gmx.net ([212.227.17.22]:41333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQTJ-0005ad-TQ for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 14:31:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636223473; bh=SJXMgZAymFYsRET9E5L2qM/5rsFHTEHb0OeEkjO9Qco=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ZdtPbJ7IaUf0nmyItqAs2J1pXk6V4YrQnlIWhX0bXTlYT+Nn8uDl9sBGgmZHxFtGg GrO/f7zHGG1xL/1++OilRNJNbd2MohdiJbhgXvo5FHCF12gickYVCwQOg9nefyGdhz Ti/sjI/0ceZ2HzyWkxINsGAMYcAnc7kXHAqR6vI8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.80]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MryTF-1mMWEn3YgP-00o1zz; Sat, 06 Nov 2021 19:31:12 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> From: martin rudalics Message-ID: Date: Sat, 6 Nov 2021 19:31:11 +0100 MIME-Version: 1.0 In-Reply-To: <83bl2xbhz1.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Ncb6TgqJcwFOcIyvl3sH/9kKNbVGa+2OSHZp76S/yD5XLHnPAD1 qLyX2S7XrgMu5flFw5Cu0hjyXs6B1KZT5BaPV9HXq6eHYvCaI3dhFgZzVWRs1mfmTDmQy5d eabizS+hWf4yQ62HStkV8t5t9wyvaBKkW9jKue6TQ7n4GltG24R6lEn4QfUABxdcqb83Wst sMny5ZDEox/joQ9hR8+6w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Bbjvj6627Xk=:ZA9yVRUfA+gnwEQaf1zomE zNRQ+AWnHZF+9/jcLGoQcYScUmNTKgCkuHepaNmNNfP8lm7iPPppN2R6aGu7TNNSI8TloCqGB uUbXFEpHZufpF8bvQ6BLyep2w9sbGPBrkF6mLat/ZV0hAq6S1bfmXcF9IWArZA0Tj7tsC3kxX GfnDWJpch/oxYHSHwYxzTO0uimKG4iNlpol4mtxOH0cghwZw71RlQ1jEKIz3rUzZXq5MYPXFZ BrZN8FDvCq4Clkbta9lMnNeYCc4lVUxciIZ0iy+Nf1Z2zD6GKCp/4kTqBGu17OxJihcvnB/YM wCeTGc6i1vAdBRgJrCiUlTEiLw6xxs9WLbzJsN63TujBpfj7KVi0yBP/MqH8NfVGIxuFYV6H3 83v5T8rN/NIY5moJJL+PN0BDwVB2+gBd3Zy5avnYls1oqyElQpwOLqqR455WFRv+doJ1mDLSE v/UIf3buFgbJiAV/ajGMKvLy7lQm3LERQdelnb0/sYmdlwGrQwDtGLGKKlm1ehL6jrjvgos3M CKaK0CmF/HjXfxqSrnTgpRXnFhFTCjWd3rAK8JCt4GwWxAbVgzgu7NG/J0KJzviYJ5EbaFa2W x1Jax4lXfbvIZWzzjeazuWQPVWex0XHeD4nnO1aLpUb+w200kF1BEu5qCeSbCtioxqWIuqI1i r9BPuw7qpX0ZuHMWgcV3BdbGk/BQbridCXTzWMmomq6sN47rFjGCnHzuTYKrM4BwNgHZnDhw2 U6h76rwhjCxPfUsRVDEFfLnWT8j863AiGTFF2EmvVmq8CtVFuPYJ668cFTTiAH/5rO7m5UPuA m4KfU7g7++EQzuqDUkbsDypUbbQvfM1gpVvKnS4FLZfL7bbCjc/bd8PKGbAb6cvijiNijXcx9 uo1K6GkjO/IDnia0XUREM130MBQvocYVSISYf3L+opOTtPoj1UI1ej4yrAM62DFyz4U02fEEA b3wXkHzOJYOTgEvM0rcVoWexR58wC/RnAdIeesDo2xMAxY+8ng1At9tZsXBLBN5pH/foXNk1E VwTqO9aVZkwxbN8jXlO5xkLfMh+DOinTsoM27qX9ystT2fXw5W6UVhYmbBHlQfBhaNu0jgY8W bYIRvbFVJF8PTw= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) >> I think "window body" and "window text area" mean the same thing, but= >> I'm not sure. > > They aren't. "Text area" includes the header-line and the tab-line, > the body doesn't. > >> The picture in elisp page "Basic Windows" seems to show "window body >> height" as NOT including the header line or tab line. That picture >> seems to show the header line as being ABOVE the text area, not part = of >> it. > > The updated picture doesn't have "text area" written on it at all. I'm afraid this is a change for the worse. The text area does not contain the header line. If you look at a version of 'coordinates-in-window-p' from the past century you will see that If COORDINATES are in the text portion of WINDOW,\n\ the coordinates relative to the window are returned.\n\ If they are in the mode line of WINDOW, `mode-line' is returned.\n\ If they are in the top mode line of WINDOW, `header-line' is returned.\n\= and this has never changed. The text area is what window_box_height tells us. According to your change we'd now have to rewrite doc-strings and info of lots of functions like 'window-text-height', 'window-body-height' or 'window-text-pixel-size'. If 'posn-at-x-y' has a problem, let's fix it. Just that I don't really know what the problem is. When, with emacs -Q, I do (setq tab-line-format "W=C3=BCrstelstand ...") (setq header-line-format "... daf=C3=BCr ist unser Land bekannt") and then evaluate (posn-point (posn-at-x-y 0 18)) it gets me nil because point is _not_ in the text area but rather between the tab and the header line. Digging further (posn-area (posn-at-x-y 0 18)) gets me header-line here and I can't complain. (posn-point (posn-at-x-y 0 36)) gets me 1 which is, as I'd expect, 'point-min' of *scratch*. So where is the problem? martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163622406627071 (code B ref 51590); Sat, 06 Nov 2021 18:42:02 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 18:41:06 +0000 Received: from localhost ([127.0.0.1]:50626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQcj-00072Z-UA for submit@debbugs.gnu.org; Sat, 06 Nov 2021 14:41:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQch-00071y-Bf for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 14:41:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjQcZ-0000qI-Td; Sat, 06 Nov 2021 14:40:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DecEzbDe6+obrCNGZ4B3V4SoiSART/jBCdgkMKGlIrE=; b=YsnyWz186UmV QbmzUyQs85TD+W/dlnOsqRQPVlJs2XYwrDKdot1068MMWKZGlM6wIpXoYsFc/1/qvEGTnTlTiZuRh /UwwbZhkMo0X3zDCZelcW92w75tEy9sgXMTV2eKDIvlLNQ05X1iSM4P6DrUkvK/CZNYxs09au8oH4 Ptauhi5R+ldnLfJmPKyoCA71yFPbW1s4Y62lonnmst4zEP1VYefXHPEs7iYbl4a2Yxq/5HSwpyYui KcOw57GlexrSfEFri+SL8Z2VW0hk449CbNKGDNJhNmMiPBou26aQuSQsyDOMt6JZFs8YuMjZBLMzm ro57O46SVDj9f5JEkWQLTQ==; Received: from [87.69.77.57] (port=2576 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjQcZ-0005Uy-ER; Sat, 06 Nov 2021 14:40:55 -0400 Date: Sat, 06 Nov 2021 20:40:41 +0200 Message-Id: <83o86x9lg6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from martin rudalics on Sat, 6 Nov 2021 19:31:11 +0100) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Cc: 51590@debbugs.gnu.org, juri@linkov.net > From: martin rudalics > Date: Sat, 6 Nov 2021 19:31:11 +0100 > > >> The picture in elisp page "Basic Windows" seems to show "window body > >> height" as NOT including the header line or tab line. That picture > >> seems to show the header line as being ABOVE the text area, not part of > >> it. > > > > The updated picture doesn't have "text area" written on it at all. > > I'm afraid this is a change for the worse. I respectfully disagree. > The text area does not contain the header line. It does in my book. > If you look at a version of 'coordinates-in-window-p' from the past > century you will see that > > If COORDINATES are in the text portion of WINDOW,\n\ > the coordinates relative to the window are returned.\n\ > If they are in the mode line of WINDOW, `mode-line' is returned.\n\ > If they are in the top mode line of WINDOW, `header-line' is returned.\n\ > > and this has never changed. The text area is what window_box_height > tells us. I don't think I understand how that follows. And last-century documentation may need updating anyway. > According to your change we'd now have to rewrite doc-strings and info > of lots of functions like 'window-text-height', 'window-body-height' or > 'window-text-pixel-size'. If we must, yes. Why is that a catastrophe? > If 'posn-at-x-y' has a problem, let's fix it. Just that I don't really > know what the problem is. See bug#51632. And let's continue the discussion there. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 18:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163622428427403 (code B ref 51590); Sat, 06 Nov 2021 18:45:01 +0000 Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 18:44:44 +0000 Received: from localhost ([127.0.0.1]:50630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQgG-00077u-Gg for submit@debbugs.gnu.org; Sat, 06 Nov 2021 14:44:44 -0400 Received: from mout.gmx.net ([212.227.17.22]:38615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQgF-00077f-I2 for 51590@debbugs.gnu.org; Sat, 06 Nov 2021 14:44:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636224275; bh=wpE7gJLcq8HHGswJkZ6owezHSpu3LFnnzJN0MJKu/ZY=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=dnYuBxgT9yzfRuV2Sh5i7w3uteYe2MttPmQB55ASNJveD6ZoQz+vyir73tiejwYme wZgU76mQsyMWk0w9Vapcr8E2OTimfORxq2G9xCZHwQoIRagSphQBVYrRtIVaw8Z7YZ MsS7y//+F5biCRZ0n+OoJH37fdO9/Dxu94AnLNjM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.80]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8XPt-1mf9LG1qD3-014ShL; Sat, 06 Nov 2021 19:44:35 +0100 From: martin rudalics References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> Message-ID: <917f0aab-eccb-6f97-32b9-38bb1313e6cc@gmx.at> Date: Sat, 6 Nov 2021 19:44:34 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Eu1C/LVlmd1Z2sFisZw8vOut2+iVWX9oFJxwrqdZAqhimCCAG9k rYWfUBpQHGqTEsMqx+MDdJke4FuR02eCLC3u6XjlJF1LkAdL+7YyS0XKn7sLnkoAJYcCBty pFja60wdcxfuSk9nGSoZjaYDedFZzIUfJvtYqGV2aex65x7XGNM2/H8qw8WYPuuWltKzTmT Mr2noFE9jJ+oeioVzEFbg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ed5zFSviyg0=:T0p02BWbXdcA+A7T/i+ycQ H8EtrayJsyvp6g9aSfTBMBylyFXEzVqQ8i9O3c8kKUFM7wqJQqI8mv8UmX2Pr2+2LWHAk4pLG Axa8/hWPsAP+phqJP5p61EhQVbjJO/g40QHBinmLMbZZ+fFOz0DyEv/M1OGIWcc1gXMULewVp Cl5vHLVtGuokjhmQkTh9dhXj8bFfJv1qvJtPKX9RYBxfyIndXcsZM9AXlSGs43Kn3WIsvGJCm 2Tx4pvCgbSH67X4HfqmsMsaqKWH+DOdYEWB0neq5OvjqyttgdocX1w8coe9DSAgOQS9f/JDux o7q+MAzwVkBCDKNyAID2rnyCuDku6J/84tiqtcElOnCyBJ6ahqNnMF/uNjQxRaGinONXWmxlB rpbycT78RqWTCIx2z27hvMB7lmE9v0vitVepjYUf5gUjsQNWIp71oT/0ZRTzgpo6jOiNzWGua GBEvK3B+av8e15ZgXPnGd5fdbXeDjtba1xa1qzIvAxeaidc9Qwywo+Ii4pJLol5YNuWNprdkE zUJDzFG2Kk18/bOilu2X3tzpkvflem+ESI33ojJtzeKNZsNbJvfhbqy8cBPK73+zlK1Ve7Xaf HyE+hkXUfztUDSEVIRXMXvxMizL+hl9c885nyopPTWnTbTSn2egpu/n5NPBRfIREnYmcmLqrF /oUhyPt3I+TGL3Q6mXDImf9etrGRp5ck6zhA20XySGDsmPHEm5fjchO1VacXx5Cai3rSYxrmA xfPeOM7yXxbDNxYXFnwNk1FTOpOFmJ6O2YyLnAGBSAilvOuYYEYODmzXJkFaZsH6vKnIQ8gu3 xwXbXGlyDoepTrMFH9KKddAbEaNbWPBD89kkN7DTj6CN9eGvWN1msWjgkCM72cUcJKIcy7+xX BX91+TTQQuybhCNdkIyDv1C2X1Obn8IXunIdbDd2GWGztxfJH1Km3rtN1XJ59zqGZ6dGyRrpR +/Jc/6BbsyFnGQQkXiL454X70q1BSRgfwJXRj2u4aIav4FUS5aiwU9wrMdPNk8mtUOc6nWGnF NhajG1GwYTv/6UYG3PPbdDcCrv6ZEsp4Wrs4jntiFSwlSZpBedMqjhyai6Z85WYjQu2oQA/RP gLMEU4eJ1FWLUg= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > So where is the problem? I think I see it now. It's the doc-string of 'posn-at-x-y'. It should probably say that "Y is relative to the top edge of the window. X is relative to the left edge of the text area of the selected window. If optional fourth arg WHOLE is non-nil, X is relative to the left edge of the window." martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 12:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: Eli Zaretskii , 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.1636289311492 (code B ref 51590); Sun, 07 Nov 2021 12:49:01 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 12:48:31 +0000 Received: from localhost ([127.0.0.1]:52013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjhb4-00007s-QQ for submit@debbugs.gnu.org; Sun, 07 Nov 2021 07:48:31 -0500 Received: from colin.muc.de ([193.149.48.1]:10909 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjhb3-00007g-15 for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 07:48:29 -0500 Received: (qmail 34502 invoked by uid 3782); 7 Nov 2021 12:48:23 -0000 Received: from acm.muc.de (p2e5d5a37.dip0.t-ipconnect.de [46.93.90.55]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Nov 2021 13:48:22 +0100 Received: (qmail 9417 invoked by uid 1000); 7 Nov 2021 12:48:22 -0000 Date: Sun, 7 Nov 2021 12:48:22 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86pmrf3l9m.fsf_-_@mail.linkov.net> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Juri and Eli. On Thu, Nov 04, 2021 at 19:29:28 +0200, Juri Linkov wrote: > retitle 51590 follow-mode is broken with header-line and tab-line > quit > >> The most low-level function of follow-mode is follow-calc-win-end. > >> When global-tab-line-mode is enabled, follow-calc-win-end > >> returns the same values as when global-tab-line-mode is disabled. > > Can you step through that function and see which part is misbehaving > > there? > >> I don't understand what more low-level function doesn't take > >> into account the height of the tab-line. Maybe the problem is > >> in pos-visible-in-window-p? Or maybe different values returned > >> by window-inside-pixel-edges and window-end? > > I don't know the answer, but I see that header-line-format is > > mentioned in one place in follow.el, and that is not a good sign... > Indeed, I tested with the header-line, and it has the same problem, > so retitled this bug report. > After trial and error, I arrived to the following patch that completely > fixes these problems. However, I can't explain how it works. I've spent some time on this patch, and I've transformed it into a similar patch that I can explain, and I believe is nearly correct[*]. Could you possibly try it out in your system. Thanks! diff --git a/lisp/follow.el b/lisp/follow.el index b64f4cb734..2ca2c1f17b 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -667,7 +667,8 @@ follow-scroll-down (scroll-down-command arg)) (arg (follow-scroll-down-arg arg)) (t - (let* ((windows (follow-all-followers)) + (let* ((orig-point (point)) + (windows (follow-all-followers)) (win (car (reverse windows))) (start (window-start (car windows)))) (if (eq start (point-min)) @@ -678,11 +679,14 @@ follow-scroll-down (select-window win) (goto-char start) (vertical-motion (- (- (window-height win) - (if header-line-format 2 1) - next-screen-context-lines))) + (if header-line-format 2 1) ; always mode-line + (if tab-line-format 1 0) + next-screen-context-lines))) (set-window-start win (point)) - (goto-char start) - (vertical-motion (- next-screen-context-lines 1)) + (if (< orig-point (window-end win t)) + (goto-char orig-point) + (goto-char start) + (vertical-motion (- next-screen-context-lines 1))) (setq follow-internal-force-redisplay t)))))) (put 'follow-scroll-down 'scroll-command t) @@ -947,7 +951,11 @@ follow-calc-win-end (let* ((win (or win (selected-window))) (edges (window-inside-pixel-edges win)) (ht (- (nth 3 edges) (nth 1 edges))) - (last-line-pos (posn-point (posn-at-x-y 0 (1- ht) win)))) + (last-line-pos (posn-point + (posn-at-x-y 0 (+ (window-header-line-height win) + (window-tab-line-height win) + (1- ht)) + win)))) (if (pos-visible-in-window-p last-line-pos win) (let ((end (window-end win t))) (list end (pos-visible-in-window-p (point-max) win))) [*] There is a situation which is not new, where if the buffer is too short to fill all the windows, and it is already scrolled up far, follow-scroll-down will scroll a correct amount, but leave point in a random position. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 13:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16362908773057 (code B ref 51590); Sun, 07 Nov 2021 13:15:02 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 13:14:37 +0000 Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mji0L-0000nF-2Q for submit@debbugs.gnu.org; Sun, 07 Nov 2021 08:14:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mji0I-0000mx-Gd for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 08:14:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mji0A-0006jH-SW; Sun, 07 Nov 2021 08:14:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jAt1Mo0rMtydWd15WPP4KwEQ5ljdlzHWVF0MVVKMtCE=; b=naLzh8anjRm0 R9vh2CNDHeximBwZjqNnmO/xKMgGYrDXzB9fJ5tt15kpTodvlHkcdwmsET1TNvvsXptmporEQCgjf 7TNmMKl/KZ0evBM1L8CEMyHjleK7QeadVVWRBMBDKdeiCBTjXxTGToXwLvZDc/it0IppA+28rg7Sb K8Of4gL4qswHKh1UvJY1SEKUIOYuPttW+ya7TuX9E5dVbinS+68tDIJ2OxeWmjok/ia5rqV4q4S/g 6WNKT6yZ80YuKdYMnUiMNaHslOK4RZOkJJ82BGe4XIIvg60ShCWb63U1BDQb7msaX8hJwuqdTKpMl bSOmH3szguIz299TToSN2w==; Received: from [87.69.77.57] (port=3313 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mji0A-0002Ic-E4; Sun, 07 Nov 2021 08:14:26 -0500 Date: Sun, 07 Nov 2021 15:14:13 +0200 Message-Id: <83tugo85wa.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Mackenzie on Sun, 7 Nov 2021 12:48:22 +0000) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Sun, 7 Nov 2021 12:48:22 +0000 > Cc: Eli Zaretskii , 51590@debbugs.gnu.org > From: Alan Mackenzie > > > Indeed, I tested with the header-line, and it has the same problem, > > so retitled this bug report. > > > After trial and error, I arrived to the following patch that completely > > fixes these problems. However, I can't explain how it works. > > I've spent some time on this patch, and I've transformed it into a > similar patch that I can explain, and I believe is nearly correct[*]. > Could you possibly try it out in your system. Thanks! So what's the verdict about posn-at-x-y? does it have a bug when tab-line is present, or doesn't it? From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163629529719015 (code B ref 51590); Sun, 07 Nov 2021 14:29:02 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 14:28:17 +0000 Received: from localhost ([127.0.0.1]:52172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjj9d-0004wd-GG for submit@debbugs.gnu.org; Sun, 07 Nov 2021 09:28:17 -0500 Received: from colin.muc.de ([193.149.48.1]:13532 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjj9a-0004wM-Mm for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 09:28:16 -0500 Received: (qmail 1232 invoked by uid 3782); 7 Nov 2021 14:28:08 -0000 Received: from acm.muc.de (p2e5d5a37.dip0.t-ipconnect.de [46.93.90.55]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Nov 2021 15:28:08 +0100 Received: (qmail 9900 invoked by uid 1000); 7 Nov 2021 14:28:07 -0000 Date: Sun, 7 Nov 2021 14:28:07 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <83tugo85wa.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83tugo85wa.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Eli. On Sun, Nov 07, 2021 at 15:14:13 +0200, Eli Zaretskii wrote: > > Date: Sun, 7 Nov 2021 12:48:22 +0000 > > Cc: Eli Zaretskii , 51590@debbugs.gnu.org > > From: Alan Mackenzie > > > Indeed, I tested with the header-line, and it has the same problem, > > > so retitled this bug report. > > > After trial and error, I arrived to the following patch that completely > > > fixes these problems. However, I can't explain how it works. > > I've spent some time on this patch, and I've transformed it into a > > similar patch that I can explain, and I believe is nearly correct[*]. > > Could you possibly try it out in your system. Thanks! > So what's the verdict about posn-at-x-y? does it have a bug when > tab-line is present, or doesn't it? There is no bug there. It was merely me getting confused between tab lines and tab bars. The first of these is part of the window, the second part of the frame. I closed bug #51632 as notabug late last night. Sorry I neglected to put you onto the Cc:. I think there are still inconsistencies in the documentation with the terms "window body" and "window text area", but I'll have to look at that more systematically to find them, if they are there. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 17:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Eli Zaretskii , 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163630726225693 (code B ref 51590); Sun, 07 Nov 2021 17:48:02 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 17:47:42 +0000 Received: from localhost ([127.0.0.1]:54628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjmGb-0006gK-Up for submit@debbugs.gnu.org; Sun, 07 Nov 2021 12:47:42 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjmGZ-0006f8-QL for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 12:47:40 -0500 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 6FB4860007; Sun, 7 Nov 2021 17:47:31 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> Date: Sun, 07 Nov 2021 19:46:38 +0200 In-Reply-To: (Alan Mackenzie's message of "Sun, 7 Nov 2021 12:48:22 +0000") Message-ID: <868rxzsw4l.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > I've spent some time on this patch, and I've transformed it into a > similar patch that I can explain, and I believe is nearly correct[*]. > Could you possibly try it out in your system. Thanks! Thanks, I tested it out, and everything works without a hitch: with tab-line-format, or with header-line-format, or with both. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: Eli Zaretskii , 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16363142674921 (code B ref 51590); Sun, 07 Nov 2021 19:45:02 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 19:44:27 +0000 Received: from localhost ([127.0.0.1]:54869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjo5b-0001HJ-F3 for submit@debbugs.gnu.org; Sun, 07 Nov 2021 14:44:27 -0500 Received: from colin.muc.de ([193.149.48.1]:21910 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjo5Y-0001H4-9q for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 14:44:25 -0500 Received: (qmail 9659 invoked by uid 3782); 7 Nov 2021 19:44:18 -0000 Received: from acm.muc.de (p2e5d5a37.dip0.t-ipconnect.de [46.93.90.55]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Nov 2021 20:44:17 +0100 Received: (qmail 22835 invoked by uid 1000); 7 Nov 2021 19:44:17 -0000 Date: Sun, 7 Nov 2021 19:44:17 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <868rxzsw4l.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <868rxzsw4l.fsf@mail.linkov.net> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Juri. On Sun, Nov 07, 2021 at 19:46:38 +0200, Juri Linkov wrote: > > I've spent some time on this patch, and I've transformed it into a > > similar patch that I can explain, and I believe is nearly correct[*]. > > Could you possibly try it out in your system. Thanks! > Thanks, I tested it out, and everything works without a hitch: > with tab-line-format, or with header-line-format, or with both. That's great. If it's OK with you, I will write a commit message, commit the change to the emacs-28 branch, then merge it to master. Thanks for spotting the problem with the header line; it's been there for a long time. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 19:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Eli Zaretskii , 51590@debbugs.gnu.org Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16363150726334 (code B ref 51590); Sun, 07 Nov 2021 19:58:01 +0000 Received: (at 51590) by debbugs.gnu.org; 7 Nov 2021 19:57:52 +0000 Received: from localhost ([127.0.0.1]:54893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjoIZ-0001e5-Tb for submit@debbugs.gnu.org; Sun, 07 Nov 2021 14:57:52 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjoIY-0001dp-BI for 51590@debbugs.gnu.org; Sun, 07 Nov 2021 14:57:51 -0500 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 004751C0003; Sun, 7 Nov 2021 19:57:42 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <868rxzsw4l.fsf@mail.linkov.net> Date: Sun, 07 Nov 2021 21:56:50 +0200 In-Reply-To: (Alan Mackenzie's message of "Sun, 7 Nov 2021 19:44:17 +0000") Message-ID: <8635o7rb7h.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> Thanks, I tested it out, and everything works without a hitch: >> with tab-line-format, or with header-line-format, or with both. > > That's great. If it's OK with you, I will write a commit message, > commit the change to the emacs-28 branch, then merge it to master. > > Thanks for spotting the problem with the header line; it's been there > for a long time. Fixing it on the emacs-28 branch would be great. I hadn't realized until now that some glitches in follow-mode were related to the tab-line/header-line. Thanks in advance for pushing the fix to the emacs-28 branch. From unknown Mon Jun 23 16:46:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Juri Linkov Subject: bug#51590: closed (Re: bug#51590: follow-mode is broken with header-line and tab-line) Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> X-Gnu-PR-Message: they-closed 51590 X-Gnu-PR-Package: emacs Reply-To: 51590@debbugs.gnu.org Date: Mon, 08 Nov 2021 07:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1636355642-2891-1" This is a multi-part message in MIME format... ------------=_1636355642-2891-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51590: follow-mode is broken with header-line and tab-line which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 51590@debbugs.gnu.org. --=20 51590: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51590 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1636355642-2891-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51590-done) by debbugs.gnu.org; 8 Nov 2021 07:13:43 +0000 Received: from localhost ([127.0.0.1]:55905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjyqd-0000jw-B3 for submit@debbugs.gnu.org; Mon, 08 Nov 2021 02:13:43 -0500 Received: from colin.muc.de ([193.149.48.1]:40287 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjyqX-0000jO-Mv for 51590-done@debbugs.gnu.org; Mon, 08 Nov 2021 02:13:42 -0500 Received: (qmail 86926 invoked by uid 3782); 8 Nov 2021 07:13:31 -0000 Received: from acm.muc.de (p4fe15aa5.dip0.t-ipconnect.de [79.225.90.165]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 08 Nov 2021 08:13:30 +0100 Received: (qmail 4181 invoked by uid 1000); 8 Nov 2021 07:13:30 -0000 Date: Mon, 8 Nov 2021 07:13:30 +0000 To: Juri Linkov Subject: Re: bug#51590: follow-mode is broken with header-line and tab-line Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <868rxzsw4l.fsf@mail.linkov.net> <8635o7rb7h.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8635o7rb7h.fsf@mail.linkov.net> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51590-done Cc: Eli Zaretskii , 51590-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Juri. On Sun, Nov 07, 2021 at 21:56:50 +0200, Juri Linkov wrote: > >> Thanks, I tested it out, and everything works without a hitch: > >> with tab-line-format, or with header-line-format, or with both. > > That's great. If it's OK with you, I will write a commit message, > > commit the change to the emacs-28 branch, then merge it to master. > > Thanks for spotting the problem with the header line; it's been there > > for a long time. > Fixing it on the emacs-28 branch would be great. I hadn't realized > until now that some glitches in follow-mode were related to the > tab-line/header-line. Thanks in advance for pushing the fix > to the emacs-28 branch. Done. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1636355642-2891-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Nov 2021 18:27:57 +0000 Received: from localhost ([127.0.0.1]:41184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miKzN-0001Ld-JP for submit@debbugs.gnu.org; Wed, 03 Nov 2021 14:27:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:49194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miKzL-0001LW-RH for submit@debbugs.gnu.org; Wed, 03 Nov 2021 14:27:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miKzL-0001ls-Ld for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 14:27:55 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:36593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miKzH-0004JD-FQ for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 14:27:55 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6E9C9FF80A for ; Wed, 3 Nov 2021 18:27:48 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Tab-line breaks windows of follow-mode Organization: LINKOV.NET Date: Wed, 03 Nov 2021 20:24:18 +0200 Message-ID: <86bl31xfl9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.6 (--) In emacs -Q visit a long buffer, split the window horizontally, and enable 'M-x follow-mode'. A partially-visible bottom line of the left window will help to observe that the same line is completely visible at the top of the right window. This is a nice feature that allows follow-mode to work correctly. Now enable 'M-x global-tab-line-mode' and observe that the same line is still visible at the top of the right window, whereas the bottom line of the left window shows another partially-visible line. This is a bug. The most low-level function of follow-mode is follow-calc-win-end. When global-tab-line-mode is enabled, follow-calc-win-end returns the same values as when global-tab-line-mode is disabled. I don't understand what more low-level function doesn't take into account the height of the tab-line. Maybe the problem is in pos-visible-in-window-p? Or maybe different values returned by window-inside-pixel-edges and window-end? ------------=_1636355642-2891-1-- From unknown Mon Jun 23 16:46:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stefan Kangas Subject: bug#47498: closed (Re: bug#51590: follow-mode is broken with header-line and tab-line) Message-ID: References: X-Gnu-PR-Message: they-closed 47498 X-Gnu-PR-Package: emacs Reply-To: 47498@debbugs.gnu.org Date: Mon, 08 Nov 2021 07:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1636355642-2891-3" This is a multi-part message in MIME format... ------------=_1636355642-2891-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51590: 28.0.50; follow-mode misses a line with tiling window manager which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 47498@debbugs.gnu.org. --=20 51590: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51590 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1636355642-2891-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51590-done) by debbugs.gnu.org; 8 Nov 2021 07:13:43 +0000 Received: from localhost ([127.0.0.1]:55905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjyqd-0000jw-B3 for submit@debbugs.gnu.org; Mon, 08 Nov 2021 02:13:43 -0500 Received: from colin.muc.de ([193.149.48.1]:40287 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mjyqX-0000jO-Mv for 51590-done@debbugs.gnu.org; Mon, 08 Nov 2021 02:13:42 -0500 Received: (qmail 86926 invoked by uid 3782); 8 Nov 2021 07:13:31 -0000 Received: from acm.muc.de (p4fe15aa5.dip0.t-ipconnect.de [79.225.90.165]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 08 Nov 2021 08:13:30 +0100 Received: (qmail 4181 invoked by uid 1000); 8 Nov 2021 07:13:30 -0000 Date: Mon, 8 Nov 2021 07:13:30 +0000 To: Juri Linkov Subject: Re: bug#51590: follow-mode is broken with header-line and tab-line Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <868rxzsw4l.fsf@mail.linkov.net> <8635o7rb7h.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8635o7rb7h.fsf@mail.linkov.net> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51590-done Cc: Eli Zaretskii , 51590-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Juri. On Sun, Nov 07, 2021 at 21:56:50 +0200, Juri Linkov wrote: > >> Thanks, I tested it out, and everything works without a hitch: > >> with tab-line-format, or with header-line-format, or with both. > > That's great. If it's OK with you, I will write a commit message, > > commit the change to the emacs-28 branch, then merge it to master. > > Thanks for spotting the problem with the header line; it's been there > > for a long time. > Fixing it on the emacs-28 branch would be great. I hadn't realized > until now that some glitches in follow-mode were related to the > tab-line/header-line. Thanks in advance for pushing the fix > to the emacs-28 branch. Done. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1636355642-2891-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Mar 2021 12:30:59 +0000 Received: from localhost ([127.0.0.1]:50555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRDWM-0006FX-K9 for submit@debbugs.gnu.org; Tue, 30 Mar 2021 08:30:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:37952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRDWJ-0006FO-7A for submit@debbugs.gnu.org; Tue, 30 Mar 2021 08:30:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRDWI-0005hU-3r for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 08:30:55 -0400 Received: from mail-pj1-f53.google.com ([209.85.216.53]:53058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRDWB-0006ao-Vy for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 08:30:51 -0400 Received: by mail-pj1-f53.google.com with SMTP id ha17so7677251pjb.2 for ; Tue, 30 Mar 2021 05:30:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=IWfUEFoN2TVLwg8QIOr7Zvg+XgxNUeXWvHJa8atWq+4=; b=Cp3/19kco8gmIcsVWMngfbgB4MlHkjWDCfUGH9WNYurxpB5eMvz+9YIhPZ4wkVE36P fUj2A6gFviE1nQys/dp9F/l4qgL7slNBycv/gaTW/9H91sRTe3zN62oq8MjbJdLyjN7y AqbRhxB5u42SpvPvye5MiratpDBVMS1gYS+9g6iLqwhG70LGDVd3GzdKL6BggXW++LEh sHjBiw6wZbfr15aouP8de8OwqtmZnAdAfyNKivyeiQeLdtREP9gi5uU4eezzLwJCjJQ2 eqxuZB/3Y8ViusQvhIqQUnNA0T8etb6uhmjo3MDqxE9AllShrHzL0oPW+mPWGDWINveU 7DBw== X-Gm-Message-State: AOAM532Cf9HerAh8/6qUOOTpvHt7rR4Mx2rLOixc10NI+YCPx7TQfEml UvzpC5WYrvW3tuL8EykD1fOFm4PEcMM9e05AdvQEVc+lOzU= X-Google-Smtp-Source: ABdhPJyJT/MU5sxC5kDjs1ehBdjYb/Iu3Rqqu5HTemO8DJSLfh3FDEkPzBdBpCNXbaQvtPzJTc8ECMUR4KcFWdQlYh0= X-Received: by 2002:a17:903:2303:b029:e6:faf5:875e with SMTP id d3-20020a1709032303b02900e6faf5875emr33466348plh.41.1617107443279; Tue, 30 Mar 2021 05:30:43 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 30 Mar 2021 12:30:42 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 30 Mar 2021 12:30:42 +0000 Message-ID: Subject: 28.0.50; follow-mode misses a line with tiling window manager To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.216.53; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f53.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.8 (-) I see one hidden line when using follow-mode. Steps to reproduce: 0. emacs -Q 1. C-h i 2. C-x 2 3. M-x follow-mode RET There is now one line missing from the display. When using `display-line-numbers-mode', this effect is more obvious. I use the tiling window manager XMonad, and Emacs is forced to full screen. It has the same dimensions as my screen, and I have no window decorations. My resolution is 2560x1440 and the `default' face is: ftcrhb:-Bits-Bitstream Vera Sans Mono-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1 My guess is that the last line is displayed, but only the top few pixels are visible, so it looks like it is not there at all. When I change the Emacs window to be floating and resize manually, I can't reproduce this bug. The window size will then snap to lines and all lines are visible. This bug is reproducible with both Lucid and GTK. In GNU Emacs 28.0.50 (build 8, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2021-03-29 built on joffe Repository revision: 67ef8c36bde32a8bf33b118aa38f8339b0183c46 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure --with-x-toolkit=lucid PKG_CONFIG_PATH=/home/skangas/usr/lib/pkgconfig:/home/skangas/usr/lib/pkgconfig:' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_COLLATE: C value of $LC_CTYPE: sv_SE.UTF-8 value of $LC_TIME: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 50799 8163) (symbols 48 6514 1) (strings 32 18738 1753) (string-bytes 1 606639) (vectors 16 13181) (vector-slots 8 174052 8138) (floats 8 23 39) (intervals 56 227 0) (buffers 992 10)) ------------=_1636355642-2891-3-- From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163638580828234 (code B ref 51590); Mon, 08 Nov 2021 15:37:02 +0000 Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 15:36:48 +0000 Received: from localhost ([127.0.0.1]:59144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk6hU-0007LK-4h for submit@debbugs.gnu.org; Mon, 08 Nov 2021 10:36:48 -0500 Received: from mout.gmx.net ([212.227.15.18]:47119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk6hS-0007L6-AI for 51590@debbugs.gnu.org; Mon, 08 Nov 2021 10:36:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636385798; bh=3lbgat9PiTkjxsvhgdEh1uFML5MChKylQz3ihhZyqZA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=h4RobsQ88JDUI09/QuSFTe50NR3vPJ3UNg1USX35lSrRKMShn1VpzPh5+u/brMB+8 oUZ+sUzJ8QeVUj0IC966DMElwAz1EhoLBK59stm0+tLEjcz/gf3d8iYG9k65QuIkY3 HSHw7GzQhwT8hyvvWIXq+fboI7JHTeWmXo22Zj88= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.102] ([212.95.5.204]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbAh0-1m8r8f3yRc-00bdIc; Mon, 08 Nov 2021 16:36:38 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> <83o86x9lg6.fsf@gnu.org> From: martin rudalics Message-ID: Date: Mon, 8 Nov 2021 16:36:36 +0100 MIME-Version: 1.0 In-Reply-To: <83o86x9lg6.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:sPsfzxN0sCSt4/HkwZMCzQrajObmnu5hGcXq97fSNjCOUoVyC1e nzHOMUQo2l3VXG1YovfmUVNjCDmxVEy+i0bCqwNP2vOldwQAHejGoxtET7xLT2bnBuF+buL urYRv8Be0Iwj6p/Ty0dOPj3V6DieeanlsAhF3KY6+lkD2pyNcsiJ7Pz7BrWIE+YNngg1i1M TrLRo7ALHYhvoGKJ/IuZg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sTKVkuNVs1Q=:bN8PPlzNYtmYM5oXDaFAyq jBLNMrzEpKuB6fASlAddCti5ufTbT4QXLaGWko0gtps8NIZCsXl2wlzCscOJv5ETvqKP0GRAr Tz7nmksouLRRmNkGJZSIbHJPrHXb2QtUASOU2bzd4rq5oyrdbnWfCiIQegc3gMgcE+8q1HD2y u66Gn5zkIuUsj8jv2yGIj7Uhjn9PihPbGx4Uer6MThkHia8bbxJhUXgak+meOyttn3OgKlxEM mc4N4MU99LxWzZ7dXHMUyxhAu1gZu06bzdsVeXfpEAbl3Vo2+QbTeB/X2hsetgtxwkciVZWmj 8IuOPFbZEiVrGMgzRnrncSBWELhVzyvYfq5TYu0ipG9DmU4AVNG0E2SLLILWLtuxbkX1PxqN5 r/nYoLN4mYDXE8xgt+xs5DbtuCZOOCJX8UocFlCjUfTQ/wP90Ev9d3sVp3Cw9vvBfPhvGQaTh faf/MqpSa18XorCa9cK0Hya9WV02ViFKyCDWyjLVQMOocVzjPweJcwERu1eLGRL0c3CbDsL0V 6/lLtrfz01lGLRhcyYp7r9I8qeK3tvkoZ8rV0grqGQL6RtnMhkHTZz6lNKuvE2DGsMZtEHeS0 Y+8yAQ3TrHXpLrV6orFp5uus3/m8oDiDRbcrX9q3NLosU3j33Evk3fcG3LvEwkXHDQLNPKCj4 Y35ozZK5FCnAicn7+HBKxWm3cVdoA09ajTV1sZkqXkLmosi/LMOxwXTQV9HCU8+DCPDQe/pey ZTrwHuzs6zOyMLa0wtDZ9ATSw16yMLo8uPOs1qGoCAMbSoRLplPYFwXqoCR13XqK2DRyA/lpm HtVwJaQdqK0BDnypkVqBdJ9NqJVx79tRjxQFEQWvLUFdtEMNIUlTyKfhbHeFXhQyvFmlbW0tH v087JhKC3WRnRvC/VfgM+ByPzaQBKVJWt/XMrZoROS/ZNhHdHozh2SQYVjXbPrHvDSL5B8oEF /7KqbMqnAmNewRxD4oW3K4ABw/fEsvK4Q8aLfpPQgoSkLW92unu1TA9C9rEYxigDs1AGxUcX2 /ow6x/vLXc9Xfxi0AmE7i8M2ma0AS9sl9Zo5rfX6VqiX4UrJTUpMZLhzeII6sacYbjsUIoyK8 hjSTcX2Qxiju78= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> The text area does not contain the header line. > > It does in my book. How would your book describe the text area? A T-shaped area comprising the window's body, its header and tab line? What would be the width of that area? Why would it exclude the mode line? >> If you look at a version of 'coordinates-in-window-p' from the past >> century you will see that >> >> If COORDINATES are in the text portion of WINDOW,\n\ >> the coordinates relative to the window are returned.\n\ >> If they are in the mode line of WINDOW, `mode-line' is returned.\n\ >> If they are in the top mode line of WINDOW, `header-line' is returned.\n\ >> >> and this has never changed. The text area is what window_box_height >> tells us. > > I don't think I understand how that follows. Because text area and header line were mutually exclusive ever since. At least so until last week. > And last-century > documentation may need updating anyway. It _was_ updated continuously in a sense that tried to preserve the original meaning of concepts and allowed them to live together with concepts that were introduced at a later stage. Consider the 'window-height' and 'window-width' controversy, for example. >> According to your change we'd now have to rewrite doc-strings and info >> of lots of functions like 'window-text-height', 'window-body-height' or >> 'window-text-pixel-size'. > > If we must, yes. Why is that a catastrophe? Because the person who has to do that would have to check every single occurrence of the string "text" in all files that deal with "windows". >> If 'posn-at-x-y' has a problem, let's fix it. Just that I don't really >> know what the problem is. > > See bug#51632. And let's continue the discussion there. That bug has been closed meanwhile, like the present one. 'posn-at-x-y' is a function with ill-conceived arguments (why does WHOLE affect the X coordinate only) and a doc-string I've never been able to understand. By default, X and Y are relative to text area of the selected window. Note that the text area includes the header-line and the tab-line of the window, if any of them are present. This is at least as wrong as before: For example, with emacs -Q (posn-area (posn-at-x-y 0 0)) gives me 'nil' here which is correct since the left fringe is not part of the text area. But (posn-area (posn-at-x-y 0 (window-body-height nil t))) gives me 'mode-line' here which is wrong since, according to your new definition, the mode line is _not_ part of the text area. Same holds for a horizontal scroll bar, if present. And with a bottom divider (posn-area (posn-at-x-y 0 (1- (window-pixel-height)))) gets me 'bottom-divider'. So I'd suggest to revert your changes wrt the text area. And, since 'posn-at-x-y' deals with coordinates and not with "areas", simply say that Y is always relative to the top edge of the window while X is relative to the left body edge of the window if WHOLE is nil and Y is within the top and bottom body edge of the window and relative to the left window edge otherwise. Do we have a deal? Not yet ... (posn-area (posn-at-x-y (1- (window-pixel-width)) 0)) currently gives 'nil' regardless of whether it's done with a header or tab line and (posn-area (posn-at-x-y (1- (window-pixel-width)) (1- (window-pixel-height)))) gives 'nil' on the mode line. Only when I remove _both_ fringes and the vertical scroll bar I get the expected results. This _is_ a bug and we should fix it. martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163639275317187 (code B ref 51590); Mon, 08 Nov 2021 17:33:02 +0000 Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 17:32:33 +0000 Received: from localhost ([127.0.0.1]:59316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk8VV-0004T9-4m for submit@debbugs.gnu.org; Mon, 08 Nov 2021 12:32:33 -0500 Received: from mout.gmx.net ([212.227.17.21]:39995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk8VT-0004Su-1V for 51590@debbugs.gnu.org; Mon, 08 Nov 2021 12:32:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636392742; bh=Ea/acTamS0dlIbioqXpehSSVNE+8IxZJL/4iMTasrvE=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=Q8VQt42WtMs2s2oBrN3iP9K52ghb89HnA1YRbuuggqTupDL42+j65kGr0tXpK3kqf VRrDsNHOVB7oJJQyJl5MN3Pjt1TqlK5hO2CVqNvlH6VqMvD8QHJXf2JDzDQIEJtcrT asM67lADRWhuygJ6d+CyQfxAyP8CXm7ZAEcGmv8E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.102] ([212.95.5.204]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MeU4y-1mCAjJ3cfM-00aW8m; Mon, 08 Nov 2021 18:32:21 +0100 From: martin rudalics References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> <83o86x9lg6.fsf@gnu.org> Message-ID: <70ed9026-8c9b-a8cb-ab62-cb800ddac44d@gmx.at> Date: Mon, 8 Nov 2021 18:32:20 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------28F3B152507022B815D03A1F" Content-Language: en-US X-Provags-ID: V03:K1:lAl/why79dUgHErwBg24QlI6W7VPTlXhuBm//+NBgsMGZ1rn50c DMW8vXmWyTkb6g58zpGwlNd1Si/HDHKZVkMwWreeom6zyQ5+1Mrm3RZIdR9uWaiqdvhW/Y6 1O1AslgNammcKWLcssprv5IFEjUwlKjeaqLEbuuVilvyZOEEXnhjUciNYcZbAbNp1+Q6O7M AKYtQ9XaZiyyyVkF74U/A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ri88kse0UIo=:w7faX7BOZsIpTJB0it8JWT EA4GAUMCkrWi2XagGQ2KhGssqeehSc5dKCUO+qmFWe6zWtxwmtU9TXrE0aAespKoiRSyS8Fhc wKNMdJzck3P6QYf7ptI6IaOTkvJyC0bRZaIrVZjwvgcOvwlOjwkO0I+A7LvWKZHCPe6yP8pl3 98IVlX2H8L7r3s7z/rWz+ECXaK8Dvbrgi7mB8qQjInZ1YjxdgLNnrHiUE/L77Yq36RwaQf9Qe pOVjlSR7aAu4L/qtmO1Aok/WXZ40MJGJkXAo5ejQb66mt/zBefHk87qGq4aEsGP9isQKdqePy qj/M74aITl75YxYAK/LQbbrc6zq1HiDGUQCEMKTV05rZgfi79wFvMbspBeCvSvNS0+meHjH9a P1DMmK0lLsjb5kobfYUmajQk4ypyfutx051wtFTUJ4EgzCS9P/iyRDPvO+qoT0bta5KHsH0Jy omV9diVZGm84t2mr+CqQQBHIswwc6YA9YrCcC7hHzm7JcPE3nYzmCJwMJvz4JaoYJC4XFlniN ccr9XhHiLhqatd3rztrZab+3JvM3Iv7Ej6sHd6g4EAWya12pA6Eeh9ftSBczWZcmH+2Vr9K7L ZVzHRqTqj8rjo13PKnKbal6eA+zmCJgETirNiCoM+J6mnwyvQ1oysey2NwkC0d6+ORRDF8UxI 9r/V5Y0A3PSHZf46rQWfVbUbI3gNfnPVH9q5DoN2qk97P737TdMLsNTDAJXGubIKRWX2K2wMu 3QvJuj06/vCQw4S7JiGvxbbyr6qAQXADeEo/PGA2H+rzc6+o1arpBvoPt00QfhCR1k5iMMABi KfRu6+lbdhin6niRbW5oTq8qUAc7cqj3vmf5DK2qwrLOPUJomoQx+psLcMuX5wwqxCpgD1NwF e7RTUflpu6efYUmGdsUALXb5uy0pGItcNc47xfO72KWhID9E3OMjGw2X/qbuZT6b/giizbHDj XqQP3lAFPknRUFW31d9Nngh2CpYWmx5wOlY9XIKmKn4049knQ1CkhoMg9tGOqn383NJrwiCe2 CmNWTUF6XVXisFs8btgncvw07o67zZUcvUjUtClyv+ZFA6dbzPk+C5MNaCRxJ48UfuTzNYJSV +Fl/RomrkhTloU= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) This is a multi-part message in MIME format. --------------28F3B152507022B815D03A1F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > (posn-area (posn-at-x-y (1- (window-pixel-width)) 0)) > > currently gives 'nil' regardless of whether it's done with a header or > tab line and > > (posn-area (posn-at-x-y > (1- (window-pixel-width)) > (1- (window-pixel-height)))) > > gives 'nil' on the mode line. Only when I remove _both_ fringes and the > vertical scroll bar I get the expected results. This _is_ a bug and we > should fix it. I think the attached patch should fix that modulo some ">=" and "<" glitches. martin --------------28F3B152507022B815D03A1F Content-Type: text/x-patch; name="posn-at-x-y.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="posn-at-x-y.diff" diff --git a/src/keyboard.c b/src/keyboard.c index a99d14cb4c..d24a0ffe07 100644 =2D-- a/src/keyboard.c +++ b/src/keyboard.c @@ -11374,7 +11374,9 @@ DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, = 2, 4, 0, XSETINT (x, (XFIXNUM (x) + WINDOW_LEFT_EDGE_X (w) - + (NILP (whole) + + ((NILP (whole) + && XFIXNUM (y) >=3D WINDOW_BOX_TOP_PIXEL_EDGE (w) + && XFIXNUM (y) < WINDOW_BOX_HEIGHT_NO_MODE_LINE (w)) ? window_box_left_offset (w, TEXT_AREA) : 0))); XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XFIXNUM (y))); diff --git a/src/window.h b/src/window.h index 2400c422c1..6420706b5f 100644 =2D-- a/src/window.h +++ b/src/window.h @@ -800,6 +800,12 @@ #define WINDOW_BOX_RIGHT_PIXEL_EDGE(W) \ - WINDOW_RIGHT_DIVIDER_WIDTH (W) \ - WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (W)) +/* Return the pixel value where the text in window W starts. */ +#define WINDOW_BOX_TOP_PIXEL_EDGE(W) \ + (WINDOW_TOP_PIXEL_EDGE (W) \ + + WINDOW_HEADER_LINE_HEIGHT (W) \ + + WINDOW_TAB_LINE_HEIGHT (W)) + /* Return the frame x-position at which the text (or left fringe) in window W starts. This does not include a left-hand scroll bar if any. */ --------------28F3B152507022B815D03A1F-- From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: martin rudalics , 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163639439328359 (code B ref 51590); Mon, 08 Nov 2021 18:00:02 +0000 Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 17:59:53 +0000 Received: from localhost ([127.0.0.1]:59369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk8vx-0007NL-EV for submit@debbugs.gnu.org; Mon, 08 Nov 2021 12:59:53 -0500 Received: from colin.muc.de ([193.149.48.1]:57912 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mk8vv-0007N3-6N for 51590@debbugs.gnu.org; Mon, 08 Nov 2021 12:59:52 -0500 Received: (qmail 21265 invoked by uid 3782); 8 Nov 2021 17:59:44 -0000 Received: from acm.muc.de (p4fe15aa5.dip0.t-ipconnect.de [79.225.90.165]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 08 Nov 2021 18:59:44 +0100 Received: (qmail 7502 invoked by uid 1000); 8 Nov 2021 17:59:44 -0000 Date: Mon, 8 Nov 2021 17:59:44 +0000 Message-ID: References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83bl2xbhz1.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Hello, Eli and Martin. On Sat, Nov 06, 2021 at 14:12:50 +0200, Eli Zaretskii wrote: > > Date: Sat, 6 Nov 2021 11:50:48 +0000 > > Cc: juri@linkov.net, 51590@debbugs.gnu.org > > From: Alan Mackenzie [ .... ] > > OK. But I think there's confusion in the manual and doc strings, and > > even the code, and that it's not just me. This confusion being the meanings of "window body" and "window text area", in particular as to whether or not they include any header line or tab line. > _After_ my today's changes? If so, please show where is the confusing > text. I've done a survey of window.c, keyboard.c, window.el for all occurrences of "text area" and "body" in function names, doc strings, some comments, and parameter names. The source I've grepped is an almost up to date copy of the emacs-28 branch. The function name is at the left, followed by annotations for text area and body. "BIG" means the term includes the header and tab lines, "small" means it does not, "?" means it is not immediately clear, blank means it is irrelevant or not mentioned. Function Text Area Body -------- --------- ---- Fwindow_body_width Fwindow_body_height small (small) Fwindow_old_body_pixel_width Fwindow_old_body_pixel_height ? Fwindow_lines_pixel_dimensions confused. Fwindow_text_height small Fset_window_fringes window_body_height small window_body_width window_change_record_windows ? run_window_change_functions Vwindow_size_change_functions Vwindow_state_change_functions Vwindow_state_change_hook Vwindow_configuration_change_hook make_lispy_position small make_lispy_event ? read_key_sequence small Fposn_at_x_y BIG window-body-size ? window-edges ? ? window-absolute-body-pixel-edges ? ? window-largest-empty-rectangle ? window-preserve-size ? window-body-edges ? window-body-pixel-edges ? It seems clear that, at least in the places where the meaning of "text area" and "body" are clear, that they refer to the area which doesn't include the header line and tab line. Fposn_at_x_y stands out as the only function with BIG. Maybe the picture would change on examining the elisp manual. Maybe some of the unclear annotations would resolve to BIG, but that doesn't seem all that likely. Given this, it seems it would be better to amend the documentation of Fposn_at_x_y to refer to the "text area _plus_ any header line or tab line". -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 18:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: rudalics@gmx.at, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16363958156694 (code B ref 51590); Mon, 08 Nov 2021 18:24:02 +0000 Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 18:23:35 +0000 Received: from localhost ([127.0.0.1]:59434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9Is-0001ju-Nr for submit@debbugs.gnu.org; Mon, 08 Nov 2021 13:23:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9Ir-0001jf-4r for 51590@debbugs.gnu.org; Mon, 08 Nov 2021 13:23:33 -0500 Received: from [2001:470:142:3::e] (port=37156 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9Ik-0002Bs-Pj; Mon, 08 Nov 2021 13:23:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HCcYbkxnBrPz+A3oRmciErX31Z548+HiOWqWonKpezI=; b=oQAEZYKmI0wM wKNw9Kgxr7pL6Il6pEwed3iPGT0VBkgjk73NrG1xQsJoNWAiSzIXN824V8cSnC0ccE9smL77lJb4e AuLc0gGBxX4pZqku78OznNq31GcCCOghhlH5WSUFn2VmLWznwktADcQw4W6Xj4LdqeaSA4FnVfRfW dKHTj56fMnnzE01rPVp4L7+RnBlsMf3Fg886YGtGCo8th3wFxAiGhgru4oCVLiHB4b5Coh+VjoBhM JSHS6SgEiMnLsfWHM+3v+TF2LsTjIVIQZrtg/+kjlVYFNVCXEkRThCR1bPWRcnf4UJOxb7X71WaoH a8bWjjn+Rgz9b2eAcONJSA==; Received: from [87.69.77.57] (port=3239 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9Ik-0007nV-Cj; Mon, 08 Nov 2021 13:23:26 -0500 Date: Mon, 08 Nov 2021 20:23:17 +0200 Message-Id: <837ddi7bhm.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Mackenzie on Mon, 8 Nov 2021 17:59:44 +0000) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Mon, 8 Nov 2021 17:59:44 +0000 > Cc: juri@linkov.net, martin rudalics , 51590@debbugs.gnu.org > From: Alan Mackenzie > > Given this, it seems it would be better to amend the documentation of > Fposn_at_x_y to refer to the "text area _plus_ any header line or tab > line". I would like to stop using "text area" in the doc strings and the user manual. It is a confusing term, more so for me, because it has a very specific meaning in the display code. So from my POV, the ideal solution is to go through all of those places and replace "text area" with "window body" (and if the latter is already there, just delete the former). Thanks. From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 18:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16363972639178 (code B ref 51590); Mon, 08 Nov 2021 18:48:02 +0000 Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 18:47:43 +0000 Received: from localhost ([127.0.0.1]:59470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9gE-0002Nw-Sh for submit@debbugs.gnu.org; Mon, 08 Nov 2021 13:47:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9g5-0002MV-3H for 51590@debbugs.gnu.org; Mon, 08 Nov 2021 13:47:41 -0500 Received: from [2001:470:142:3::e] (port=37966 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9fv-0006Qj-55; Mon, 08 Nov 2021 13:47:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vR94JGKbSRR6r94EW0XCKa02T6M4yb4yMJgi2VKs7Qs=; b=oBTA7CogDrcM QHaBSEofacPahh9f1QRisW/SSTSWo0BSl/pjk51fU4KPq0CyI+zhcjVrMGWnh7+V4j5v7rwUiLuRQ XmeGgo6LgnU1CX0G38dM9zZ4YmDBaY008KZTpayJEbq1QpE5VvMFCfiAzpNObAjjS9LlHGsty9syK WJu3LyIf94BSMFg/FTXOn/065EMnpSq+W3o5BYvCESBT1o1+YcnwQXp0ZT8p6ATuUD/J8t+gspdKg se+C4UrBdAAXRSCDRLjfsWEXKw05mtq+U89lBWi2aE5MbRr9TwnZtHVZNkVLyX6WZDQ2bGBC8JE0K 4zF8DUuYOb6CYoSCCtJwcA==; Received: from [87.69.77.57] (port=4699 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9fs-000278-Ka; Mon, 08 Nov 2021 13:47:22 -0500 Date: Mon, 08 Nov 2021 20:47:09 +0200 Message-Id: <834k8m7adu.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from martin rudalics on Mon, 8 Nov 2021 16:36:36 +0100) References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> <83o86x9lg6.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net > From: martin rudalics > Date: Mon, 8 Nov 2021 16:36:36 +0100 > > By default, X and Y are relative to text area of the selected window. > Note that the text area includes the header-line and the tab-line of > the window, if any of them are present. > > This is at least as wrong as before: For example, with emacs -Q > > (posn-area (posn-at-x-y 0 0)) > > gives me 'nil' here which is correct since the left fringe is not part of > the text area. But > > (posn-area (posn-at-x-y 0 (window-body-height nil t))) > > gives me 'mode-line' here which is wrong since, according to your new > definition, the mode line is _not_ part of the text area. "Wrong" why, because the doc string of window-body-height mentions the text area? Or for some other reason? And, btw, why do you use (window-body-height nil t) instead of (1- (window-body-height nil t)) ? The last pixel of the window's body has Y coordinate (1- (window-body-height nil t)), no? > And with a bottom divider > > (posn-area (posn-at-x-y 0 (1- (window-pixel-height)))) > > gets me 'bottom-divider'. And that is wrong why? > So I'd suggest to revert your changes wrt the text area. I wrote in another message what I'd like to do with "text area" in doc strings. Given that they will disappear from the doc strings, what other problems do you see? > (posn-area (posn-at-x-y (1- (window-pixel-width)) 0)) > > currently gives 'nil' regardless of whether it's done with a header or > tab line Isn't that because window-pixel-width includes the fringes? > and > > (posn-area (posn-at-x-y > (1- (window-pixel-width)) > (1- (window-pixel-height)))) > > gives 'nil' on the mode line. Only when I remove _both_ fringes and the > vertical scroll bar I get the expected results. This _is_ a bug and we > should fix it. I don't think it's a bug, because window-pixel-height includes the fringes, according to its doc string. Try (posn-area (posn-at-x-y (- (window-pixel-width) 9) (1- (window-pixel-height)))) From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Nov 2021 10:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie , Eli Zaretskii Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16364526772118 (code B ref 51590); Tue, 09 Nov 2021 10:12:02 +0000 Received: (at 51590) by debbugs.gnu.org; 9 Nov 2021 10:11:17 +0000 Received: from localhost ([127.0.0.1]:60916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO61-0000Y6-2s for submit@debbugs.gnu.org; Tue, 09 Nov 2021 05:11:17 -0500 Received: from mout.gmx.net ([212.227.15.19]:47307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO5w-0000Xq-Tg for 51590@debbugs.gnu.org; Tue, 09 Nov 2021 05:11:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636452661; bh=ch0DsYzw83g/hq2aCHGqPzbKi3JrX0uyUCwjuJR+tW4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=gtnfYUVmZIhta84HAiqpbn0fZXdY+hgS5xtmtsa+p7398xFhYqI5VlTSFmlqSNTuS fUBIbHDFQHhK5AEn69zRwh9MeccWIIJ0I73terWf3HNGb9C2cr39s4kzbzbhNVfpOK Y+pYFbD8MaJ0x/Y0/pzJvdP1w0frbbwIhLPYjY9o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.59]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJmKh-1mzz2K0Cnx-00K7A9; Tue, 09 Nov 2021 11:11:01 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> From: martin rudalics Message-ID: Date: Tue, 9 Nov 2021 11:10:58 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:YjRBfzENw+F1YxFwcF2rt+jGR1PPOzYD+Kg0/sXgmhVTnBCxpX9 7bBRIr0GpZBbGcjN9JHjRszVlONE6/T7lx4ap7HPZlToQ8JKN9XQQH9c+kNW17/AmhiFZR8 KfVM+V0Qjeyanfyiv7emCpQBwjR3jSk0cSUlDC/tVFVcgwPrzsY+ZWbL9FBVuMXBBRcu/Do VQtlBCYv/eokjdv3/4Wew== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:QLNTqYs50qw=:NdKJzYxtheLVe6yBkhbPvm JJpJAj54DOXQ1RMEDKQVw+NqNB85hl3wV9QQstl0pGuQcEpK1bXtxIAw5ge8vECl/gZB2wMn9 CeM6KaRqrMk8GZJKTpOW8Oh9nCc/gQ8xi9v4YqBH6rOCaBfL9EpSiqosMjehIjJiLF5PYCZNg 7OXoOm8O8Avq3CUKdhl7VUPHSUfGW2UC09Jn9FyCunH8Ekzyys7aFekgPpfkKSa1enEjBdeIB GouW9qGqVFDUrrcfehQfAEn5UQmanK4TM39Jfj+LzSQn9NDNmJEyvOAGHZ1EQm6tteBGvK7oB WQak3EzIopHd1QkVMuispv+Vqvb139LAqJoNb1T2Y2MnYMmXYs9jR2f0GiIvaMrR0GDZyIC0l SZHKshgVjfH+GgMsacMlEl1ijGeZSAC101M5t3LmaTE1f9N9sx4YNUI0tNKs2ERZS5lAUbZYw kOsQ7IntS6wcWZTBPRitBjq/PTzz0go59uzVp07PGVYtGcM6mg7tM68fxmnydp3eNiku9QJII ZwvlrKwmpFzuKvz5JMzVGG1iqPW4Jgea1NglU/UOuBsg4Thl/7/cifB8rH9A+7cSxZtuxyyTU iQ7jURdgW2w9El5bEjmCWu6RRk30mEmwdicvaslDG1ACxnbphucsIP3U/JfT7aKau+xSh2P1T 8uFzbIwM24IAlgovz3ak+2EuJ3F4S4JurBELDKnrwLp6SzLNJ5tj4U2lKcbVIhHQemZkfEicw v0QJ4lb+lfd/Z9Fz7zffFd7dyFGddJrUPNsGNahCFnZYDp9/fo5xl10XM3jaXvzo1m1KZmWCw jq2wrKgQMdRbfsTxsR6zHDIGgXd/f4j0nWyT554Qc865JCtKO5+EfaII4EYFa9CV8NlIB+iEf tDOYtKKmgt1XphBSUO0DIK4hsYMiHLBQDxJO2KNFYUtyuXGqo+lhpKeVb3YkVkcIe9Sa70K5F 0LkCzPdi4iQHhdAROE4vRj8SX3a+ouVYYWvk4d0jDbm57pNyGgMyxxo/o02Gko02QaQ2yD7WM qrh1ilevTdKB1YbhisxOLLPTO3pPypjspU254GcKMJLMv1W8BFTrnU5NCLF/5LxCsnw9NKEKe /cJL5dmp8lwswo= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > I've done a survey of window.c, keyboard.c, window.el for all occurrences > of "text area" and "body" in function names, doc strings, some comments, > and parameter names. The source I've grepped is an almost up to date > copy of the emacs-28 branch. The function name is at the left, followed > by annotations for text area and body. "BIG" means the term includes the > header and tab lines, "small" means it does not, "?" means it is not > immediately clear, blank means it is irrelevant or not mentioned. Thanks. Note that searching for "text area" alone is not sufficient. In the past, the "thing" (the body of a window) we talk about here has been described in various ways, usually according to the personal taste of the author of a change. You missed, for example, 'window-text-width' which uses the term "text display area" for this. I've usually tried to retain the nomenclature originally used by the authors because it's hardly ever immediately evident what they really had in mind and also in the hope that the use of functions like 'window-text-width' would eventually fade out. The greatest problem in this area is that Emacs traditionally uses the terms 'window-height' to refer to the total height of a window and 'window-width' to refer to its body width. Obviously, all occurrences of these two terms should be replaced with 'window-total-height' and 'window-body-width' respectively but you can easily see for yourself the progress I have made. Hence, rather than caring about the (IMO) very minor "text area" issue, fixing these occurrences should be our major aim if we want to remove inconsistencies. Sadly, people add new occurrences of these at a faster pace than I'm able to remove the older ones. > Function Text Area Body > -------- --------- ---- > Fwindow_body_width Any function that has "body" in its name is "safe" (and means "small" in your nomenclature) so we can usually ignore them. Their doc-strings, however, may use some variant of "text area" since that was the term commonly in use at the time the "body" functions were added. > Fwindow_body_height small (small) > Fwindow_old_body_pixel_width > Fwindow_old_body_pixel_height ? > Fwindow_lines_pixel_dimensions confused. 'window-lines-pixel-dimensions' is like 'window-text-pixel-size' but works line-wise. More precisely, it can be used to walk the buffer text shown in a window and get the number of pixels occupied by each individual line. The BODY argument serves to control the impact the presence of a header or mode line could have on the return value. > Fwindow_text_height small > Fset_window_fringes > window_body_height small > window_body_width > window_change_record_windows ? 'window_change_record_windows' does not make any reference to the text area so why the "?". > run_window_change_functions > Vwindow_size_change_functions > Vwindow_state_change_functions > Vwindow_state_change_hook > Vwindow_configuration_change_hook I tried to very carefully distinguish between body and total sizes here because, for example, a change in the width of a fringe may or may not change the body width of a window and leave the total width alone. So there should not be any problems with these. > make_lispy_position small > make_lispy_event ? > read_key_sequence small > Fposn_at_x_y BIG I never thoroughly checked the keyboard and mouse defined routines. There anything is possible. > window-body-size ? > window-edges ? ? > window-absolute-body-pixel-edges ? ? > window-largest-empty-rectangle ? > window-preserve-size ? > > window-body-edges ? > window-body-pixel-edges ? All of these are new and should be "small" although their docs may still contain references to the "text area". But the far greater problem is to find all occurrences of "text" in the manuals, for example, where it stands for the width or height of the buffer text shown in a window. Often I read and re-read the manual a couple of times in order to find out what is really meant and whether what I read is not biased because I've read some different part of the manual before. These parts of the manual suffer most from the transition of Emacs from TTYs to GUIs over time and the accompanying changes of its nomenclature. > It seems clear that, at least in the places where the meaning of "text > area" and "body" are clear, that they refer to the area which doesn't > include the header line and tab line. > > Fposn_at_x_y stands out as the only function with BIG. Maybe the picture > would change on examining the elisp manual. Maybe some of the unclear > annotations would resolve to BIG, but that doesn't seem all that likely. > > Given this, it seems it would be better to amend the documentation of > Fposn_at_x_y to refer to the "text area _plus_ any header line or tab > line". Or _not use_ the term "text area" here in the first place. martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Nov 2021 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Alan Mackenzie Cc: 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16364527642335 (code B ref 51590); Tue, 09 Nov 2021 10:13:01 +0000 Received: (at 51590) by debbugs.gnu.org; 9 Nov 2021 10:12:44 +0000 Received: from localhost ([127.0.0.1]:60920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO7O-0000bY-NV for submit@debbugs.gnu.org; Tue, 09 Nov 2021 05:12:44 -0500 Received: from mout.gmx.net ([212.227.15.15]:54503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO79-0000b2-KM for 51590@debbugs.gnu.org; Tue, 09 Nov 2021 05:12:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636452740; bh=k/p62y0d/ur3TZahDOxUWS2UcB6bObmLtPC4DlJAzJ4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=KJGrL+eRcQdEHgFoJM1641TRNfKyC0HmrJ0U94fvomlHFCAnVKJg3454mjxcGDUCt 5rWdoi39GrP54BzKt5t4wCfuOPrCGCuM/1BhkxbJ8Y6tgj5VqUUJCiwYaPwjadBpK0 ZHjcj0dCsDedkZqAvLFFAKbRInLG/jUv9lguDDJ4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.59]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MybKp-1mWRbS3dkr-00yxHd; Tue, 09 Nov 2021 11:12:19 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> <837ddi7bhm.fsf@gnu.org> From: martin rudalics Message-ID: <789ce592-f432-c92c-9e3c-bb1eace601ad@gmx.at> Date: Tue, 9 Nov 2021 11:12:18 +0100 MIME-Version: 1.0 In-Reply-To: <837ddi7bhm.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:q+jkCPJG37pqHduToGqbTI1FayokGHCM5cxdm1+yETwXHQHIRVu 3+1s3wb7/CnpoB9Xpy78j+uggL3Jihhe8aYaH9vqBm0maXn9DqGV6JoJASU47lNmkqrU8gA X82bX+5Ow56ljvEeUkVLl4Tl4PK4o+ER8zU99M4m9E+/Hfnp6NbR2o9cIGN1Pnwr+COc3nD /EYrz0nHnAvjDBUeG8k+g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:h/f9kUBZO4Q=:wNg00T77UvfI15VehsipuL d6F06BUpTizFMIdjWyLVCE+hylmTvz4WXuxN+YsAMuJwyY8c8Wfi1YYTlEr0Ul4x4jseyghH2 pYms39d7/pNxCSUarBZh7vjrdETJJ6N+lv38w5yJt0Jfkr3n0/9e2GHv+sn4vGLxFmj2s4Ya7 W4393ujnpg9kby/5KQo8jU7d5UjvtKBoezzPSPjBFI5dUvBL8EJ/lGANxh041oNBvVrN3DGkl fliK/brtsTQHUITxRQArKfhKF87fXdIYM45QCRcxVk623X8TO67017exsVR9EC2vyC5h40uOU no4caVZP2LP3MdQZRyZDHl0p6fugj4pTYG+oEtV2YxZN2Za3ozrJwlRvuEdMvdWpaP0foinUI gVbAYj0LiDZ4ZmBjS4B/6sEGd5IXXeTjMia4RSjQ93uHRj+IMOpKlUrJeo6DauJ83YebaxD5P 83XzU1yF3kAzhIAWC9F/wFM2oBNSjjT1Of6fo4D3/3EMVNtUYwz8wHhLtatuT8AjoMwix/c/q ZSR+qaTsiHROYYjUE8jzBYWnFo7wy27WqVojzR6F2a4NtBatnXlsUMvrPUa+xenj5kzzDkr1p xzE3RpNVCX9AKyeECIYfJrX/vZf3ZvQkASIVNLvFLcpwtZKs6XRM/exPWq0SpVbdnQLcYogIC wd2pVNRGJ/ekPoqGf9z4ahn1bkSENTWcpc+koSj4MipBqz+9ibnCtBLLFF+1khkKysw6ns0IY wOfOCLhxeqjTGJ0tHRZ/C8KJJflvY/O+QxXDuUQZctaccbV0FhLv51j6NJweEBWIEQ+lYRrgO oCtqedPMUVQVAcxt3cGGXyoNQ7+A7JmgpT1JZY0S3L/Gp43Tt0Q611WO2IrQerlW8ZJbOcEO9 LmoNRDEg293JBkZhCpPrHtJ/wGx6w4cPsF8I9q+5kC4la8982GxDpfSRqTjLD4U4qSfzbd+my G4Khyt6s2DkEdA5DDO4UWLEX7O88TXs7UWyyHvw1/sR+1wWYuTeGNNRkHzznm6GaaG3UOi35t Tp7mIsGOuaXGWdPP80ZxmjVL/x93o5WGuL7NpfRptuMp8FV5hLvw71+rtHzdB8rTLb063StZK n36/EE1fKEUDeI= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > I would like to stop using "text area" in the doc strings and the user > manual. OK. But can we do that on the development branch please? I recently spent some time rewriting the window chapter in the Elisp manual and just do not feel confident enough to install the necessary changes in a safe manner on the release branch soon. > It is a confusing term, more so for me, because it has a very > specific meaning in the display code. While a comment like /* Return the window-relative coordinate of the right edge of display area AREA of window W. ANY_AREA means return the right edge of the whole window, to the left of the right fringe of W. */ may look entirely clear to you, it doesn't to me. So maybe we could try to first say what - a "display area" of a window is and where its "right edge" is located, - what a "window-relative coordinate" is, - what the "right edge of the whole window" is, and - what "left of the right fringe of W" stands for in the presence of fringes in and outside of margins or a scroll bar on the left. Next we could try fixing things like int text_area_x, text_area_y, text_area_width, text_area_height; window_box (w, TEXT_AREA, &text_area_x, &text_area_y, &text_area_width, &text_area_height); in frame.c and int text_area_x, text_area_y, text_area_width, text_area_height; window_box (s->w, TEXT_AREA, &text_area_x, &text_area_y, &text_area_width, &text_area_height); in xwidget.c if we want to say that the box size of a window is not the same as the size of its text area (deduced from you earlier comment). > So from my POV, the ideal solution is to go through all of those > places and replace "text area" with "window body" (and if the latter > is already there, just delete the former). Agreed. But after the release, pretty please. martin From unknown Mon Jun 23 16:46:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51590: follow-mode is broken with header-line and tab-line Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Nov 2021 10:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16364528612580 (code B ref 51590); Tue, 09 Nov 2021 10:15:02 +0000 Received: (at 51590) by debbugs.gnu.org; 9 Nov 2021 10:14:21 +0000 Received: from localhost ([127.0.0.1]:60924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO8z-0000fY-8K for submit@debbugs.gnu.org; Tue, 09 Nov 2021 05:14:21 -0500 Received: from mout.gmx.net ([212.227.15.19]:42087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkO8u-0000f4-Iu for 51590@debbugs.gnu.org; Tue, 09 Nov 2021 05:14:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636452849; bh=TULfDWUuDvgJiUhH1jZEUQwmDXSeaUqkeISibFlfTkk=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Bjv2d8JFRW5pKS7gZabhPEtsmXGLYDJezI1RyGLLipP4LSEpam8mLqE5tpxGKBEyc FFcbLOozmDlyudjgjbnISBZrdoWBYyNy/V9bL8uIwtR8oKIR5ZoNfOYF5ABjYXKUd0 +FaeOSQQdHfmxW4VOiWCgHBpatJ62SxDCDgzm2k4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.59]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MgvrL-1mEujs11dl-00hOEM; Tue, 09 Nov 2021 11:14:09 +0100 References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> <8335o9dazn.fsf@gnu.org> <83bl2xbhz1.fsf@gnu.org> <83o86x9lg6.fsf@gnu.org> <834k8m7adu.fsf@gnu.org> From: martin rudalics Message-ID: Date: Tue, 9 Nov 2021 11:14:07 +0100 MIME-Version: 1.0 In-Reply-To: <834k8m7adu.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:o8ZH9qtDewI/+OpKzk0MAmhCTJ4OzuKEQWnsD+ESJg7sd7DGI5g BXrAadJt+t+cwqZhl2PXZsv70947umyFl1r1qJOexruR6fKdYKZarlNCDC0ILDpgjej36lb utYontU8zZdiKMyRq4b1VBijU7thOCZFDBsz8ObIbNbtiG5MbqVywrrlprC6FAooVoOjoBT mFSbtQ2SjWd6idQN9TSgg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wAkcaXuflBQ=:El5CHghU2Cs4hGIdhggQ3z IEQsuPXvw9Yw9a4SEbvjBp7vZ+pSMz/1N4ntR0W92CXrzwb46ybyT9+hnE9IdMJ3GSyjrKYGW Jwtnyu81V2kWSmT/w5b8jvXJXmtwFduEtQFUk0TBTRLWP4dyBd43wmz+or/PBET2cMjY5wcgC dhDRVRW9TE5Uelk8hZn1GxdVbRtVnZtbrbDXQ/XYxslYG6MAioFidgo2Sx6mPVyd+sLXGafPX UFwbW5oiA6aESohjRxQk8E6mXZUI5G0ajwfcc66ZTa/3PIg3KSvi/RG/lQ4+2MB01WD/OUNcW c9Yz8YVSPDmzB8LaXcK+ZFmbM6E/EkF1v3kPumAvceqo08Z7ZLkgq9Ly+05Oep0t+9uYXrnj+ PvRfl+/G2i1ThDNqDKgoncRYsA9GMPI29oInx4jnt4SZ5kZ1vlh+fR1OfaK7fxMKlxRqevlTP 8R/Gk2/2Otld6Z0EiXW7d6rOqYgZ9RwB0IFuOU9+wML+wb2oDb/lT24fmp5UJDbs8lUSkEH/y biEbT/pItaDHiGEIjUw6sHqUqAYUAvYA1vlk+wz/5UgnCZHwz2wj52jRTNxsWepQtXUSLMPJe MbBtz4W8wVTJUS8/REkv9ud8Kp92OP8g33GOm84vCugpHHUMJ5tUyHsilBm9zhCSIBaCtQvQA lC8rZYcnGl2mefXjbV47UoCQ7uh+zkInbGxZchulJDLigx0CSO6XbP0A2/A3xh6DFVBTgdLl3 VoJUZPeIxL/bhq1fXSbmJ2yjry8sboGrEFTo5OvjlUPICEys2ELVShzLblCskcJgu2v9a7Q89 z+5hkJD+wRzY6SiixheSJRYDGBF0Ia1qMPbt/GS0SFFxQYihyuo1uQLBaGpGQBV6Pv3n6KTnF VkC3nkmHfetvQTIqh4ZsLylRmuZm94ak4GP7Fc4/xJxBpQSWU2/ZvgNuaA3lhqx47p80K+tad i4vwIgMJWd9GGrVAlOxm5tEYibdcw2Q6CGlz5mcQtVFVKKPSbDAoTW30q3maxTebH2HZdEuf9 Nm7rSItA8GH9hgBMjvVJ9ifXJaIiRKFrkGbIfMN9VWj/dcNB33PS1neu/RhHX1JBuObxaoE7A YoFyf1QZyuKfCs= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> But >> >> (posn-area (posn-at-x-y 0 (window-body-height nil t))) >> >> gives me 'mode-line' here which is wrong since, according to your new >> definition, the mode line is _not_ part of the text area. > > "Wrong" why, because the doc string of window-body-height mentions the > text area? Or for some other reason? If you had answered my question How would your book describe the text area? A T-shaped area comprising the window's body, its header and tab line? What would be the width of that area? Why would it exclude the mode line? I would be able to tell. A definition like The @dfn{text area} of the window includes the header line and the tab line, if they are present in the window. does _not_ define what the text area is. > And, btw, why do you use (window-body-height nil t) instead of > (1- (window-body-height nil t)) ? The last pixel of the window's body > has Y coordinate (1- (window-body-height nil t)), no? Right. I wanted to be below the body. >> And with a bottom divider >> >> (posn-area (posn-at-x-y 0 (1- (window-pixel-height)))) >> >> gets me 'bottom-divider'. > > And that is wrong why? See above. >> So I'd suggest to revert your changes wrt the text area. > > I wrote in another message what I'd like to do with "text area" in doc > strings. Given that they will disappear from the doc strings, what > other problems do you see? That the manual still defines the "text area" and now even in a form that lets me only guess what it is. >> (posn-area (posn-at-x-y (1- (window-pixel-width)) 0)) >> >> currently gives 'nil' regardless of whether it's done with a header or >> tab line > > Isn't that because window-pixel-width includes the fringes? The header line doesn't have any fringes. >> and >> >> (posn-area (posn-at-x-y >> (1- (window-pixel-width)) >> (1- (window-pixel-height)))) >> >> gives 'nil' on the mode line. Only when I remove _both_ fringes and the >> vertical scroll bar I get the expected results. This _is_ a bug and we >> should fix it. > > I don't think it's a bug, because window-pixel-height includes the > fringes, according to its doc string. Try > > (posn-area (posn-at-x-y > (- (window-pixel-width) 9) > (1- (window-pixel-height)))) The mode line doesn't have any fringes either. martin