unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Allen Li <darkfeline@felesatra.moe>,
	"46884@debbugs.gnu.org" <46884@debbugs.gnu.org>
Subject: bug#46884: [External] : bug#46884: 27.1; Cannot run find-dired with -maxdepth
Date: Wed, 3 Mar 2021 01:34:07 +0000	[thread overview]
Message-ID: <SA2PR10MB447442B162B2D73B6C288D8FF3989@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <80k0qpdoqd.fsf@felesatra.moe>

> Due to how find-dired handles is args, it is not
> possible to pass -maxdepth to the find command.

I'm not sure this is germane, but FWIW, my mini-library
`find-dired+.el' enhances `find-dired' by providing
optional args, and two of those specify the min and max
depth limits.

If this is relevant, and corresponds to the requested
feature, Emacs could be improved similarly.

Maybe give it a try, and see if it offers what you
request.

https://www.emacswiki.org/emacs/download/find-dired%2b.el

Here's the doc string;

,----
| find-dired is an interactive compiled Lisp function in
| 'find-dired+.el'.
| 
| (find-dired DIR ARGS &optional DEPTH-LIMITS EXCLUDED-PATHS)
| 
| Run `find' and put its output in a buffer in Dired Mode.
| Then run `find-dired-hook' and `dired-after-readin-hook'.
| The `find' command run (after changing into DIR) is essentially this,
| where LS-SWITCHES is `(car find-ls-option)':
| 
|   find . \( ARGS \) LS-SWITCHES
| 
| Optional args:
| 
| * DEPTH-LIMITS:   Minimum and maximum depths: (MIN-DEPTH MAX-DEPTH).
| * EXCLUDED-PATHS: Strings matching paths to be excluded.
|                   Uses `find' switch `-path'.
| 
| When both optional args are non-nil, the `find' command run is this:
| 
|   find . -mindepth MIN-DEPTH -maxdepth MAX-DEPTH
|          \( -path EXCLUDE1 -o -path EXCLUDE2 ... \)
|          -prune -o \( ARGS \) LS-SWITCHES
| 
| where EXCLUDE1, EXCLUDE2... are the EXCLUDED-PATHS, but shell-quoted.
`----






      parent reply	other threads:[~2021-03-03  1:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  1:12 bug#46884: 27.1; Cannot run find-dired with -maxdepth Allen Li
2021-03-03  1:20 ` bug#46884: [PATCH] " Allen Li
2021-03-03  3:38   ` Allen Li
2021-03-03  6:28     ` Eli Zaretskii
2021-03-03  8:22       ` Allen Li
2021-03-03  8:55         ` Eli Zaretskii
2021-03-04  4:50           ` Allen Li
2021-03-04  9:35             ` Juri Linkov
2021-03-05  3:21               ` Allen Li
2021-03-05  7:27                 ` Eli Zaretskii
2021-03-12  8:08                   ` Allen Li
2021-03-12 15:49                     ` bug#46884: [External] : " Drew Adams
2021-03-13  0:42                       ` Allen Li
2021-03-13  1:09                         ` Drew Adams
2021-03-13  9:46                     ` Eli Zaretskii
2021-03-13  9:58                       ` Andreas Schwab
2021-03-13 21:38                       ` Allen Li
2021-03-13 21:53                         ` Juri Linkov
2021-03-14  0:40                           ` Allen Li
2021-03-18 18:52                             ` Juri Linkov
2022-06-19 23:55                               ` bug#46884: " Lars Ingebrigtsen
2022-06-26  3:54                                 ` Allen Li
2022-06-27  7:46                                   ` Lars Ingebrigtsen
2021-03-04 13:53             ` bug#46884: [PATCH] " Eli Zaretskii
2021-03-03  9:03         ` Juri Linkov
2021-03-03 15:42         ` bug#46884: [External] : " Drew Adams
2021-03-03 16:20           ` Eli Zaretskii
2021-03-03  6:15   ` Eli Zaretskii
2021-03-03  1:34 ` Drew Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SA2PR10MB447442B162B2D73B6C288D8FF3989@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=46884@debbugs.gnu.org \
    --cc=darkfeline@felesatra.moe \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).