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: Mon, 08 Nov 2021 20:47:09 +0200 Message-ID: <834k8m7adu.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7075"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 51590@debbugs.gnu.org, juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 08 19:48:13 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 1mk9gj-0001eR-1u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 19:48:13 +0100 Original-Received: from localhost ([::1]:36958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk9gh-0004fH-Vm for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 13:48:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9gY-0004ew-N6 for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk9gY-0007Zl-Du for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mk9gY-0002Oo-4E for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:48:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 51590-submit@debbugs.gnu.org id=B51590.16363972639178 (code B ref 51590); Mon, 08 Nov 2021 18:48:02 +0000 Original-Received: (at 51590) by debbugs.gnu.org; 8 Nov 2021 18:47:43 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from martin rudalics on Mon, 8 Nov 2021 16:36:36 +0100) 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:219375 Archived-At: > 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))))