GNU bug report logs - #78953
31.0.50; tab-bar-format-align-right alignment breaks if field widths change

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Fri, 4 Jul 2025 06:41:02 UTC

Severity: normal

Fixed in version 31.0.50

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

Full log


View this message in rfc822 format

From: Stéphane Marks <shipmints <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: 78953 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#78953: 31.0.50; tab-bar-format-align-right alignment breaks if field widths change
Date: Thu, 10 Jul 2025 10:16:33 -0400
[Message part 1 (text/plain, inline)]
On Thu, Jul 10, 2025 at 9:49 AM Daniel Mendler <mail <at> daniel-mendler.de>
wrote:

> Stéphane Marks <shipmints <at> gmail.com> writes:
>
> > On Thu, Jul 10, 2025 at 9:34 AM Daniel Mendler <mail <at> daniel-mendler.de>
> > wrote:
> >
> >> Stéphane Marks <shipmints <at> gmail.com> writes:
> >>
> >> > On Thu, Jul 10, 2025 at 9:23 AM Daniel Mendler <
> mail <at> daniel-mendler.de>
> >> > wrote:
> >> >
> >> >> Stéphane Marks <shipmints <at> gmail.com> writes:
> >> >>
> >> >> > What if, instead, each tab's content would shrink to fit? This is
> >> >> > closer to how web browsers fit tabs. There are browser extensions
> that
> >> >> > offer multiple lines or scroll left/right, but I find those more
> >> >> > annoying since I can't see them all.
> >> >>
> >> >> Yes, this would be great, as long as each tab bar field would shrink,
> >> >> not only the tabs themselves at the very left. For me the overflow
> >> >> happens not only because I have too many tabs but because my system
> bar
> >> >> gets too long.
> >> >>
> >> >> However I suspect that such shrinking behavior is harder to implement
> >> >> nicely, in contrast to simple truncation.
> >> >>
> >> >
> >> > Reading through tab-bar for a feature I don't use, but maybe I
> should, is
> >> > `tab-bar-auto-width` and its controls `tab-bar-auto-width-max` and
> >> > `tab-bar-auto-width-min` so perhaps this feature already exists.
> >>
> >> I see. This is exactly the feature which does not help for my use case,
> >> since it only resizes the tabs and not all the other tab fields, which I
> >> would like to truncate.
> >>
> >> I would like to see an option `tab-bar-truncate' or `tab-line-truncate'
> >> which simply prevent line wrapping, similar to the buffer variable
> >> `truncate-lines'.
> >>
> >
> > Perhaps customizing `tab-bar-auto-width-faces` and/or
> > `tab-bar-auto-width-functions` would allow relaxing field limits to your
> > taste.
>
> This looks interesting. But I just naively tried the following and Emacs
> hangs up as result.
>
> (setq tab-bar-auto-width t
>       tab-bar-auto-width-functions (list #'always))
>
> But the auto width setting leads to growing fields and this is not what
> I want. I don't want that the tab fields grow. I want them to shrink
> only in case of overflow. So maybe `tab-bar-auto-width` could be
> extended to handle the values nil, t, or `no-grow'? And also another
> auto width function could be added which handles non-tab fields too.
>

Seems sensible.  Not sure on the hang.  I'll leave that to Juri...
[Message part 2 (text/html, inline)]

This bug report was last modified 13 days ago.

Previous Next


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