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

Previous Next

Package: emacs;

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 #11 received at 67161 <at> debbugs.gnu.org (full text, mbox):

From: Liu Hui <liuhui1610 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67161 <at> debbugs.gnu.org
Subject: Re: bug#67161: 30.0.50;
 [PATCH] Add option `dired-filename-display-length'
Date: Wed, 15 Nov 2023 18:04:13 +0800
Eli Zaretskii <eliz <at> 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.




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.