From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#72272: [PATCH] dired-hide-details-mode hides directory's absolute path Date: Mon, 05 Aug 2024 05:45:29 -0400 Message-ID: References: <86plqosoem.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36825"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Alvaro Ramirez , 72272@debbugs.gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 05 11:48:58 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sauKo-0009Pt-8C for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Aug 2024 11:48:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sauKX-0005Wf-V4; Mon, 05 Aug 2024 05:48:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sauKW-0005WB-Ky for bug-gnu-emacs@gnu.org; Mon, 05 Aug 2024 05:48:40 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sauKW-0007WC-3h for bug-gnu-emacs@gnu.org; Mon, 05 Aug 2024 05:48:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=b0t55ScXW/ZqhxDz89qYKQ5x37O9jGuLrQ/d/bI9gXo=; b=frqmSlscogeidypzVEqkVLfahyz4PNRuW/uMoH53scA3MIWEoL61snviSSAWDleslpBj0anxDSX3Ohl3TXLP5E4MOjzauwhBcf3yOtXiuCctdn5RjHuOmOScpecdaBUqPRRYXF99nHqCbkJHhZyocGZEHK7mppbeSzlBPeBcuHI7b8AQJdSOjGhTMI6/rvxKFucQlJrJ2MuhCq7JjA5R+gaKRvRvp/XKcZAisvjTUJ2C4k45lr5wZJd70UUNyJf6gUsyPnXiLZXe+PVQbc/PHCH4zcrS5Hu4sJ0tQe7s5XGBD+HfouGKlTfRPSmhpbC0Ax0AZZV5NZZGw6GIdry4uw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sauKs-00056J-2O for bug-gnu-emacs@gnu.org; Mon, 05 Aug 2024 05:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Aug 2024 09:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72272-submit@debbugs.gnu.org id=B72272.172285129219440 (code B ref 72272); Mon, 05 Aug 2024 09:49:02 +0000 Original-Received: (at 72272) by debbugs.gnu.org; 5 Aug 2024 09:48:12 +0000 Original-Received: from localhost ([127.0.0.1]:57922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sauK3-00053Q-NS for submit@debbugs.gnu.org; Mon, 05 Aug 2024 05:48:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sauK1-000530-Cq for 72272@debbugs.gnu.org; Mon, 05 Aug 2024 05:48:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sauHS-0006p3-Aq; Mon, 05 Aug 2024 05:45:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=b0t55ScXW/ZqhxDz89qYKQ5x37O9jGuLrQ/d/bI9gXo=; b=B8FNz2iO+zkpyiUpchO/ UPeRXIlJzHuhbnXCqcP+nJ59MpkysfnVyAQguTaxG2f3gdHQnU3WF+ot8a7mIJ5A7W6m2TmVv+qk5 UiISjI56k7PDjgVUCfSwYduBDj+L+342N8U3AOJX5GUVU/UiY3FBMJ4fLc60XResU8JwDOzb9AYXs x/lRgp3PwuKJXb5AycwttsFu8uR+pnFpvLu+z1bKIN/iX0bjMS0M3mT7+dXrwSwjmMJiTQcI7sbbk mXcdKcQzygtC9oVKxlvvHGf14xl1hyhKB3XUHDTQdFpSs9Hz/ExuNFPqodLr0ygy9VRDiaKR6mrTE tqpc1X34gRBqIQ==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sauHR-00033K-6i; Mon, 05 Aug 2024 05:45:30 -0400 In-Reply-To: <86plqosoem.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 04 Aug 2024 11:06:09 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289787 Archived-At: Eli Zaretskii writes: >> From: Alvaro Ramirez >> 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 >> 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