bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Liu Hui
Subject: bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'
Date: Wed, 15 Nov 2023 18:04:13 +0800

Eli Zaretskii <eliz@gnu.org> 于2023年11月14日周二 21:26写道:

> > +(defcustom dired-filename-hiding-ellipsis "…"
>
> We shouldn't use non-ASCII characters by default, without checking
> they can be displayed.

Thanks for pointing this out. I think it can be changed to "...".

> > +    (let ((ell-len (string-width dired-filename-hiding-ellipsis))
> > +          maxlen filename-col)
> > +      (while (< (point) end)
> > +        (ignore-errors
> > +       (if (not (dired-move-to-filename))
>
> Did you consider using truncate-string-to-width here?

I'm not sure what you mean. Using truncate-string-to-width to shorten
string or using truncate-string-ellipsis to obtain the ellipsis? The
problem of truncate-string-to-width is that it produces a new string.
I want to avoid modifying the buffer text since it would break other
dired functionalities. Therefore this patch only changes the display
instead of the underlying text.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]