[Top][All Lists]

[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: Wed, 02 Nov 2022 20:01:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> Firefox choose to change the foreground color on tabs end to make names
> easier to read.  I guess it isn't supported by Emacs. So I use to set
> tab-bar-tab-name-function to tab-bar-tab-name-truncated and
> tab-bar-tab-name-ellipsis to t.  It helps distinguish the separation
> between tab names.  Is it expected for the truncation to not applying
> anymore with the code you sent?

Unfortunately, an ellipsis takes too much screen space.
When "…" is not displayable, then "..." will take 3 chars
from every tab name, and even "…" with variable-pitch fonts
takes almost the same space as "..." with monospaced fonts.

But using a faded foreground color like in Firefox is
the right thing to do.  After adding this to the end:

          (add-face-text-property (- (length (nth 2 item)) 3)
                                  (length (nth 2 item))
                                  'shadow nil (nth 2 item))

produces such nice look where tab names are fading to the right:

PNG image

reply via email to

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