From: Allen Li <darkfeline@felesatra.moe>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 46884@debbugs.gnu.org
Subject: bug#46884: [PATCH] 27.1; Cannot run find-dired with -maxdepth
Date: Wed, 3 Mar 2021 08:22:23 +0000 [thread overview]
Message-ID: <CADbSrJxc2M_kLje4_cEDYZ5cxOYqACDrq-_OFRQ9WmSUC19b+g@mail.gmail.com> (raw)
In-Reply-To: <83k0qo699n.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]
On Wed, Mar 3, 2021 at 6:28 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Allen Li <darkfeline@felesatra.moe>
> > Date: Wed, 3 Mar 2021 03:38:49 +0000
> >
> > -(defun find-dired (dir args)
> > +(defun find-dired (dir args &optional global-args)
> > "Run `find' and go into Dired mode on a buffer of the output.
> > The command run (after changing into DIR) is essentially
> >
> > - find . \\( ARGS \\) -ls
> > + find . GLOBAL-ARGS \\( ARGS \\) -ls
> >
> > except that the car of the variable `find-ls-option' specifies what to
> > -use in place of \"-ls\" as the final argument.
> > +use in place of \"-ls\" as the final argument. GLOBAL-ARGS is empty
> > +when called interactively.
>
> This is okay, IMO, but it would be better to allow the user to specify
> GLOBAL-ARGS interactively if the user invokes the command with a
> prefix argument.
>
How would that interact with find-args-history? I could create a separate
history variable, but then it's annoying how the two histories are
separate, as args and global-args together form one query. I decided to
punt on that issue until someone actually has a use case for providing
global-args interactively. I would use global-args infrequently enough
that I would rather call find-dired via M-x and iterate on getting the
command right that way, than try to call find-dired interactively
repeatedly with a universal prefix arg and navigating the history for both
the completing-reads for args and global-args separately. Or I would add
the -maxdepth flag to the args and tolerate the warning in the output.
Actually, my current use case is calling find-dired from Emacs Lisp code
(not interactively) where I want to avoid the warning.
[-- Attachment #2: Type: text/html, Size: 2152 bytes --]
next prev parent reply other threads:[~2021-03-03 8:22 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 [this message]
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 ` bug#46884: [External] : bug#46884: " Drew Adams
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=CADbSrJxc2M_kLje4_cEDYZ5cxOYqACDrq-_OFRQ9WmSUC19b+g@mail.gmail.com \
--to=darkfeline@felesatra.moe \
--cc=46884@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).