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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#67161: closed (30.0.50; [PATCH] Add option `dired-filename-display-length')
Date: Sat, 25 Nov 2023 10:53:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 25 Nov 2023 12:52:34 +0200
with message-id <83jzq6cdfx.fsf <at> gnu.org>
and subject line Re: bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'
has caused the debbugs.gnu.org bug report #67161,
regarding 30.0.50; [PATCH] Add option `dired-filename-display-length'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
67161: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67161
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Liu Hui <liuhui1610 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Add option `dired-filename-display-length'
Date: Tue, 14 Nov 2023 17:52:58 +0800
[Message part 3 (text/plain, inline)]
Hi,

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.


Best,

--
Liu Hui
[0001-Add-option-dired-filename-display-length.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Liu Hui <liuhui1610 <at> gmail.com>
Cc: 67161-done <at> debbugs.gnu.org, stefankangas <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#67161: 30.0.50;
 [PATCH] Add option `dired-filename-display-length'
Date: Sat, 25 Nov 2023 12:52:34 +0200
> From: Liu Hui <liuhui1610 <at> gmail.com>
> Date: Wed, 22 Nov 2023 13:41:18 +0800
> Cc: stefankangas <at> gmail.com, monnier <at> iro.umontreal.ca, 67161 <at> debbugs.gnu.org
> 
> > Therefore, I would like to change
> >
> >   (put-text-property ell-beg (point) 'invisible 'dired-filename-hide)
> >
> > to
> >
> >   (let ((ov (make-overlay ell-beg (point))))
> >     (overlay-put ov 'invisible 'dired-filename-hide)
> >     (overlay-put ov 'isearch-open-invisible t)
> >     (overlay-put ov 'evaporate t))
> >
> > in the attached patch, then text in hidden part can be matched
> > regardless of search-invisible being open or t. It also has a bonus
> > that hidden text can be revealed during isearch.
> 
> Since there is no objection to using overlay, I have updated the patch
> accordingly with additional explanation. Thanks.

Thanks, installed on the master branch, and closing the bug.

Please in the future always mention the bug number as part of the
commit log message, when the bug number is known.


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.