Subject: Re: bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'

From: Stefan Monnier <[email-masked]>
Date: Wed, 15 Nov 2023 10:54:36 -0500

> +(defcustom dired-filename-hiding-ellipsis "…"
[...]
> +(defun dired-filename-update-invisibility-spec ()
> +  (funcall (if (derived-mode-p 'dired-mode)
> +               'add-to-invisibility-spec
> +             'remove-from-invisibility-spec)
> +           `(dired-filename-hide . ,dired-filename-hiding-ellipsis)))

AFAIK this does not do what the code suggests: the ELLIPSIS part
of the element passed to `add-to-invisibility-spec` is treated as
a boolean.

How the ellipses are displayed is controlled by the `selective-display`
extra slot of the display table.

I think it's good that you use `invisible`, tho, specifically since it
then uses whichever ellipsis the user has chosen via the display-table.
The downside is that most users don't know how to change it and there's
no convenient facility to access it.  You probably need something like

    (defun length-of-standard-ellipsis ()
      (let ((glyphs
             (and standard-display-table
                  (display-table-slot standard-display-table
                                      'selective-display))))
        (if glyphs (length glyphs) (eval-when-compile (length "...")))))

-- Stefan