emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix width tabs


From: Juri Linkov
Subject: Re: Fix width tabs
Date: Fri, 18 Feb 2022 09:49:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> When a tab has multiple windows, its name is updated depending on
> current buffer name.  Switching window (C-x o) results in the tab being
> renamed.

This problem doesn't exist when tab-bar-tab-name-function
shows all window buffers with tab-bar-tab-name-all.
So a possible solution is to enable this by default.

> But buffer names of a given tab have heterogeneous lengths (*Help*,
> *Summary Listes/emacs-devel*, etc.). Thus the tab bar layout may change
> a lot while switching window, which is annoying: Visually, the tab bar
> can occupy two lines then one, etc.
>
> I'd like to configure all tabs to have the same width, whatever the
> length of the name of the current buffer of a particular tab is. That
> width could be the frame width divided by the number of tabs.
>
> But I've not found a way to do that with current options. Is it already
> possible?

Yes, it's possible to do by writing a new function for
tab-bar-tab-name-function.  There was a similar function
for fixed tab widths in tab-line.el, but after discussions
it was removed because it wasted too much screen space
with empty spaces used to adjust for fixed widths.

> My understanding is that it's the default behavior in other applications
> like Firefox. Is there good reason to have different default?

The good reason is to have the more compact tab bar.
If you want, you could try experimenting by writing a function
for tab-bar-tab-name-function with padding every tab name
by proportional amount of space.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]