From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.bugs Subject: bug#56874: 28.1.50; tab-bar-format-align-right should probably use string-width Date: Mon, 1 Aug 2022 11:49:19 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 To: 56874@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 19:11:50 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 1oIYxH-0001dr-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 19:11:48 +0200 Original-Received: from localhost ([::1]:43306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIYxH-0005xT-2D for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 13:11:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYcF-0003bi-Ne for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:50:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIYcE-0001I4-EX for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIYcE-0005jc-8b for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adam Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56874 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165937257721982 (code B ref -1); Mon, 01 Aug 2022 16:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2022 16:49:37 +0000 Original-Received: from localhost ([127.0.0.1]:41487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIYbp-0005iU-AS for submit@debbugs.gnu.org; Mon, 01 Aug 2022 12:49:37 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIYbj-0005iH-Vn for submit@debbugs.gnu.org; Mon, 01 Aug 2022 12:49:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYbj-0003Q3-B7 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:49:31 -0400 Original-Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]:33009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYbh-000192-Ba for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:49:31 -0400 X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CB6B66C2B41 for ; Mon, 1 Aug 2022 16:49:20 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a243.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 63A4F6C24CC for ; Mon, 1 Aug 2022 16:49:20 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1659372560; a=rsa-sha256; cv=none; b=NZnMcQfPpX1knTEGYVB/fQLp0OO32hOS1Bp5JQefFWlO7DwehG0aNPI5gm1HEnmZFPo90k 8jLfz0DRfBkQ5uEjEAJhFmgFc2F4Waq6vy1aa1wot9XHj/kIqiOeTBY/fp6qDqDIhVv2at WDHViC7ayU/rvRrgdFkC2/3ndj8gGpn+CnQcQTzXXJPs9qen9zdOe9KkVsrsYu1hnIGzhQ XVG4f10gO6d3yjpTUlIU2pygUeMqAD3xtdK/BZ37QyeS5ha6xvumPvIVMv6rMt1HDn/X/M RcRcTOCOKwuAN0+kwU38NsmJmxv5FP11M6YHGtasYyxQLA796KH6bWvJIlLbqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1659372560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=t+NOfNs+DNWuTBPNVZbdPgntAeL+FiQBHK+1i3hpOog=; b=6wn+3bZjT4WnVL0UPNONcB0gFH3o606T6ISpcQOkCBcr4y7XMDLgwgIyNWxA1DslU2F02V geaCb9fds3eowN6/Yav8synrYHGiBQ3crAqkgwcrxsIL3N8bLDeOpqI96YhmEDXMu8eQik Ltla4RtxnUqwiU9WGtQvkqKSTmMmh9GQeLgxk04mtjiwR3Nou2bgtSU7vhkh2CKnebZ8TK WiiXvPEFBznh+uSh1jokFFMe1uE19CkX7dOlzh9hw3ue5oly/uD3m4nQMGrQiv549A5MnN zQO3YfjAL1SK+ugnIY3L9O0Azs1TEMd0iy4Skm4sJrAQx0kySf/Ssm8jAWPwMQ== ARC-Authentication-Results: i=1; rspamd-7586b5656-9ph8g; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|inbox@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Spot-Arithmetic: 3de8f5ed47310417_1659372560617_3290468407 X-MC-Loop-Signature: 1659372560617:1534517971 X-MC-Ingress-Time: 1659372560616 Original-Received: from pdx1-sub0-mail-a243.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.115.45.58 (trex/6.7.1); Mon, 01 Aug 2022 16:49:20 +0000 Original-Received: from [10.194.0.94] (unknown [136.144.43.21]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: inbox@alphapapa.net) by pdx1-sub0-mail-a243.dreamhost.com (Postfix) with ESMTPSA id 4LxPGm0Nvtz2k for ; Mon, 1 Aug 2022 09:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1659372560; bh=t+NOfNs+DNWuTBPNVZbdPgntAeL+FiQBHK+1i3hpOog=; h=Date:To:From:Subject:Content-Type:Content-Transfer-Encoding; b=zPNxG35z1yY+18DWRP3dn0s6gPJq+NlFrIDM+x4sGzGgUzEUsZ5itM53pnA40Lj12 su5HgrWTAKENA/GEvipUTCdV4NOeRg3XET97+lb8dM7v8U+G6gpOaqPnISF8h85wzP NJA3wbt2ses99t9eM6OYk7YUemG9KshCuNEiN8K2mL/5+F4G+69T8zXG7BiDJMLB4b iITgKBjyI7LLh89t9wDzF/WyRsz1dVu+5xBuKwmYGFHKT5sUhtnF1tiN/liwaMX2Mz Aw/hC87rE7/Y+T+mYgg3Uxw2BPU+/AjS7UWN0UawQITsVbr6sQoZg7IO4VMlU/tIyQ 5XDDMQdCt7w5Q== Content-Language: en-US Received-SPF: neutral client-ip=23.83.212.47; envelope-from=adam@alphapapa.net; helo=cyan.elm.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:238454 Archived-At: Hi Juri, et al, I noticed that, when I added a mode line construct to global-mode-line and enabled the display of such in the tab line (using tab-bar-format-align-right, etc.), the construct wrapped onto a second line in the tab bar. I looked at the source code of tab-bar-format-align-right and noticed that it uses length instead of string-width. I changed it to string-width and it fixed the problem. Note that a similar problem remains: if the tab-bar face has, for example, a larger height than the default face, the width will still be incorrectly calculated, causing wrapping onto a new line. I don't know how to fix that, since window-text-pixel-size requires a buffer and a window. But this is an improvement, anyway. Thanks, Adam