From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#59620: 29.0.50; Wrong global-mode-string position in tab-bar + emacs -nw Date: Mon, 28 Nov 2022 19:29:38 +0200 Organization: LINKOV.NET Message-ID: <868rjv9ed9.fsf@mail.linkov.net> References: <83k03grkaa.fsf@gnu.org> <86h6yjmpm6.fsf@mail.linkov.net> <83r0xnnsl0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6377"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: gabriel376@hotmail.com, 59620@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 28 18:37:22 2022 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 1ozi4I-0001TJ-HP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Nov 2022 18:37:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozi41-00081z-HC; Mon, 28 Nov 2022 12:37:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozi3z-00081f-0p for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 12:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozi3y-00079I-My for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 12:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozi3y-0006ap-HS for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2022 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59620 X-GNU-PR-Package: emacs Original-Received: via spool by 59620-submit@debbugs.gnu.org id=B59620.166965697725333 (code B ref 59620); Mon, 28 Nov 2022 17:37:02 +0000 Original-Received: (at 59620) by debbugs.gnu.org; 28 Nov 2022 17:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:49916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozi3F-0006aX-0C for submit@debbugs.gnu.org; Mon, 28 Nov 2022 12:36:17 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozi3D-0006aR-3W for 59620@debbugs.gnu.org; Mon, 28 Nov 2022 12:36:15 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2D2991C0005; Mon, 28 Nov 2022 17:36:07 +0000 (UTC) In-Reply-To: <83r0xnnsl0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 28 Nov 2022 14:58:51 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249333 Archived-At: --=-=-= Content-Type: text/plain > On TTY frames the tab bar is not a window, so what I wrote is impossible, > and thus avoiding the 'right' part in the align-to spec is a good idea > regardless. Avoiding the 'right' part in align-to has such a drawback that while resizing the frame the position of the aligned element is not updated immediately. It's updated only when display-time refreshes the time on the tab bar. The position relative to the right edge has no such problem. So better to leave the 'right' part on GUI frames, and switch to counting from the left only on TTY frames where frames are resized less often: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tab-bar-format-align-right.patch diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index eb4cec48619..cabad9d7d5e 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -936,7 +936,10 @@ tab-bar-format-align-right (hpos (progn (add-face-text-property 0 (length rest) 'tab-bar t rest) (string-pixel-width rest))) - (str (propertize " " 'display `(space :align-to (- right (,hpos)))))) + (str (propertize " " 'display + (if window-system + `(space :align-to (- right (,hpos))) + `(space :align-to (,(- (frame-inner-width) hpos))))))) `((align-right menu-item ,str ignore)))) (defun tab-bar-format-global () --=-=-=--