+cc 72272@debbugs.gnu.org Thank you for the comments Andrea and Eli. Andrea Corallo writes: > Eli Zaretskii writes: > >> >> Thanks. >> >> Stefan and Andrea, any comments? >> >> I have a few minor ones: >> >>> From: xenodium >>> 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.