GNU bug report logs - #75576
[PATCH] Take the tab-line into account when computing the window edges

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Wed, 15 Jan 2025 08:04:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75576 in the body.
You can then email your comments to 75576 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Wed, 15 Jan 2025 08:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steven Allen <steven <at> stebalien.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 15 Jan 2025 08:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Take the tab-line into account when computing the window edges
Date: Wed, 15 Jan 2025 00:03:29 -0800
[Message part 1 (text/plain, inline)]
Tags: patch


This was causing EXWM to mis-calculate the window height when centaur
tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.

[0001-Take-the-tab-line-into-account-when-computing-the-wi.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Wed, 15 Jan 2025 08:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: Acknowledgement ([PATCH] Take the tab-line into
 account when computing the window edges)
Date: Wed, 15 Jan 2025 00:10:26 -0800
[Message part 1 (text/plain, inline)]
Fixed whitespace and referenced the bug report.

[0001-Take-the-tab-line-into-account-when-computing-the-wi.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Wed, 15 Jan 2025 17:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, Steven Allen <steven <at> stebalien.com>,
 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Wed, 15 Jan 2025 19:11:58 +0200
> This was causing EXWM to mis-calculate the window height when centaur
> tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.

Eli, is this patch eligible to be installed on the emacs-30 release branch?

Also Cc-ing Martin.

> From e9796ff62f2c561cb2797c3040ef88aa80a95500 Mon Sep 17 00:00:00 2001
> From: Steven Allen <steven <at> stebalien.com>
> Date: Tue, 14 Jan 2025 23:56:08 -0800
> Subject: [PATCH] Take the tab-line into account when computing the window
>  edges
>
> window-body-height correctly subtracts the tab-line's height but
> window-edges did not add this same height to the y-offset.
>
> See https://github.com/emacs-exwm/exwm/pull/114
>
> * lisp/window.el (window-edges): Add the tab-line-height to the y-offet
> of the window body.  (Bug#75576)
> ---
>  lisp/window.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/window.el b/lisp/window.el
> index 886128c7daa..b91c45226a1 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -3828,7 +3828,8 @@ window-edges
>  	 (top-body
>  	  (when body
>  	    (+ (window-pixel-top window) border-width
> -	       (window-header-line-height window))))
> +	       (window-header-line-height window)
> +	       (window-tab-line-height window))))
>  	 (right (+ left (if pixelwise
>  			    (window-pixel-width window)
>  			  (window-total-width window))))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Wed, 15 Jan 2025 20:10:01 GMT) Full text and rfc822 format available.

Message #14 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: rudalics <at> gmx.at, steven <at> stebalien.com, 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Wed, 15 Jan 2025 22:09:33 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: martin rudalics <rudalics <at> gmx.at>,  Steven Allen <steven <at> stebalien.com>,
>   75576 <at> debbugs.gnu.org
> Date: Wed, 15 Jan 2025 19:11:58 +0200
> 
> > This was causing EXWM to mis-calculate the window height when centaur
> > tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.
> 
> Eli, is this patch eligible to be installed on the emacs-30 release branch?

Is that really urgent?  We've lived with this since Emacs 27, I guess?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Wed, 15 Jan 2025 20:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Juri Linkov <juri <at> linkov.net>
Cc: rudalics <at> gmx.at, 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Wed, 15 Jan 2025 12:57:26 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Juri Linkov <juri <at> linkov.net>
>> Cc: martin rudalics <rudalics <at> gmx.at>,  Steven Allen <steven <at> stebalien.com>,
>>   75576 <at> debbugs.gnu.org
>> Date: Wed, 15 Jan 2025 19:11:58 +0200
>> 
>> > This was causing EXWM to mis-calculate the window height when centaur
>> > tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.
>> 
>> Eli, is this patch eligible to be installed on the emacs-30 release branch?
>
> Is that really urgent?  We've lived with this since Emacs 27, I guess?

It's a nice to have but not urgent. I plan on adding a workaround to
EXWM anyways and I doubt many others are impacted. The only question is
which version to check in that workaround.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Thu, 16 Jan 2025 05:57:01 GMT) Full text and rfc822 format available.

