From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Date: Wed, 19 Jul 2017 02:21:20 +0200 Message-ID: <87pocxs2db.fsf@drachen> References: <87k243qm3z.fsf@felesatra.moe> <874luhxx3r.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500423734 8160 195.159.176.226 (19 Jul 2017 00:22:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Jul 2017 00:22:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27456@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 19 02:22:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXckh-0001do-FH for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jul 2017 02:22:07 +0200 Original-Received: from localhost ([::1]:59201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXckl-0000Ui-Di for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jul 2017 20:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXckf-0000Uc-FY for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 20:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXckc-00064s-5e for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 20:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXckc-00064m-2d for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 20:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dXckb-0004Nz-Qb for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2017 20:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jul 2017 00:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27456 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.150042369416820 (code B ref 27456); Wed, 19 Jul 2017 00:22:01 +0000 Original-Received: (at 27456) by debbugs.gnu.org; 19 Jul 2017 00:21:34 +0000 Original-Received: from localhost ([127.0.0.1]:47015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXckA-0004NE-0u for submit@debbugs.gnu.org; Tue, 18 Jul 2017 20:21:34 -0400 Original-Received: from mout.web.de ([212.227.17.12]:55462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXck8-0004My-DG for 27456@debbugs.gnu.org; Tue, 18 Jul 2017 20:21:32 -0400 Original-Received: from drachen.dragon ([92.208.94.178]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M1G68-1dmxnp12Jk-00tA7g; Wed, 19 Jul 2017 02:21:25 +0200 In-Reply-To: (Allen Li's message of "Wed, 12 Jul 2017 23:56:23 -0700") X-Provags-ID: V03:K0:KnND6zeOwOWi/QVwKDVWClGSGGLorfRvbTvsVcbTIbhKYzng6D5 XMd7d3yjfauBrxhQuTQkVFmIYiXtgsA0oy94+018xVavbU2/QoV52/wTZgf2o306/rvSTz/ H1iS1murxAvpOumJArhITep9B95xws6XAL6Np4ARk31OFVcC2mmdyjGJ41SbJlZ6bMH9jl0 SYoQTc3MvQJdw3s1mJFgQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:vThf5Xj8PSs=:hSQ+nEUbvT111lRN0uKoES a9iRLuUnvzWlTIyEdpZCfB9SY+cTwZtt6k2M1wwZYYb0ylVs/rQvzKa8lRqXPEJKN2MAseycP 9/0AiM5GHrnj071z720yNpK+BeCjqZrFU9VV37sHoSZDXnUhqsgafXCAEWcq0VXzhJnV441KS wy+Kg/elWagnOdbqLhM+vKAQ1dowF2j5SdPteWqD9kXtvzHmaJN6i2OJ/v5x6xBxRdnd2nL9V YiNvh+tfFoH6kUUiu8eHC/N4yJux4IAZMesz8Fs8zO/97uhNNJbLTGEEDwgBzDYoEK9Iuv3F/ Gp2R65FYVi/kLxykgEOeSE9Kc/Q0K61ER67KM/5Eo8WCFqaXFGWF8MSdcY7A81gN2tKVKvER0 Jy46b5ZULSbVadE3+6C7pKBHMI+TYG6nESxsVff1LtbCrH9RNKvcTusAgLW2NQ1KROnDLZUxN 468B9zSpb5ibYSr199+BxOnVfV8asJOydw1bvSa+V2hrZh77MlP7YH7q9Rnak0yAZOJx7O3MJ 8QRRvADyfWStksi8clTz/V8szmyaJ2Hkzp2lBO6aebM1wSWo+qwMRlhiStLxV9WvjKzbk/mSI glWa7ObXxKx42qbdSvoB/9Bpkc5mpJh+sQ+lU4o/CPlaLz3vc3Aanvu/sMby635+0QSppVKAn wFkRTdmUrH7xmigaGWmhcnm6dTKxQX2fh0/OOwsdFyzAfPWIN/t90vTFgbG1SeqvLL3jeDKtp VTiv6O0Yeb0E8TUg/BBxeiuEoBGplzRcXx6PCgT7yaqPBqM/pj+W/VKq3YWGFhj3i0Yj1it/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134733 Archived-At: Allen Li 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 \( \) -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.