Subject: bug#78953: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change

From: Juri Linkov <[email-masked]>
Date: Thu, 10 Jul 2025 21:20:16 +0300

> Since we are talking about the tab bar already I have another question -
> sometimes (rarely) my tab bar gets too long and then it wraps around,

It wraps around because the tab-bar is multi-line:
the number of tab-bar lines is defined by the frame parameter
'tab-bar-lines'.  So you can use more lines for text that
doesn't fit on the first line.

> which I find undesirable.

Is this when you set tab-bar-auto-width to nil?
Or the global string is too long?

> I would prefer if the content were truncated.

Can you truncate the global string inside :eval, e.g.

(setq global-mode-string
      '("|" (:eval (truncate-string-to-width (make-string 100 ?#) 10)) "|"))

> I suspect this is harder to address,

The wrapping is hard to disable.  So it's easier to truncate
the overly long strings.

> e.g., via an option tab-bar-truncate/tab-line-truncate? In any case,
> this is a rare edge case in my usage.

There are truncation options only for tab names, not for the global string.