GNU bug report logs - #72272
[PATCH] dired-hide-details-mode hides directory's absolute path

Previous Next

Package: emacs;

Reported by: Alvaro Ramirez <alvaro <at> xenodium.com>

Date: Wed, 24 Jul 2024 11:19:01 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 72272 in the body.
You can then email your comments to 72272 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#72272; Package emacs. (Wed, 24 Jul 2024 11:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alvaro Ramirez <alvaro <at> xenodium.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Jul 2024 11:19:02 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] dired-hide-details-mode hides directory's absolute path
Date: Wed, 24 Jul 2024 12:17:58 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi folks,

Sending an initial patch. Happy to iterate on it, add tests, 
etc. if we
reckon the feature is worth pursuing.

Set `dired-hide-details-hide-absolute-location` to non-nil and 
toggle
`dired-hide-details-mode` to hide the current directory's absolute 
path.

This is my first submission, might need some process guidance.

Alvaro

In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin23.5.0, NS
appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-23 built on 
jiko
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.5

Configured using:
'configure --with-ns
--prefix=/Users/alvaro/stuff/active/code/third_party/emacs/nextstep/Emacs.app/Contents/MacOS
--enable-locallisppath=/Users/alvaro/stuff/active/code/third_party/emacs/nextstep/Emacs.app/Contents/MacOS'

