From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46884: [PATCH] 27.1; Cannot run find-dired with -maxdepth Date: Wed, 03 Mar 2021 08:15:12 +0200 Message-ID: <83o8g069vz.fsf@gnu.org> References: <80k0qpdoqd.fsf@felesatra.moe> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46884@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 03 07:16:10 2021 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 1lHKnp-0006NX-Uy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 07:16:09 +0100 Original-Received: from localhost ([::1]:45666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHKnp-0004ad-0v for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 01:16:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHKni-0004Ys-W7 for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 01:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHKni-0000TU-Nd for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 01:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHKni-0003sw-IS for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 01:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Mar 2021 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46884 X-GNU-PR-Package: emacs Original-Received: via spool by 46884-submit@debbugs.gnu.org id=B46884.161475212914892 (code B ref 46884); Wed, 03 Mar 2021 06:16:02 +0000 Original-Received: (at 46884) by debbugs.gnu.org; 3 Mar 2021 06:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:54994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHKnB-0003s8-4C for submit@debbugs.gnu.org; Wed, 03 Mar 2021 01:15:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHKn9-0003rv-IW for 46884@debbugs.gnu.org; Wed, 03 Mar 2021 01:15:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60026) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHKn4-0000A7-6b; Wed, 03 Mar 2021 01:15:22 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3956 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lHKn3-0000dZ-8C; Wed, 03 Mar 2021 01:15:21 -0500 In-Reply-To: (message from Allen Li on Wed, 3 Mar 2021 01:20:45 +0000) 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" Xref: news.gmane.io gmane.emacs.bugs:201257 Archived-At: > From: Allen Li > Date: Wed, 3 Mar 2021 01:20:45 +0000 > > I attached a patch pulling most of the find-dired logic into a find-dired-unescaped function so that it can be > readily reused. Thanks, but I think a better way for adding such a feature to find-dired would be to introduce an additional defcustom, by default nil, that will specify 'find' options to be inserted into the 'find' command line between "." and "\( ARGS \)". This would allow users to specify any switch, not just -maxdepth. Bonus points for arranging for prompting the user to supply those options to 'find' when find-dired is invoked with a prefix argument, so that one-off uses of such options could be easier and more lightweight.