[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: |
Eli Zaretskii |
Subject: |
bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length' |
Date: |
Tue, 14 Nov 2023 15:26:38 +0200 |
> 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?
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/14
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length',
Eli Zaretskii <=
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/15
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/15
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/16
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/16
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Drew Adams, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/19
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Juri Linkov, 2023/11/20