GNU bug report logs -
#27456
25.2; Not possible to use -prune with find-dired
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Fri, 23 Jun 2017 06:02:01 UTC
Severity: minor
Found in version 25.2
Done: Michael Heerdegen <michael_heerdegen <at> web.de>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 27456 <at> debbugs.gnu.org (full text, mbox):
Allen Li <vianchielfaura <at> gmail.com> writes:
> PS Upon closer reading, it sounds like you're suggesting to do
> (find-dired "~/.emacs.d" "-name \"elpa\" -prune -o -name \"*.el\" ")
Yes, that's what I meant. Don't specify "-ls" yourself.
> PPS In a sudden flash of insight, I thought of using (find-dired
> "~/.emacs.d" "-name \"elpa\" -prune -false -o -name \"*.el\"")
I think this is the canonical solution for your use case. "-prune"
doesn't fail, so you need to add "-false" for the directory itself to be
left out.
> Since I have found a workaround for my use case, I am okay with this
> being closed now, but I feel like there may be more complex find
> commands that I may want to do in the future where this either does
> not work or introduces a lot more complexity, in which case I (or
> someone else) will have to reopen this bug or create a new one. I
> think it would be valuable for someone experienced with find to chime
> in, but I think that perhaps find-dired shouldn't always construct a
> command like "find \( <args> \) -ls"
I doubt that it is really a big problem in practice, but I don't close
the bug for now, not being an expert on "find" myself.
Thanks,
Michael.
This bug report was last modified 6 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.