bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46884: [External] : bug#46884: 27.1; Cannot run find-dired with -max


From: Drew Adams
Subject: bug#46884: [External] : bug#46884: 27.1; Cannot run find-dired with -maxdepth
Date: Wed, 3 Mar 2021 01:34:07 +0000

> 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.
`----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]