[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: |
Thu, 27 Oct 2022 10:40:27 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> OTOH, I can't imagine how you could implement a formatting function
> without requiring two-pass tabs generation that is highly inefficient:
> after the first pass you get the number of tabs, groups of tabs,
> and their names. Then on the second pass you can pad names
> with required amount of space proportional to the total number of tabs.
>
> So a more efficient implementation would be to modify the strings
> that represent the tab names in the result of tab-bar-format-list
> (e.g. by using advice-add for experimentation). But a drawback is
> that then you need to rely on the details of implementation of the
> internal data structure.
I still see no other way to implement pixel-based filling/justifying
of tab names. So here is a prototype to try that later will be adapted
to tab-bar.el. It seems that's all we can do for nicer-looking tabs.
At least, it resizes tabs like in web browsers. And the default value
of tab-bar-tab-width-max is the same as in Firefox.
tab-bar-tab-width-max.el
Description: application/emacs-lisp
- Re: Fix width tabs,
Juri Linkov <=