GNU bug report logs -
#67161
30.0.50; [PATCH] Add option `dired-filename-display-length'
Previous Next
Reported by: Liu Hui <liuhui1610 <at> gmail.com>
Date: Tue, 14 Nov 2023 09:55:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 67161 <at> debbugs.gnu.org (full text, mbox):
> +(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
This bug report was last modified 1 year and 234 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.