[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix width tabs
From: |
Eli Zaretskii |
Subject: |
Re: Fix width tabs |
Date: |
Sat, 05 Nov 2022 19:28:43 +0200 |
> From: Juri Linkov <juri@linkov.net>
> Cc: orontee@gmail.com, emacs-devel@gnu.org
> Date: Sat, 05 Nov 2022 19:12:54 +0200
>
> > This begs the question: what is the fixed width to which the tabs are
> > resized? if it's "fixed", then the value is known in advance, right?
> > Moreover, if the tab sizes are fixed, why does the doc string say
> > "automatically resize"? "resizing" is the antithesis of "fixed width".
>
> Maybe a better name would be `tab-bar-auto-resize'?
> But this name will be confused with the existing
> `auto-resize-tab-bars' that resizes the tab-bar's height,
> not width.
We can think about a good name for the variable when we have a good
understanding of the behavior it changes.
> > Can you explain in plain words what this option does, when it is
> > non-nil? (There's a hint to that in the doc string of
> > tab-bar-fixed-width-max, but that's not the right place for this
> > information.) Also, what does it do when it's nil?
>
> When tab-bar-fixed-width is non-nil, tabs are distributed evenly
> across the tab-bar. When also tab-bar-fixed-width-max is a number,
> then tab names are truncated to the defined width.
>
> In any case, short tab names are filled with spaces.
> Currently there is no option to avoid filling with spaces.
> Maybe tab-bar-fixed-width could also support a new value
> 'shrink-only' for this.
Ok, and what happens when tab-bar-fixed-width is nil?
> > The style of the doc string is also problematic: we shouldn't describe
> > in a doc string of user option what problems it solves. Instead, we
> > should tell what is the behavior for each valid value of the option;
> > the judgment of what is a "problem" and what isn't is left to the
> > user, because the needs of users may differ, and what is a "problem"
> > for some is a "solution" to others. That's why we have user options
> > to begin with.
> >
> > The NEWS entry is also problematic, basically for the same reason.
>
> Maybe the description of problems should be moved from the doc string
> to NEWS?
No, I don't think so. I believe if we explain the behavior with both
nil and non-nil values, users will understand what it does for them in
various situations, and we won't need to qualify anything as a
"problem".
Thanks.