From: Eli Zaretskii <eliz@gnu.org>
To: Liu Hui <liuhui1610@gmail.com>
Cc: 67161@debbugs.gnu.org
Subject: bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'
Date: Tue, 14 Nov 2023 15:26:38 +0200 [thread overview]
Message-ID: <8334x8tqi9.fsf@gnu.org> (raw)
In-Reply-To: <CAOQTW-MSpBK4ACpLk8U2m6HJx8HXw21O0kyYZ-i85ETNjyOUcA@mail.gmail.com> (message from Liu Hui on Tue, 14 Nov 2023 17:52:58 +0800)
> From: Liu Hui <liuhui1610@gmail.com>
> Date: Tue, 14 Nov 2023 17:52:58 +0800
>
> The attached patch implements the feature of controlling the display
> length of filename in dired buffers.
>
> When setting this option to `window', the long filename is shortened
> by hiding the middle part to ensure that the whole line needs not to
> be wrapped. The option can also be set to an integer, meaning the
> maximum display length of filename. For users who turn on line
> truncation, this feature can display the end part including the file
> extension, which I think is convenient.
Thanks.
> +(defcustom dired-filename-hiding-ellipsis "…"
We shouldn't use non-ASCII characters by default, without checking
they can be displayed.
> + (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?
next prev parent reply other threads:[~2023-11-14 13:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 9:52 bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length' Liu Hui
2023-11-14 13:26 ` Eli Zaretskii [this message]
2023-11-15 10:04 ` Liu Hui
2023-11-15 12:32 ` Eli Zaretskii
2023-11-16 10:07 ` Liu Hui
2023-11-16 12:11 ` Eli Zaretskii
2023-11-18 9:23 ` Liu Hui
2023-11-18 10:55 ` Eli Zaretskii
2023-11-18 16:12 ` Drew Adams
2023-11-20 4:34 ` Liu Hui
2023-11-20 12:10 ` Eli Zaretskii
2023-11-20 17:54 ` Juri Linkov
2023-11-20 18:42 ` Eli Zaretskii
2023-11-20 18:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-20 19:17 ` Eli Zaretskii
2023-11-21 7:52 ` Juri Linkov
2023-11-21 11:55 ` Eli Zaretskii
2023-11-21 17:12 ` Juri Linkov
2023-11-20 17:20 ` Drew Adams
2023-11-22 5:41 ` Liu Hui
2023-11-25 10:52 ` Eli Zaretskii
2023-11-25 17:51 ` Juri Linkov
2023-11-25 20:02 ` Eli Zaretskii
2023-11-26 2:56 ` Liu Hui
2023-11-26 5:59 ` Eli Zaretskii
2023-11-26 10:49 ` Eli Zaretskii
2023-11-26 14:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 14:53 ` Eli Zaretskii
2023-11-26 17:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 17:58 ` Eli Zaretskii
2023-11-26 18:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27 7:19 ` Juri Linkov
2023-11-27 8:32 ` Liu Hui
2023-11-27 17:16 ` Juri Linkov
2023-11-15 18:06 ` Drew Adams
2023-11-15 15:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 3:44 ` Liu Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8334x8tqi9.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=67161@debbugs.gnu.org \
--cc=liuhui1610@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.