Message #20 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>
Cc: 75576 <at> debbugs.gnu.org, rudalics <at> gmx.at, juri <at> linkov.net
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Thu, 16 Jan 2025 07:56:48 +0200
> From: Steven Allen <steven <at> stebalien.com>
> Cc: rudalics <at> gmx.at, 75576 <at> debbugs.gnu.org
> Date: Wed, 15 Jan 2025 12:57:26 -0800
> 
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Juri Linkov <juri <at> linkov.net>
> >> Cc: martin rudalics <rudalics <at> gmx.at>,  Steven Allen <steven <at> stebalien.com>,
> >>   75576 <at> debbugs.gnu.org
> >> Date: Wed, 15 Jan 2025 19:11:58 +0200
> >> 
> >> > This was causing EXWM to mis-calculate the window height when centaur
> >> > tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.
> >> 
> >> Eli, is this patch eligible to be installed on the emacs-30 release branch?
> >
> > Is that really urgent?  We've lived with this since Emacs 27, I guess?
> 
> It's a nice to have but not urgent. I plan on adding a workaround to
> EXWM anyways and I doubt many others are impacted. The only question is
> which version to check in that workaround.

Then I prefer to install this on master.  We can consider backporting
it after Emacs 30.1 is released, if no problems are reported for the
change on master.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Thu, 16 Jan 2025 07:53:01 GMT) Full text and rfc822 format available.

Message #23 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, Steven Allen <steven <at> stebalien.com>, 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Thu, 16 Jan 2025 09:50:50 +0200
close 75576 31.0.50
thanks

>> >> > This was causing EXWM to mis-calculate the window height when centaur
>> >> > tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.
>> >> 
>> >> Eli, is this patch eligible to be installed on the emacs-30 release branch?
>> >
>> > Is that really urgent?  We've lived with this since Emacs 27, I guess?
>> 
>> It's a nice to have but not urgent. I plan on adding a workaround to
>> EXWM anyways and I doubt many others are impacted. The only question is
>> which version to check in that workaround.
>
> Then I prefer to install this on master.  We can consider backporting
> it after Emacs 30.1 is released, if no problems are reported for the
> change on master.

So now pushed to master.

Thanks Steven for the patch.




bug marked as fixed in version 31.0.50, send any further explanations to 75576 <at> debbugs.gnu.org and Steven Allen <steven <at> stebalien.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 16 Jan 2025 07:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Thu, 16 Jan 2025 17:39:02 GMT) Full text and rfc822 format available.

Message #28 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Thu, 16 Jan 2025 19:34:40 +0200
[Message part 1 (text/plain, inline)]
BTW, I don't know how this slipped through the cracks,
but now I checked again, and found more occurrences
to fix on master:

[window-tab-line-height.patch (text/x-diff, inline)]
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 6fe691693b4..dd0a2231c94 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -906,7 +906,9 @@ mouse-drag-line
 		  ;; If necessary, add height of header line to `position'
 		  (when (memq (posn-area start)
 			      '(nil left-fringe right-fringe left-margin right-margin))
-		    (setq position (+ (window-header-line-height posn-window) position))))
+		    (setq position (+ (window-header-line-height posn-window)
+				      (window-tab-line-height posn-window)
+				      position))))
 		;; When the cursor overshoots after shrinking a window to its
 		;; minimum size and the dragging direction changes, have the
 		;; cursor first catch up with the window edge.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 47499262b37..fd7fe01d2d8 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -6747,6 +6747,7 @@ gnus-article-beginning-of-window
 	  (max 1 (- (window-height)
 		    (if mode-line-format 1 0)
 		    (if header-line-format 1 0)
+		    (if tab-line-format 1 0)
 		    2))))))
 
 (defvar scroll-in-place)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75576; Package emacs. (Thu, 16 Jan 2025 17:51:01 GMT) Full text and rfc822 format available.

Message #31 received at 75576 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: rudalics <at> gmx.at, 75576 <at> debbugs.gnu.org
Subject: Re: bug#75576: [PATCH] Take the tab-line into account when
 computing the window edges
Date: Thu, 16 Jan 2025 19:50:16 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: rudalics <at> gmx.at,  75576 <at> debbugs.gnu.org
> Date: Thu, 16 Jan 2025 19:34:40 +0200
> 
> BTW, I don't know how this slipped through the cracks,
> but now I checked again, and found more occurrences
> to fix on master:

Thanks.  I guess people who use tab-line rarely if ever use any
callers of these functions, and vice versa.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Feb 2025 12:24:18 GMT) Full text and rfc822 format available.

This bug report was last modified 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.