From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51590: follow-mode is broken with header-line and tab-line Date: Sat, 06 Nov 2021 09:00:44 +0200 Message-ID: <8335o9dazn.fsf@gnu.org> References: <86bl31xfl9.fsf@mail.linkov.net> <83h7ctgk93.fsf@gnu.org> <86pmrf3l9m.fsf_-_@mail.linkov.net> <835yt7g3my.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7320"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51590@debbugs.gnu.org, juri@linkov.net To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 08:02:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjFiR-0001kv-Pf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 08:02:16 +0100 Original-Received: from localhost ([::1]:56448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjFiQ-0002tF-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 03:02:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjFiF-0002t7-AB for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 03:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjFiE-0002Af-3U for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 03:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjFiD-0004oz-TI for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 03:02:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.163618207418480 (code B ref 51590); Sat, 06 Nov 2021 07:02:01 +0000 Original-Received: (at 51590) by debbugs.gnu.org; 6 Nov 2021 07:01:14 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from Alan Mackenzie on Fri, 5 Nov 2021 21:45:32 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219078 Archived-At: > 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.