Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline

From: Arthur Miller <[email-masked]>
Date: Fri, 15 May 2020 23:14:59 +0200

Drew Adams <[email-masked]> writes:

>> > an integer - show first N chars of switches
>> 
>> I don't think this is a useful value: the user will rarely know how
>> much space is available on the mode line.
>
> A user may know how much space they're willing
> to give to this, as a general preference/rule.
>
> Mode-line data can vary considerably, depending
> on one's setup, the buffer's mode, and other
> things.  And the effective available space
> depends on window width.
>
> So of course no particular truncation constant
> length will fit all contexts.  Such truncation
> is of limited utility, IMO, but I thought that's
> what was requested.
>
> Sure, truncation could instead be relative (%).
> In that case what it's relative to needs to be
> considered.
>
> This is why, in the general case, a function
> value is there.  You'll recall that in an earlier
> mail I said that truncation can just be done by
> such a function.  (Well, at that point I said a
> `format' string - that too can truncate.)
>
> What I wrote up is just a simple truncation.  If
> you have a better one you want to suggest, fine.
>
>> Also, truncating without showing ellipsis or some
>> other sign of truncation is IMO a sub-optimal UI.
>
> Arguable - mode-line space is limited.  But maybe.
>
> I imagine you're suggesting appending a char such
> as `.' to whatever truncation is used.  That's
> fine by me (though I'm not crazy about that char,
> which I find generally illegible).  An alternative
> (more readable, but wastes 2 more chars, is `...'.
> Another alternative is to surround the set of
> switches with delimiters, e.g. "" or '' or [] ...

As I understand Eli, he means, if switches are displayed only partially
on modeline, then after the switch chars there would be an elipsis,
which I understand means "...". I think it is OK since it indicates
that there is more to it which indeed is quite common, but yes it does
take more space on modeline.