GNU bug report logs - #61785
[PATCH] Add option to keep some columns in dired-hide-details-mode

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 25 Feb 2023 11:31:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61785 in the body.
You can then email your comments to 61785 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61785; Package emacs. (Sat, 25 Feb 2023 11:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 25 Feb 2023 11:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add option to keep some columns in dired-hide-details-mode
Date: Sat, 25 Feb 2023 12:30:14 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

I find the normal dired buffer a bit too busy but
dired-hide-details-mode a bit too lacking.  So I'd like show only the
details I care most about, for instance like this:

--8<---------------cut here---------------start------------->8---
  /home/augusto/emacs:
  4.0K Feb 25 .
  4.0K Feb 20 ..
  4.0K Feb 25 admin
  4.0K Feb 20 autom4te.cache
  4.0K Feb 25 build-aux
  3.6K Feb 20 aclocal.m4
   11K Feb 25 autogen.sh
   932 Jun  6 BUGS
  ...
--8<---------------cut here---------------end--------------->8---

The above can be obtained by setting

  (setq dired-hide-details-preserved-columns '(5 6 7))

After writing this, I realized one could easily modify the new user
option to be an alist mapping column numbers to arbitrary text
properties to be applied to that column.  If anyone thinks this variant
is useful, I'd be happy to adapt the patch.

[0001-Add-option-to-keep-some-columns-in-dired-hide-detail.patch (text/patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 02 Mar 2023 12:05:01 GMT) Full text and rfc822 format available.

Notification sent to Augusto Stoffel <arstoffel <at> gmail.com>:
bug acknowledged by developer. (Thu, 02 Mar 2023 12:05:02 GMT) Full text and rfc822 format available.

Message #10 received at 61785-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61785-done <at> debbugs.gnu.org
Subject: Re: bug#61785: [PATCH] Add option to keep some columns in
 dired-hide-details-mode
Date: Thu, 02 Mar 2023 14:04:05 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Date: Sat, 25 Feb 2023 12:30:14 +0100
> 
> I find the normal dired buffer a bit too busy but
> dired-hide-details-mode a bit too lacking.  So I'd like show only the
> details I care most about, for instance like this:
> 
> --8<---------------cut here---------------start------------->8---
>   /home/augusto/emacs:
>   4.0K Feb 25 .
>   4.0K Feb 20 ..
>   4.0K Feb 25 admin
>   4.0K Feb 20 autom4te.cache
>   4.0K Feb 25 build-aux
>   3.6K Feb 20 aclocal.m4
>    11K Feb 25 autogen.sh
>    932 Jun  6 BUGS
>   ...
> --8<---------------cut here---------------end--------------->8---
> 
> The above can be obtained by setting
> 
>   (setq dired-hide-details-preserved-columns '(5 6 7))
> 
> After writing this, I realized one could easily modify the new user
> option to be an alist mapping column numbers to arbitrary text
> properties to be applied to that column.  If anyone thinks this variant
> is useful, I'd be happy to adapt the patch.

Thanks, installed on the master branch.  Feel free to post further
enhancements if you think they will be useful.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61785; Package emacs. (Sat, 04 Mar 2023 06:08:01 GMT) Full text and rfc822 format available.

Message #13 received at 61785-done <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61785-done <at> debbugs.gnu.org
Subject: Re: bug#61785: [PATCH] Add option to keep some columns in
 dired-hide-details-mode
Date: Sat, 04 Mar 2023 07:07:02 +0100
On Thu,  2 Mar 2023 at 14:04, Eli Zaretskii wrote:

> Thanks, installed on the master branch.  Feel free to post further
> enhancements if you think they will be useful.

I was having second thoughts about this idea 😬.  The feature is useful
but difficult to implement right.

The problem is that some columns of 'ls -l' are left aligned, so it's
impossible to know where a column starts or ends by looking at an
individual line.

I think I would rather revert the commit until someone comes up with a
better idea, if you don't mind.  The ideal would be if 'ls --dired'
would report the names and positions of the columns.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61785; Package emacs. (Sat, 04 Mar 2023 07:55:02 GMT) Full text and rfc822 format available.

Message #16 received at 61785-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61785-done <at> debbugs.gnu.org
Subject: Re: bug#61785: [PATCH] Add option to keep some columns in
 dired-hide-details-mode
Date: Sat, 04 Mar 2023 09:54:00 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Cc: 61785-done <at> debbugs.gnu.org
> Date: Sat, 04 Mar 2023 07:07:02 +0100
> 
> I think I would rather revert the commit until someone comes up with a
> better idea, if you don't mind.

I'm not sure I see a problem with counting columns.

What is the harm of keeping the commit on master?  If we get
complaints about it, we have ample time to remove the feature when and
if we get those complaints.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61785; Package emacs. (Sat, 04 Mar 2023 11:27:02 GMT) Full text and rfc822 format available.

Message #19 received at 61785-done <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61785-done <at> debbugs.gnu.org
Subject: Re: bug#61785: [PATCH] Add option to keep some columns in
 dired-hide-details-mode
Date: Sat, 04 Mar 2023 12:26:36 +0100
On Sat,  4 Mar 2023 at 09:54, Eli Zaretskii wrote:

>> From: Augusto Stoffel <arstoffel <at> gmail.com>
>> Cc: 61785-done <at> debbugs.gnu.org
>> Date: Sat, 04 Mar 2023 07:07:02 +0100
>> 
>> I think I would rather revert the commit until someone comes up with a
>> better idea, if you don't mind.
>
> I'm not sure I see a problem with counting columns.
>
> What is the harm of keeping the commit on master?  If we get
> complaints about it, we have ample time to remove the feature when and
> if we get those complaints.

The problem is that the code asssumes the columns are right-aligned,
which is not true for user and group.  So for instance this listing:

  drwx------.  43 augusto augusto    69632 Mar  4 12:21 .
  drwxr-xr-x.   4 root    root        4096 Aug  9  2022 ..
  drwx------. 171 augusto augusto    12288 Feb 27 11:52 .cache

will get abridged like this:

      69632 Mar  4 12:21 .
          4096 Aug  9  2022 ..
      12288 Feb 27 11:52 .cache

But if you don't mind that, we can keep the code and see if someone
finds a nice way to deal with it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61785; Package emacs. (Sat, 04 Mar 2023 12:36:02 GMT) Full text and rfc822 format available.

Message #22 received at 61785-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61785-done <at> debbugs.gnu.org
Subject: Re: bug#61785: [PATCH] Add option to keep some columns in
 dired-hide-details-mode
Date: Sat, 04 Mar 2023 14:35:28 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Cc: 61785-done <at> debbugs.gnu.org
> Date: Sat, 04 Mar 2023 12:26:36 +0100
> 
> On Sat,  4 Mar 2023 at 09:54, Eli Zaretskii wrote:
> 
> >> From: Augusto Stoffel <arstoffel <at> gmail.com>
> >> Cc: 61785-done <at> debbugs.gnu.org
> >> Date: Sat, 04 Mar 2023 07:07:02 +0100
> >> 
> >> I think I would rather revert the commit until someone comes up with a
> >> better idea, if you don't mind.
> >
> > I'm not sure I see a problem with counting columns.
> >
> > What is the harm of keeping the commit on master?  If we get
> > complaints about it, we have ample time to remove the feature when and
> > if we get those complaints.
> 
> The problem is that the code asssumes the columns are right-aligned,
> which is not true for user and group.  So for instance this listing:
> 
>   drwx------.  43 augusto augusto    69632 Mar  4 12:21 .
>   drwxr-xr-x.   4 root    root        4096 Aug  9  2022 ..
>   drwx------. 171 augusto augusto    12288 Feb 27 11:52 .cache
> 
> will get abridged like this:
> 
>       69632 Mar  4 12:21 .
>           4096 Aug  9  2022 ..
>       12288 Feb 27 11:52 .cache
> 
> But if you don't mind that, we can keep the code and see if someone
> finds a nice way to deal with it.

We could perhaps mention the caveat with right-aligned columns to the
doc string, and expect users to avoid those columns?




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Apr 2023 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.