[0001-dired-hide-details.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sun, 04 Aug 2024 08:07:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alvaro Ramirez <alvaro <at> xenodium.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Andrea Corallo <acorallo <at> gnu.org>
Cc: 72272 <at> debbugs.gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sun, 04 Aug 2024 11:06:09 +0300
> From: Alvaro Ramirez <alvaro <at> xenodium.com>
> Date: Wed, 24 Jul 2024 12:17:58 +0100
> 
> Hi folks,
> 
> Sending an initial patch. Happy to iterate on it, add tests, 
> etc. if we
> reckon the feature is worth pursuing.
> 
> Set `dired-hide-details-hide-absolute-location` to non-nil and 
> toggle
> `dired-hide-details-mode` to hide the current directory's absolute 
> path.
> 
> This is my first submission, might need some process guidance.

Thanks.

Stefan and Andrea, any comments?

I have a few minor ones:

> From: xenodium <me+gh <at> xenodium.com>
> Date: Tue, 23 Jul 2024 21:55:37 +0100
> Subject: [PATCH] Hides current location's path via dired-hide-details-mode
                                            ^^^^
Please don't use "path" for anything except PATH-style directory
lists.  The GNU Coding Standards frown on such usage.

> +(defcustom dired-hide-details-hide-absolute-location t
> +  "Non-nil means `dired-hide-details-mode' hides current location's absolute path."

Same here.

> +            (if-let ((dir-base (file-name-nondirectory new-dir-name))
> +                     (dir-path (file-name-directory new-dir-name))
> +                     (hide-dir-path (and dired-hide-details-hide-absolute-location

And here.

Also, this change needs a NEWS entry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Mon, 05 Aug 2024 09:49:02 GMT) Full text and rfc822 format available.

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

From: Andrea Corallo <acorallo <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Alvaro Ramirez <alvaro <at> xenodium.com>, 72272 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Mon, 05 Aug 2024 05:45:29 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> Date: Wed, 24 Jul 2024 12:17:58 +0100
>> 
>> Hi folks,
>> 
>> Sending an initial patch. Happy to iterate on it, add tests, 
>> etc. if we
>> reckon the feature is worth pursuing.
>> 
>> Set `dired-hide-details-hide-absolute-location` to non-nil and 
>> toggle
>> `dired-hide-details-mode` to hide the current directory's absolute 
>> path.
>> 
>> This is my first submission, might need some process guidance.
>
> Thanks.
>
> Stefan and Andrea, any comments?
>
> I have a few minor ones:
>
>> From: xenodium <me+gh <at> xenodium.com>
>> Date: Tue, 23 Jul 2024 21:55:37 +0100
>> Subject: [PATCH] Hides current location's path via dired-hide-details-mode
>                                             ^^^^
> Please don't use "path" for anything except PATH-style directory
> lists.  The GNU Coding Standards frown on such usage.
>
>> +(defcustom dired-hide-details-hide-absolute-location t
>> +  "Non-nil means `dired-hide-details-mode' hides current location's absolute path."
>
> Same here.
>
>> +            (if-let ((dir-base (file-name-nondirectory new-dir-name))
>> +                     (dir-path (file-name-directory new-dir-name))
>> +                     (hide-dir-path (and dired-hide-details-hide-absolute-location
>
> And here.
>
> Also, this change needs a NEWS entry.

No further comments other than:

> @@ -3268,6 +3275,11 @@ dired-hide-details-update-invisibility-spec
>  	       'add-to-invisibility-spec
>  	     'remove-from-invisibility-spec)
>  	   'dired-hide-details-information)
> +  (funcall (if (and dired-hide-details-mode
> +		    dired-hide-details-hide-absolute-location)
> +	       'add-to-invisibility-spec
> +	     'remove-from-invisibility-spec)
> +	   'dired-hide-details-absolute-location)

don't we favor #' in place of ' when quoting functions?

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Mon, 05 Aug 2024 14:35:02 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: eliz <at> gnu.org, 72272 <at> debbugs.gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Mon, 05 Aug 2024 15:34:17 +0100
[Message part 1 (text/plain, inline)]
+cc 72272 <at> debbugs.gnu.org

Thank you for the comments Andrea and Eli.

Andrea Corallo <acorallo <at> gnu.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>
>> Thanks.
>>
>> Stefan and Andrea, any comments?
>>
>> I have a few minor ones:
>>
>>> From: xenodium <me+gh <at> xenodium.com>
>>> Date: Tue, 23 Jul 2024 21:55:37 +0100
>>> Subject: [PATCH] Hides current location's path via
>>> dired-hide-details-mode
>>                                             ^^^^
>> Please don't use "path" for anything except PATH-style
>> directory
>> lists.  The GNU Coding Standards frown on such usage.
>>

Ah got it. TIL the naming convention used for functions like of 
file-name-as-directory.

>>> +(defcustom dired-hide-details-hide-absolute-location t
>>> +  "Non-nil means `dired-hide-details-mode' hides current
>>> location's absolute path."
>>
>> Same here.

Done

>>
>>> +            (if-let ((dir-base (file-name-nondirectory
>>> new-dir-name))
>>> +                     (dir-path (file-name-directory
>>> new-dir-name))
>>> +                     (hide-dir-path (and
>>> dired-hide-details-hide-absolute-location
>>
>> And here.

Done

>>
>> Also, this change needs a NEWS entry.

Added

>
> No further comments other than:
>
>> @@ -3268,6 +3275,11 @@
>> dired-hide-details-update-invisibility-spec
>>  	       'add-to-invisibility-spec
>>  	     'remove-from-invisibility-spec)
>>  	   'dired-hide-details-information)
>> +  (funcall (if (and dired-hide-details-mode
>> +		    dired-hide-details-hide-absolute-location)
>> +	       'add-to-invisibility-spec
>> +	     'remove-from-invisibility-spec)
>> +	   'dired-hide-details-absolute-location)
>
> don't we favor #' in place of ' when quoting functions?

Added

I also modified the patch a little to cater for 
`dired-maybe-insert-subdir` (see 
https://lists.gnu.org/archive/html/emacs-devel/2024-08/msg00033.html) 
and to include a couple of tests.

May be worth noting, the following dired.el comment seemed
outdated 
https://github.com/emacs-mirror/emacs/blob/c7d9cd722e5a7042a52c92f8497f903bfe9870b8/lisp/dired.el#L1805

;; Note that dired-build-subdir-alist will replace the name
;; by its expansion, so it does not matter whether what we insert
;; here is fully expanded, but it should be absolute.

The mentioned replacement doesn't take place when using 
`dired-maybe-insert-subdir`, so I tweaked the comment. Setting 
invisible property is now needed in two places (to handle current 
location and now subdirs).

Please take a look at the latest patch. Happy to go with a 
different direction if preferred.

[0001-Hides-directory-absolute-location-via-dired-hide-det.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sat, 17 Aug 2024 08:55:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alvaro Ramirez <alvaro <at> xenodium.com>
Cc: 72272 <at> debbugs.gnu.org, acorallo <at> gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 17 Aug 2024 11:53:36 +0300
> From: Alvaro Ramirez <alvaro <at> xenodium.com>
> Cc: eliz <at> gnu.org, 72272 <at> debbugs.gnu.org
> Date: Mon, 05 Aug 2024 15:34:17 +0100
> 
> I also modified the patch a little to cater for 
> `dired-maybe-insert-subdir` (see 
> https://lists.gnu.org/archive/html/emacs-devel/2024-08/msg00033.html) 
> and to include a couple of tests.
> 
> May be worth noting, the following dired.el comment seemed
> outdated 
> https://github.com/emacs-mirror/emacs/blob/c7d9cd722e5a7042a52c92f8497f903bfe9870b8/lisp/dired.el#L1805
> 
>  ;; Note that dired-build-subdir-alist will replace the name
>  ;; by its expansion, so it does not matter whether what we insert
>  ;; here is fully expanded, but it should be absolute.
> 
> The mentioned replacement doesn't take place when using 
> `dired-maybe-insert-subdir`, so I tweaked the comment. Setting 
> invisible property is now needed in two places (to handle current 
> location and now subdirs).
> 
> Please take a look at the latest patch. Happy to go with a 
> different direction if preferred.

Thanks, this LGTM.  However, AFAIU your copyright-assignment paperwork
is not yet completed, so we should wait for that, and then we can
install.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sat, 17 Aug 2024 09:29:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72272 <at> debbugs.gnu.org, copyright-clerk <at> fsf.org, acorallo <at> gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 17 Aug 2024 10:27:08 +0100
> On 17 Aug 2024, at 09:53, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> 
>> 
>> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> Cc: eliz <at> gnu.org, 72272 <at> debbugs.gnu.org
>> Date: Mon, 05 Aug 2024 15:34:17 +0100
>> 
>> I also modified the patch a little to cater for
>> `dired-maybe-insert-subdir` (see
>> https://lists.gnu.org/archive/html/emacs-devel/2024-08/msg00033.html)
>> and to include a couple of tests.
>> 
>> May be worth noting, the following dired.el comment seemed
>> outdated
>> https://github.com/emacs-mirror/emacs/blob/c7d9cd722e5a7042a52c92f8497f903bfe9870b8/lisp/dired.el#L1805
>> 
>> ;; Note that dired-build-subdir-alist will replace the name
>> ;; by its expansion, so it does not matter whether what we insert
>> ;; here is fully expanded, but it should be absolute.
>> 
>> The mentioned replacement doesn't take place when using
>> `dired-maybe-insert-subdir`, so I tweaked the comment. Setting
>> invisible property is now needed in two places (to handle current
>> location and now subdirs).
>> 
>> Please take a look at the latest patch. Happy to go with a
>> different direction if preferred.
> 
> Thanks, this LGTM.

Thanks Eli!

>  However, AFAIU your copyright-assignment paperwork
> is not yet completed, so we should wait for that, and then we can
> install.

+copyright-clerk <at> fsf.org

Sounds good. It’s submitted. Waiting for response. 



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Tue, 01 Oct 2024 20:33:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72272 <at> debbugs.gnu.org, copyright-clerk <at> fsf.org, acorallo <at> gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Tue, 01 Oct 2024 21:31:29 +0100
Hi Eli

>> On 17 Aug 2024, at 09:53, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> 
>> Thanks, this LGTM. However, AFAIU your copyright-assignment 
>> paperwork
>> is not yet completed,

My copyright-assignment is now approved as of today.

> > so we should wait for that, and then we can
>> install.

Is it Ok to install patch?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Tue, 01 Oct 2024 21:19:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Alvaro Ramirez <alvaro <at> xenodium.com>, Andrea Corallo <acorallo <at> gnu.org>
Cc: eliz <at> gnu.org, 72272 <at> debbugs.gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Tue, 1 Oct 2024 21:17:40 +0000
Alvaro Ramirez <alvaro <at> xenodium.com> writes:

> +** Dired
> +
> ++++
> +*** New option 'dired-hide-details-hide-absolute-location', enabled by default.
> +If non-nil, 'dired-hide-details-mode' also hides directories' absolute locations.

I don't understand what this does, based on this description.  Could
this please be expanded to explain this in more concrete terms?

It also seems like this is not wrapped to 72 characters, so please amend
that as well.  I think the header could be shortened by removing the
"enabled by default" part.

However, if we are talking about hiding the directory in the first line,
i.e. here:

  /home/nisse:

then I think this should better be _off_ by default.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Wed, 02 Oct 2024 10:56:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 72272 <at> debbugs.gnu.org, eliz <at> gnu.org, Andrea Corallo <acorallo <at> gnu.org>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Wed, 02 Oct 2024 11:55:09 +0100
[Message part 1 (text/plain, inline)]
Thanks for the comments Stefan!

Stefan Kangas <stefankangas <at> gmail.com> writes:

> Alvaro Ramirez <alvaro <at> xenodium.com> writes:
>
>> +** Dired
>> +
>> ++++
>> +*** New option 'dired-hide-details-hide-absolute-location', 
>> enabled by default.
>> +If non-nil, 'dired-hide-details-mode' also hides directories' 
>> absolute locations.
>
> I don't understand what this does, based on this description. 
> Could
> this please be expanded to explain this in more concrete terms?

Updated in patch. Hope that's clearer.

>
> It also seems like this is not wrapped to 72 characters, so 
> please amend
> that as well.  I think the header could be shortened by removing 
> the
> "enabled by default" part.

Ah, thanks for spotting. Updated patch.

>
> However, if we are talking about hiding the directory in the 
> first line,
> i.e. here:
>
>   /home/nisse:

Included a with/without sample in the NEWS for clarity.

>
> then I think this should better be _off_ by default.

Any chance we can consider on by default? If folks aren't enabling 
dired-hide-details-mode, then this feature is technically already 
off by default. I'm thinking for those who do use 
dired-hide-details-mode, there's possibly a likelihood they may 
want to hide this detail also.

[0001-Hide-default-directory-absolute-location-via-dired-h.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Wed, 02 Oct 2024 21:34:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Alvaro Ramirez <alvaro <at> xenodium.com>
Cc: 72272 <at> debbugs.gnu.org, eliz <at> gnu.org, Andrea Corallo <acorallo <at> gnu.org>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Wed, 2 Oct 2024 21:32:24 +0000
Alvaro Ramirez <alvaro <at> xenodium.com> writes:

> Included a with/without sample in the NEWS for clarity.

Thanks.

> Any chance we can consider on by default? If folks aren't enabling
> dired-hide-details-mode, then this feature is technically already
> off by default. I'm thinking for those who do use
> dired-hide-details-mode, there's possibly a likelihood they may
> want to hide this detail also.

I always use `dired-hide-details-mode', and I definitely would _not_
want this feature on.  It doesn't help and makes Dired much less useful
for me.  That's only one data point, of course.

But given that we're usually pretty conservative with changing the
defaults, I recommend adding this as an optional feature at first.
If it picks up in popularity, we could always reconsider later.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Thu, 03 Oct 2024 08:22:02 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 72272 <at> debbugs.gnu.org, eliz <at> gnu.org, Andrea Corallo <acorallo <at> gnu.org>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Thu, 03 Oct 2024 09:19:12 +0100
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Alvaro Ramirez <alvaro <at> xenodium.com> writes:
>
>> Included a with/without sample in the NEWS for clarity.
>
> Thanks.
>
>> Any chance we can consider on by default? If folks aren't 
>> enabling
>> dired-hide-details-mode, then this feature is technically 
>> already
>> off by default. I'm thinking for those who do use
>> dired-hide-details-mode, there's possibly a likelihood they may
>> want to hide this detail also.
>
> I always use `dired-hide-details-mode', and I definitely would 
> _not_
> want this feature on.  It doesn't help and makes Dired much less 
> useful
> for me.  That's only one data point, of course.

Ah interesting. Strangely, I haven't really missed always knowing 
the full path. If I need it, I can quickly toggle via "(" 
binding. Then again, I'm also only one data point. Maybe give the 
setting a try? Might grow on you ;)

In any case, off by default it is. Updated the patch.

>
> But given that we're usually pretty conservative with changing 
> the
> defaults, I recommend adding this as an optional feature at 
> first.
YuYup. The feature remains optional (it's got its own boolean 
setting). Off by default now.

> If it picks up in popularity, we could always reconsider later.

Sounds good. Is there an emacs-devel/maintainers preferred method 
to determine settings popularity?

Out
[0001-Hide-default-directory-absolute-location-via-dired-h.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Thu, 03 Oct 2024 08:25:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 72272 <at> debbugs.gnu.org, eliz <at> gnu.org, Andrea Corallo <acorallo <at> gnu.org>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Thu, 03 Oct 2024 09:23:09 +0100
Alvaro Ramirez <alvaro <at> xenodium.com> writes:

> YuYup
> Out

Sorry. Typos :/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Thu, 03 Oct 2024 14:59:01 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Andrea Corallo <acorallo <at> gnu.org>, Alvaro Ramirez <alvaro <at> xenodium.com>,
 72272 <at> debbugs.gnu.org, eliz <at> gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Thu, 03 Oct 2024 20:27:10 +0530
[புதன் அக்டோபர் 02, 2024] Stefan Kangas wrote:

> Alvaro Ramirez <alvaro <at> xenodium.com> writes:
>
>> Included a with/without sample in the NEWS for clarity.
>
> Thanks.
>
>> Any chance we can consider on by default? If folks aren't enabling
>> dired-hide-details-mode, then this feature is technically already
>> off by default. I'm thinking for those who do use
>> dired-hide-details-mode, there's possibly a likelihood they may
>> want to hide this detail also.
>
> I always use `dired-hide-details-mode', and I definitely would _not_
> want this feature on.  It doesn't help and makes Dired much less useful
> for me.  That's only one data point, of course.

If the full filename is hidden, then one cannot easily go to the parent
directory by clicking on the filename component.  This is a rather
useful feature when one is already using the mouse.

To add on to your data point, I have many similarly named directories in
different parents.  Just looking at the uniquifier inside the <> of the
buffer's name does not help since I cannot immediately recognise the
parent directory from it.

> But given that we're usually pretty conservative with changing the
> defaults, I recommend adding this as an optional feature at first.
> If it picks up in popularity, we could always reconsider later.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Thu, 03 Oct 2024 17:46:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Andrea Corallo <acorallo <at> gnu.org>, eliz <at> gnu.org, 72272 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Thu, 3 Oct 2024 18:37:14 +0100
> On 3 Oct 2024, at 15:57, Visuwesh <visuweshm <at> gmail.com> wrote:
> 
> [புதன் அக்டோபர் 02, 2024] Stefan Kangas wrote:
> 
>> Alvaro Ramirez <alvaro <at> xenodium.com> writes:
>> 
>>> Included a with/without sample in the NEWS for clarity.
>> 
>> Thanks.
>> 
>>> Any chance we can consider on by default? If folks aren't enabling
>>> dired-hide-details-mode, then this feature is technically already
>>> off by default. I'm thinking for those who do use
>>> dired-hide-details-mode, there's possibly a likelihood they may
>>> want to hide this detail also.
>> 
>> I always use `dired-hide-details-mode', and I definitely would _not_
>> want this feature on.  It doesn't help and makes Dired much less useful
>> for me.  That's only one data point, of course.
> 
> If the full filename is hidden, then one cannot easily go to the parent
> directory by clicking on the filename component.  This is a rather
> useful feature when one is already using the mouse.

Neat. TIL about this mouse flow. Thanks! I typically C-x C-f to visit parents.

> To add on to your data point, I have many similarly named directories in
> different parents.  Just looking at the uniquifier inside the <> of the
> buffer's name does not help since I cannot immediately recognise the
> parent directory from it.

Your use cases are safe. The feature is setting-guarded, and now off by default. In the event you do enable it, toggling dired-hide-details-mode via “(“ binding can quickly expose the current location’s absolute path.

>> But given that we're usually pretty conservative with changing the
>> defaults, I recommend adding this as an optional feature at first.
>> If it picks up in popularity, we could always reconsider later.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Wed, 09 Oct 2024 17:33:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Stefan Kangas <stefankangas <at> gmail.com>, eliz <at> gnu.org
Cc: Andrea Corallo <acorallo <at> gnu.org>, 72272 <at> debbugs.gnu.org,
 Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Wed, 9 Oct 2024 18:31:35 +0100
Hi Eli / Stefan

With the latest patch disabling the feature by default, is it good to apply?

Cheers,

Alvaro 

> 
> On 3 Oct 2024, at 18:37, Alvaro Ramirez <alvaro <at> xenodium.com> wrote:
> 
> 
>>> On 3 Oct 2024, at 15:57, Visuwesh <visuweshm <at> gmail.com> wrote:
>>> 
>>> [புதன் அக்டோபர் 02, 2024] Stefan Kangas wrote:
>>> 
>>> Alvaro Ramirez <alvaro <at> xenodium.com> writes:
>>> 
>>>> Included a with/without sample in the NEWS for clarity.
>>> 
>>> Thanks.
>>> 
>>>> Any chance we can consider on by default? If folks aren't enabling
>>>> dired-hide-details-mode, then this feature is technically already
>>>> off by default. I'm thinking for those who do use
>>>> dired-hide-details-mode, there's possibly a likelihood they may
>>>> want to hide this detail also.
>>> 
>>> I always use `dired-hide-details-mode', and I definitely would _not_
>>> want this feature on.  It doesn't help and makes Dired much less useful
>>> for me.  That's only one data point, of course.
>> 
>> If the full filename is hidden, then one cannot easily go to the parent
>> directory by clicking on the filename component.  This is a rather
>> useful feature when one is already using the mouse.
> 
> Neat. TIL about this mouse flow. Thanks! I typically C-x C-f to visit parents.
> 
>> To add on to your data point, I have many similarly named directories in
>> different parents.  Just looking at the uniquifier inside the <> of the
>> buffer's name does not help since I cannot immediately recognise the
>> parent directory from it.
> 
> Your use cases are safe. The feature is setting-guarded, and now off by default. In the event you do enable it, toggling dired-hide-details-mode via “(“ binding can quickly expose the current location’s absolute path.
> 
>>> But given that we're usually pretty conservative with changing the
>>> defaults, I recommend adding this as an optional feature at first.
>>> If it picks up in popularity, we could always reconsider later.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sat, 12 Oct 2024 11:35:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alvaro Ramirez <alvaro <at> xenodium.com>
Cc: acorallo <at> gnu.org, 72272 <at> debbugs.gnu.org, stefankangas <at> gmail.com,
 visuweshm <at> gmail.com
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 12 Oct 2024 14:33:50 +0300
> From: Alvaro Ramirez <alvaro <at> xenodium.com>
> Date: Wed, 9 Oct 2024 18:31:35 +0100
> Cc: 72272 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>,
>  Visuwesh <visuweshm <at> gmail.com>
> 
> Hi Eli / Stefan
> 
> With the latest patch disabling the feature by default, is it good to apply?

It is good, but it no longer applies.  Would you please rebase it on
the latest master branch and resubmit?

Also, please fix the following minor nits while you are at it:

> ++++
> +*** New user option 'dired-hide-details-hide-absolute-location'

The heading lines in NEWS should end in a period.

Also, since this new variable is not documented in the manual, the
entry should be marked as "---", not "+++".

> +            (let* ((dir-indent "  ")
> +                   (dir-name (or (car-safe dir-wildcard)
> +                                 (directory-file-name (file-name-directory dir))))
> +                   (dir-name-point (+ (point) (length dir-indent)))
> +                   (hideable-location (and dired-hide-details-hide-absolute-location
> +                                           (not (string-empty-p (file-name-nondirectory dir-name))))))
> +	      ;; Inserted directory name must be absolute, but keep in mind it
> +              ;; may be replaced in some instances (e.g. dired-build-subdir-alist).
> +              (insert dir-indent dir-name ":\n")
> +              (when hideable-location
> +                (put-text-property dir-name-point
> +                                   (+ dir-name-point
> +                                      (length (file-name-directory dir-name)))
> +                                   'invisible 'dired-hide-details-absolute-location)))

Here (and elsewhere in the patch) please break too-long lines into
two.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sat, 12 Oct 2024 19:11:01 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acorallo <at> gnu.org, 72272 <at> debbugs.gnu.org, stefankangas <at> gmail.com,
 visuweshm <at> gmail.com
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 12 Oct 2024 19:27:09 +0100
[Message part 1 (text/plain, inline)]
Thanks for the comments Eli.

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

>> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> Date: Wed, 9 Oct 2024 18:31:35 +0100
>> Cc: 72272 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>,
>>  Visuwesh <visuweshm <at> gmail.com>
>> 
>> Hi Eli / Stefan
>> 
>> With the latest patch disabling the feature by default, is it 
>> good to apply?
>
> It is good, but it no longer applies.  Would you please rebase 
> it on
> the latest master branch and resubmit?

Yup. Rebased. See latest patch attached.

>
> Also, please fix the following minor nits while you are at it:
>
>> ++++
>> +*** New user option 
>> 'dired-hide-details-hide-absolute-location'
>
> The heading lines in NEWS should end in a period.
>
> Also, since this new variable is not documented in the manual, 
> the
> entry should be marked as "---", not "+++".

Thanks. Did not know this.

>> +            (let* ((dir-indent "  ")
>> +                   (dir-name (or (car-safe dir-wildcard)
>> +                                 (directory-file-name 
>> (file-name-directory dir))))
>> +                   (dir-name-point (+ (point) (length 
>> dir-indent)))
>> +                   (hideable-location (and 
>> dired-hide-details-hide-absolute-location
>> +                                           (not 
>> (string-empty-p (file-name-nondirectory dir-name))))))
>> +	      ;; Inserted directory name must be absolute, but 
>> keep in mind it
>> +              ;; may be replaced in some instances 
>> (e.g. dired-build-subdir-alist).
>> +              (insert dir-indent dir-name ":\n")
>> +              (when hideable-location
>> +                (put-text-property dir-name-point
>> +                                   (+ dir-name-point
>> +                                      (length 
>> (file-name-directory dir-name)))
>> +                                   'invisible 
>> 'dired-hide-details-absolute-location)))
>
> Here (and elsewhere in the patch) please break too-long lines 
> into
> two.

Used 80 character limit. Happy to use a different limit if needed.

>
> Thanks.
[0001-Hide-default-directory-absolute-location-via-dired-h.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 19 Oct 2024 08:00:01 GMT) Full text and rfc822 format available.

Notification sent to Alvaro Ramirez <alvaro <at> xenodium.com>:
bug acknowledged by developer. (Sat, 19 Oct 2024 08:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alvaro Ramirez <alvaro <at> xenodium.com>
Cc: acorallo <at> gnu.org, visuweshm <at> gmail.com, stefankangas <at> gmail.com,
 72272-done <at> debbugs.gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 19 Oct 2024 10:58:30 +0300
> From: Alvaro Ramirez <alvaro <at> xenodium.com>
> Cc: stefankangas <at> gmail.com,  72272 <at> debbugs.gnu.org,  acorallo <at> gnu.org,
>   visuweshm <at> gmail.com
> Date: Sat, 12 Oct 2024 19:27:09 +0100
> 
> Thanks for the comments Eli.
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Alvaro Ramirez <alvaro <at> xenodium.com>
> >> Date: Wed, 9 Oct 2024 18:31:35 +0100
> >> Cc: 72272 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>,
> >>  Visuwesh <visuweshm <at> gmail.com>
> >> 
> >> Hi Eli / Stefan
> >> 
> >> With the latest patch disabling the feature by default, is it 
> >> good to apply?
> >
> > It is good, but it no longer applies.  Would you please rebase 
> > it on
> > the latest master branch and resubmit?
> 
> Yup. Rebased. See latest patch attached.

Thanks, I installed this on the master branch.

Please in the future accompany patches with a ChangeLog-style commit
log message, as described in CONTRIBUTE.  (I added it for you this
time.)

I'm now closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72272; Package emacs. (Sat, 19 Oct 2024 08:56:03 GMT) Full text and rfc822 format available.

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

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acorallo <at> gnu.org, visuweshm <at> gmail.com, stefankangas <at> gmail.com,
 72272-done <at> debbugs.gnu.org
Subject: Re: bug#72272: [PATCH] dired-hide-details-mode hides directory's
 absolute path
Date: Sat, 19 Oct 2024 09:54:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> Cc: stefankangas <at> gmail.com,  72272 <at> debbugs.gnu.org, 
>> acorallo <at> gnu.org,
>>   visuweshm <at> gmail.com
>> Date: Sat, 12 Oct 2024 19:27:09 +0100
>> 
>> Thanks for the comments Eli.
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> >> Date: Wed, 9 Oct 2024 18:31:35 +0100
>> >> Cc: 72272 <at> debbugs.gnu.org, Andrea Corallo 
>> >> <acorallo <at> gnu.org>,
>> >>  Visuwesh <visuweshm <at> gmail.com>
>> >> 
>> >> Hi Eli / Stefan
>> >> 
>> >> With the latest patch disabling the feature by default, is 
>> >> it 
>> >> good to apply?
>> >
>> > It is good, but it no longer applies.  Would you please 
>> > rebase 
>> > it on
>> > the latest master branch and resubmit?
>> 
>> Yup. Rebased. See latest patch attached.
>
> Thanks, I installed this on the master branch.

Nice to hear!

>
> Please in the future accompany patches with a ChangeLog-style 
> commit
> log message, as described in CONTRIBUTE.  (I added it for you 
> this
> time.)

Will do. Thanks for adding it.

>
> I'm now closing this bug.

Thanks for all the guidance and help Eli!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Nov 2024 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 days ago.

Previous Next


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