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

From: Juri Linkov <[email-masked]>
Date: Thu, 01 Oct 2020 22:37:43 +0300

>> There is a better function 'truncate-string-to-width'.
>
> I mentioned that in the previous paragraph.  :-/

Oh, sorry.

But anyway I think that it would be better to keep 'truncate-string-to-width',
and to turn 'truncate-string-ellipsis' into a user option (defvar -> defcustom)
with the default value computed as (if (char-displayable-p ?…) "…" "...")

If this doesn't work on dynamically created mixed X/tty frames,
then maybe allow some value (e.g. 'auto-detect') for 'truncate-string-ellipsis',
so 'truncate-string-to-width' would call (if (char-displayable-p ?…) "…" "...")
every time when 'truncate-string-to-width' is used and recompute the value of
ellipsis.