Subject: bug#46884: [PATCH] 27.1; Cannot run find-dired with -maxdepth

From: Eli Zaretskii <[email-masked]>
Date: Sat, 13 Mar 2021 11:46:38 +0200

> From: Allen Li <[email-masked]>
> Date: Fri, 12 Mar 2021 08:08:55 +0000
> Cc: Juri Linkov <[email-masked]>, [email-masked]
> 
> Attached patch, does this approach look good?

I guess my suggestion to additionally allow specification of
GLOBAL-ARGS interactively (via prefix arg) got voted down?

> +---
> +*** Optional 'global-args' parameter added to 'find-dired'.
> +This allows passing find global options like -maxdepth.

"find" should be in quotes: 'find'

> @@ -202,6 +203,7 @@ find-dired
>      (setq default-directory dir
>  	  find-args args	      ; save for next interactive call
>  	  args (concat find-program " . "
> +                       (if global-args global-args "")

'concat' knows how to handle nil arguments, so you don't need the
empty string alternative here.  Just (if global-args global-args)
should do.