Juri Linkov <juri@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 78953) by debbugs.gnu.org; 9 Jul 2025 06:33:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 09 02:33:55 2025 Received: from localhost ([127.0.0.1]:48052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uZONO-00080n-Vd for submit <at> debbugs.gnu.org; Wed, 09 Jul 2025 02:33:55 -0400 Received: from mout-y-111.mailbox.org ([2001:67c:2050:103:465::111]:52270) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uZONL-0007zE-Mg; Wed, 09 Jul 2025 02:33:53 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bcSq80KXVz9y0x; Wed, 9 Jul 2025 08:33:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752042820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pJ+hUBNuF5ip6cTf0x3uEdA8eVIHaThvOj4Vu6KFvVI=; b=Wegxyy436cGHzfdIgqsOjTEMrJGgDKX5ME2h7K5eZqxXAMI7aCcQdGvH85pCfUoVxgjayy to7lD3CEm0dkPh8nvbzknKx8btHINYqBgXg1TuGLMrjFOimH0D3lMneXMnQ+4SvOlEfvdD 4apePACfA+4JOygIf+PVepi3P7rwb4bYokUgzHCdfYtd0j+8kfQs8Tc3KPGTbfhUtsS6z5 YtvHzy+JMi8+QJb01x7y/wV/d9GEugjz3B285rjt5NbGlbmNzp2k2NhyN2i0SoD7+X8GjP dkk6M/b0Sw7kCp2K70iLdSBUX+6AgIlx1HjXV6nXGlt2KpfbySTnYzsScbV5JA== From: Juri Linkov <juri@HIDDEN> To: Daniel Mendler <mail@HIDDEN> Subject: Re: bug#78953: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change In-Reply-To: <87sejc775p.fsf@HIDDEN> Organization: LINKOV.NET References: <87h5zsa28z.fsf@HIDDEN> <878ql4tpkl.fsf@HIDDEN> <87sejc775p.fsf@HIDDEN> Date: Wed, 09 Jul 2025 09:32:39 +0300 Message-ID: <87sej5ri0o.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78953 Cc: 78953 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 78953 31.0.50 thanks >>> A more realistic configuration with a timer (and a variable pitch face) >>> also shows the problem. A possible solution could be to handle >>> `tab-bar-format-align-right' in `tab-bar-format-list', such that the >>> functions in the `tab-bar-format' list after >>> `tab-bar-format-align-right' are not called twice, such that the >>> computed field width matches the displayed field. Now `tab-bar-format-list' and `tab-bar-format-align-right' are fixed to not call `tab-bar-format-global' twice. > Also another problem I've observed is that `string-pixel-width' is slow, > which is a problem with frequent updates/redisplays, for example when > scrolling a lot with `pixel-scroll-precision-mode'. > > I suggest to update `:align-to' in `tab-bar-format-list' and also cache > the computed width and the formatted tab bar string. Then the cached > string can be compared with `equal-including-properties` and only if the > string changes, the pixel width needs to be recomputed. Now the formatted tab bar string is cached as well.
bug-gnu-emacs@HIDDEN
:bug#78953
; Package emacs
.
Full text available.Received: (at 78953) by debbugs.gnu.org; 4 Jul 2025 07:21:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 04 03:21:50 2025 Received: from localhost ([127.0.0.1]:56300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uXak2-0006I6-46 for submit <at> debbugs.gnu.org; Fri, 04 Jul 2025 03:21:50 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:59969 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1uXajy-0006H5-FU for 78953 <at> debbugs.gnu.org; Fri, 04 Jul 2025 03:21:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RmDyJkYN9BHQB0oMOqg1MjufttLTRDkhr6H3N18MVZk=; b=d+It5c7B8/50ey1zMPshSMTS8q 5bbT9dL4sy5LeiGKt0HkTEksEYgq+zqhif5Or1FutLMJc9r3MGzh1DTOTeKvTb6VHckJlwAs4mM4p 7In4genk9yaPZgtooGZU/RPLhsnbqomXxisLqBcGXtbhajkd2vgcbnTgI4saDKbf2ohs=; From: Daniel Mendler <mail@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#78953: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change In-Reply-To: <878ql4tpkl.fsf@HIDDEN> References: <87h5zsa28z.fsf@HIDDEN> <878ql4tpkl.fsf@HIDDEN> Date: Fri, 04 Jul 2025 09:21:38 +0200 Message-ID: <87sejc775p.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78953 Cc: 78953 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Juri Linkov <juri@HIDDEN> writes: >> When fields in `tab-bar-format' after `tab-bar-format-align-right' >> change their width between two calls, then the alignment breaks - the >> right aligned tab field jumps around. Example configuration which uses a >> `global-mode-string' with a random width: >> >> (setq tab-bar-format >> '( tab-bar-format-tabs >> tab-bar-format-align-right >> tab-bar-format-global)) >> >> (setq global-mode-string >> '("|" (:eval (make-string (random 10) ?#)) "|")) >> >> (run-at-time 1 1 #'force-mode-line-update t) > > Thanks, I confirm the problem. Thanks for checking. >> A more realistic configuration with a timer (and a variable pitch face) >> also shows the problem. A possible solution could be to handle >> `tab-bar-format-align-right' in `tab-bar-format-list', such that the >> functions in the `tab-bar-format' list after >> `tab-bar-format-align-right' are not called twice, such that the >> computed field width matches the displayed field. > > So need to update :align-to in tab-bar-format-list. Yes, exactly. Also another problem I've observed is that `string-pixel-width' is slow, which is a problem with frequent updates/redisplays, for example when scrolling a lot with `pixel-scroll-precision-mode'. I suggest to update `:align-to' in `tab-bar-format-list' and also cache the computed width and the formatted tab bar string. Then the cached string can be compared with `equal-including-properties` and only if the string changes, the pixel width needs to be recomputed. Daniel
bug-gnu-emacs@HIDDEN
:bug#78953
; Package emacs
.
Full text available.Received: (at 78953) by debbugs.gnu.org; 4 Jul 2025 06:53:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 04 02:53:52 2025 Received: from localhost ([127.0.0.1]:56213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uXaIx-00035B-Rq for submit <at> debbugs.gnu.org; Fri, 04 Jul 2025 02:53:52 -0400 Received: from mout-y-111.mailbox.org ([91.198.250.236]:50542) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uXaIs-00033C-Il for 78953 <at> debbugs.gnu.org; Fri, 04 Jul 2025 02:53:48 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bYPVV2h4Xz9xrB; Fri, 4 Jul 2025 08:53:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1751612018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6HJX3oOyX6w5SW37nRNmjP26HXQYOUVx0Xd/v49kA+s=; b=ppgKpI+21krxE2BXmH5VgIFfOFh+1u+vja79TI+q2jNNYjElywGP00WkGdrBEyCKSTYJj0 u7rU8zgNKGsZMFFTza1s3Q18xyknVM0zEQYEQbAoCJrfisAtiTC3+jHwxfR1svG1g+LnF6 NBhP9RFWjv4BJvho06RxlR+sm8QfR1pcJ3VY/AveVWxMozI7xqRT0uvC2ET0iua3oJBsZG PCoxiBeCTtiRwk+udhKIB7H3oV25pRGU6crKhiNq4ItaQUjiY+wS7o0n9HTmPQJagQUNuP q2gaKJabMCUqU2niHNCoLOmvM2QRy6hxf9730ok1ETFzCT5r6PzW7CUTVF/cCQ== From: Juri Linkov <juri@HIDDEN> To: Daniel Mendler <mail@HIDDEN> Subject: Re: bug#78953: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change In-Reply-To: <87h5zsa28z.fsf@HIDDEN> Organization: LINKOV.NET References: <87h5zsa28z.fsf@HIDDEN> Date: Fri, 04 Jul 2025 09:52:58 +0300 Message-ID: <878ql4tpkl.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4bYPVV2h4Xz9xrB X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 78953 Cc: 78953 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.5 (-) > When fields in `tab-bar-format' after `tab-bar-format-align-right' > change their width between two calls, then the alignment breaks - the > right aligned tab field jumps around. Example configuration which uses a > `global-mode-string' with a random width: > > (setq tab-bar-format > '( tab-bar-format-tabs > tab-bar-format-align-right > tab-bar-format-global)) > > (setq global-mode-string > '("|" (:eval (make-string (random 10) ?#)) "|")) > > (run-at-time 1 1 #'force-mode-line-update t) Thanks, I confirm the problem. > A more realistic configuration with a timer (and a variable pitch face) > also shows the problem. A possible solution could be to handle > `tab-bar-format-align-right' in `tab-bar-format-list', such that the > functions in the `tab-bar-format' list after > `tab-bar-format-align-right' are not called twice, such that the > computed field width matches the displayed field. So need to update :align-to in tab-bar-format-list.
bug-gnu-emacs@HIDDEN
:bug#78953
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 4 Jul 2025 06:40:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 04 02:40:02 2025 Received: from localhost ([127.0.0.1]:56162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uXa5Z-0001S4-64 for submit <at> debbugs.gnu.org; Fri, 04 Jul 2025 02:40:01 -0400 Received: from lists.gnu.org ([2001:470:142::17]:51606) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1uXa5U-0001RU-QE for submit <at> debbugs.gnu.org; Fri, 04 Jul 2025 02:39:59 -0400 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 <mail@HIDDEN>) id 1uXa5O-00083w-0i for bug-gnu-emacs@HIDDEN; Fri, 04 Jul 2025 02:39:50 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1uXa5K-0006tP-Ry for bug-gnu-emacs@HIDDEN; Fri, 04 Jul 2025 02:39:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GyI6AW6cA7iDWcRx2jQUpC2z2jInDn2HTaPghEz0JgU=; b=D/ESpc9QccuDS5eYFwjZe1el4f omevRlxigz7IBNk08esaQ5nuvg5b0wVzU+E4pd4rNIheA2wSufPBZb+b7JoRDwSy1vFxAG8BjSec3 iYV8pBJ6V3+v3eMhvhusKm0HawQyj3uVoWn94+htZK2S6UthcMWP1KnRHo9g90F+3TOs=; From: Daniel Mendler <mail@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change X-Debbugs-Cc: Juri Linkov <juri@HIDDEN> Date: Fri, 04 Jul 2025 08:39:24 +0200 Message-ID: <87h5zsa28z.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@HIDDEN; helo=mail.qxqx.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) When fields in `tab-bar-format' after `tab-bar-format-align-right' change their width between two calls, then the alignment breaks - the right aligned tab field jumps around. Example configuration which uses a `global-mode-string' with a random width: (setq tab-bar-format '( tab-bar-format-tabs tab-bar-format-align-right tab-bar-format-global)) (setq global-mode-string '("|" (:eval (make-string (random 10) ?#)) "|")) (run-at-time 1 1 #'force-mode-line-update t) A more realistic configuration with a timer (and a variable pitch face) also shows the problem. A possible solution could be to handle `tab-bar-format-align-right' in `tab-bar-format-list', such that the functions in the `tab-bar-format' list after `tab-bar-format-align-right' are not called twice, such that the computed field width matches the displayed field. In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-06-20 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB
Daniel Mendler <mail@HIDDEN>
:juri@HIDDEN, bug-gnu-emacs@HIDDEN
.
Full text available.juri@HIDDEN, bug-gnu-emacs@HIDDEN
:bug#78953
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.