From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jun 2017 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27456 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27456@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149819766622570 (code B ref -1); Fri, 23 Jun 2017 06:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2017 06:01:06 +0000 Received: from localhost ([127.0.0.1]:33793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOHeT-0005ry-Mu for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:01:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOHeR-0005rO-MD for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:01:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOHeL-00033c-Td for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:00:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOHeL-00033U-RP for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:00:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOHeK-0008Hx-QW for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOHeF-00031y-Vx for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:56 -0400 Received: from solmarta.felesatra.moe ([198.199.111.162]:49344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOHeF-00031a-PI for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:51 -0400 Received: from localhost (c-73-70-42-168.hsd1.ca.comcast.net [73.70.42.168]) by solmarta.felesatra.moe (Postfix) with ESMTPSA id 0F96CFFEAC for ; Fri, 23 Jun 2017 02:00:47 -0400 (EDT) From: Allen Li Date: Thu, 22 Jun 2017 23:00:48 -0700 Message-ID: <87k243qm3z.fsf@felesatra.moe> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) It is not possible to effectively use the -prune action with find-dired. With plain find, -prune would be used like: find . -name "foo*" -prune -o -name "*.el" -ls However, find-dired wraps everything: (find-dired "." "-name \\"foo*\\" -prune -o -name \\"*.el\\" -ls") results in the equivalent call: find . \( -name "foo*" -prune -o -name "*.el" -ls \) -ls Notably, this will list files matching foo* Unfortunately, I'm not sure if there are any easy remedies. Perhaps find-dired should refrain from appending -ls if ARGS already contains -ls. In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jul 2017 19:41: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: To: Allen Li Cc: 27456@debbugs.gnu.org Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.149988843917966 (code B ref 27456); Wed, 12 Jul 2017 19:41:01 +0000 Received: (at 27456) by debbugs.gnu.org; 12 Jul 2017 19:40:39 +0000 Received: from localhost ([127.0.0.1]:35784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVNV1-0004fi-JR for submit@debbugs.gnu.org; Wed, 12 Jul 2017 15:40:39 -0400 Received: from mout.web.de ([212.227.15.4]:57366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVNUz-0004fT-J1 for 27456@debbugs.gnu.org; Wed, 12 Jul 2017 15:40:38 -0400 Received: from drachen.dragon ([88.73.234.235]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MZAp2-1dEo3528c8-00KvPS; Wed, 12 Jul 2017 21:40:27 +0200 From: Michael Heerdegen References: <87k243qm3z.fsf@felesatra.moe> Date: Wed, 12 Jul 2017 21:40:24 +0200 In-Reply-To: <87k243qm3z.fsf@felesatra.moe> (Allen Li's message of "Thu, 22 Jun 2017 23:00:48 -0700") Message-ID: <874luhxx3r.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:uUkGiHm5QapULw6M/3qK6DxOO06I2E2FXQldg1J06KhKc297BlV 1dka8CpivATQ705h+4tQjYRaU/+XHM0pNr6Ma41r1MLy1exxY/LmxL7Fbt9tpKfvRPY9xxl rWGKKGkSxSZVQb3FDlEZlZ7ngIGFa30clLUEVF/w/TpAfj9kEnz/g6rIn7oMc0gj3ABJcF9 aYdAZkQhQIVexqKkeSizg== X-UI-Out-Filterresults: notjunk:1;V01:K0:lqoMGSLK8DU=:OvmC7UxPmAVBfcfgehJsZj 2xKwYfpLkyEMWDkG2580uW9njfxlqJVYFR/9HxU2iGk38yKQEh/h/STdsRRWY+REVBbfxwvyQ tZNOKCEhGhTWi/vqpnzFK0b0tljyfh2hI1iAcTt3JlkTHmyYflGi9CY/rlCXZ8duEL/w1vf5+ YzjxSmjmvWYnaMdRSRakjGmkrtY/j80Gh7ajYq7zDoJzzImYwUHzwcv2CduvQad7EE2EfrNfo 9j+NGvrE5AmIjLZWQvONn47b5wqUSGCcxBMXMK66Y8AvWVSNeMmVuwiElU1gPpRsxAIs4Ra45 wuA4YYSZhwC9QE7uoGdV1h+2CqnW7PaNvx4WiyB3bjQWXooq//CG40wcHpWgbs/SAnktR3MqF AFtOP4a/dCmHPrcpBGxty936pnzV+6owcLpw9LvSbpPHEmQd5Pp868VLaylGLxj5JgcvtcPoU FAXlbIpvKAKAYTVl+YKyBHI91mo5/z+D5gV+IU/TtSloyle4Ts0cnNAmWXlcN4bvvI/9NHy3s E+ze4KtOQuyS0gMTrKmlcrTMzdTnOf1cqBrj7Dh13sCQiatTSPIZT/8b61aP2jIBCKbr8lG1y 8QePlH8bfCxqwJRaZ6b3N2TMIQUBsAtOvSMoI4SaOcqLLOmxHErY3tUj6ye5bsSKRnlNn209M eQ0VJBeSYoiInz5LpZr8Jy7KZelwXwtzkHGidPmUjkFtKCEKTY9gIjdO8R61WIRdetDvKM4ei Klvas2uYklctGPrWYOeGqIZ7oYInMViADMgye0jqla7gRgFY555EurKpgTxZ4ySYsfdhttxRe X3SOYG7 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Allen, > It is not possible to effectively use the -prune action with > find-dired. I think I can use it successfully. > With plain find, -prune would be used like: > > find . -name "foo*" -prune -o -name "*.el" -ls > > However, find-dired wraps everything: > > (find-dired "." "-name \\"foo*\\" -prune -o -name \\"*.el\\" -ls") I get an error when I try to eval this. I think the backslashes should not be doubled. > results in the equivalent call: > > find . \( -name "foo*" -prune -o -name "*.el" -ls \) -ls > > Notably, this will list files matching foo* Can't you just leave out the explicit -ls in the arguments? Also, AFAIK "-prune" is about descending into directories, not about file names. Michael. From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 06:57: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: To: Michael Heerdegen Cc: 27456@debbugs.gnu.org Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.149992899123096 (code B ref 27456); Thu, 13 Jul 2017 06:57:01 +0000 Received: (at 27456) by debbugs.gnu.org; 13 Jul 2017 06:56:31 +0000 Received: from localhost ([127.0.0.1]:36150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVY35-00060S-9F for submit@debbugs.gnu.org; Thu, 13 Jul 2017 02:56:31 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:33565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVY33-00060F-ON for 27456@debbugs.gnu.org; Thu, 13 Jul 2017 02:56:29 -0400 Received: by mail-qk0-f179.google.com with SMTP id a66so29353210qkb.0 for <27456@debbugs.gnu.org>; Wed, 12 Jul 2017 23:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A/vUR1J+K6inrHkXn0ZWIZfD4jhKJb8LPebFem+JEAE=; b=fceJm5ScPITaWUCC+RxzYjYWlaLYvt2Zf6/VBh5QnD8O6FMwJl0z37VL43cNCCTqbt Pcr4PuvQLTydxq2EKeYFZh182t0cdsEXlSnmlzvj+6skED2TRJuSTgBOD8ZeKa9cROay HddjdNOQoj5Kzcib+4El+f3yWrs7MZLA+Ekjj5EYAc4wKjB8IkXsp8U1ec7Zquf2VwiT R6gjqXkxPObLSNvLjsicb6zqkTR4l7yQmzSHMeJkJPx6xt5vMgwM5xIOfZidMynr7+hA xnW7GIJ7NSW8cmJZGHNgV0ZGzz3ikg1V5lGY4UjcDnmkLtb4+fn5Jng/1+c5zyhi4qLR MqHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A/vUR1J+K6inrHkXn0ZWIZfD4jhKJb8LPebFem+JEAE=; b=AHYqEMoIJcU+Ndge2OyHbI2GanxZe4hgioYW5AMgXON6Uk3VKqR2k5c6uL/HNPB8e7 XWUiaswPGr34uvn44aakGPN11HWpI1NIoii7Ugnw8pqW6Ak2vxr/CjENTsJL/+wZc0mI 497kXEwsx7jklqpehEJvsLg86dtgvBjX1z/u9maNTtkpByZS0xHbeKM1Vj1Ndr67o2it QZoZJrxl1hEx2JI2kKEZF3F0AlSvYQHMOMGylXIRpFJkeUljDkQFl6XDFIR98l7Ilc1l 7GT646Uq3wdIrdpF4BlNVp4/g+PLewTIMFEfH6+lMDd9n7ERnpt/SEBA4rbkRF+La57H yzbQ== X-Gm-Message-State: AIVw112RKIhXarQNncTrOTIE60gSlkwOEkv5uKdu7TTdbaK04ebKD3qd ksqThTrKAMJuZ9KCws+nhjly0vfMow== X-Received: by 10.55.86.5 with SMTP id k5mr2732669qkb.70.1499928984145; Wed, 12 Jul 2017 23:56:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.142.67 with HTTP; Wed, 12 Jul 2017 23:56:23 -0700 (PDT) In-Reply-To: <874luhxx3r.fsf@drachen> References: <87k243qm3z.fsf@felesatra.moe> <874luhxx3r.fsf@drachen> From: Allen Li Date: Wed, 12 Jul 2017 23:56:23 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Wed, Jul 12, 2017 at 12:40 PM, Michael Heerdegen wrote: > Hi Allen, > >> It is not possible to effectively use the -prune action with >> find-dired. > > I think I can use it successfully. > >> With plain find, -prune would be used like: >> >> find . -name "foo*" -prune -o -name "*.el" -ls >> >> However, find-dired wraps everything: >> >> (find-dired "." "-name \\"foo*\\" -prune -o -name \\"*.el\\" -ls") > > I get an error when I try to eval this. I think the backslashes should > not be doubled. You're right, I copied the string from a context that required them to be escaped twice. > >> results in the equivalent call: >> >> find . \( -name "foo*" -prune -o -name "*.el" -ls \) -ls >> >> Notably, this will list files matching foo* > > Can't you just leave out the explicit -ls in the arguments? Nope, find-dired adds it automatically. Try evaluating: (find-dired "~/.emacs.d" "-name \"elpa\" -prune -o -name \"*.el\" -ls") This translates into: find . \( -name "elpa" -prune -o -name "*.el" -ls \) -ls This includes the elpa directory, which is not desired (this also prints all .el files twice due to the doubled -ls, see below). Next try running in a shell: find . -name "elpa" -prune -o -name "*.el" -ls Notice how the former includes the elpa directory and the latter does not. PS Upon closer reading, it sounds like you're suggesting to do (find-dired "~/.emacs.d" "-name \"elpa\" -prune -o -name \"*.el\" ") This translates into: find . \( -name "elpa" -prune -o -name "*.el" \) -ls This still includes the elpa directory which is undesired. > > Also, AFAIK "-prune" is about descending into directories, not about > file names. Directories are files; in particular, they also have file names. Sorry, I'm not sure what you're trying to say PPS In a sudden flash of insight, I thought of using (find-dired "~/.emacs.d" "-name \"elpa\" -prune -false -o -name \"*.el\"") This works for my example use case. 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" > > > Michael. From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 07:33: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: To: Allen Li Cc: 27456@debbugs.gnu.org Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.149993117826389 (code B ref 27456); Thu, 13 Jul 2017 07:33:01 +0000 Received: (at 27456) by debbugs.gnu.org; 13 Jul 2017 07:32:58 +0000 Received: from localhost ([127.0.0.1]:36165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVYcL-0006rZ-T3 for submit@debbugs.gnu.org; Thu, 13 Jul 2017 03:32:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:57627 helo=mx1.suse.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVYcI-0006rN-HA for 27456@debbugs.gnu.org; Thu, 13 Jul 2017 03:32:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 90DABACBF; Thu, 13 Jul 2017 07:32:53 +0000 (UTC) From: Andreas Schwab References: <87k243qm3z.fsf@felesatra.moe> X-Yow: My haircut is totally traditional! Date: Thu, 13 Jul 2017 09:32:50 +0200 In-Reply-To: <87k243qm3z.fsf@felesatra.moe> (Allen Li's message of "Thu, 22 Jun 2017 23:00:48 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Jun 22 2017, Allen Li wrote: > It is not possible to effectively use the -prune action with find-dired. > > With plain find, -prune would be used like: > > find . -name "foo*" -prune -o -name "*.el" -ls You can use the comma operator instead of -o, so that the left operand is only evaluated for its side effect (of -prune). Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired 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: To: Allen Li Cc: 27456@debbugs.gnu.org Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.150042369416820 (code B ref 27456); Wed, 19 Jul 2017 00:22:01 +0000 Received: (at 27456) by debbugs.gnu.org; 19 Jul 2017 00:21:34 +0000 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 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 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 From: Michael Heerdegen References: <87k243qm3z.fsf@felesatra.moe> <874luhxx3r.fsf@drachen> Date: Wed, 19 Jul 2017 02:21:20 +0200 In-Reply-To: (Allen Li's message of "Wed, 12 Jul 2017 23:56:23 -0700") Message-ID: <87pocxs2db.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/2 lZaAWe9jTuls7pWlCwh5fYsccd16Le5niFltvnBgOGJcKhB3mY= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired References: <87k243qm3z.fsf@felesatra.moe> In-Reply-To: <87k243qm3z.fsf@felesatra.moe> Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 00:36: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: To: 27456@debbugs.gnu.org Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.153645335624825 (code B ref 27456); Sun, 09 Sep 2018 00:36:01 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 00:35:56 +0000 Received: from localhost ([127.0.0.1]:50724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynhk-0006SL-5W for submit@debbugs.gnu.org; Sat, 08 Sep 2018 20:35:56 -0400 Received: from mail-io1-f44.google.com ([209.85.166.44]:36228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynhi-0006S9-TM for 27456@debbugs.gnu.org; Sat, 08 Sep 2018 20:35:55 -0400 Received: by mail-io1-f44.google.com with SMTP id q5-v6so4298960iop.3 for <27456@debbugs.gnu.org>; Sat, 08 Sep 2018 17:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=dJIyZEZPfaHTLNzKPqddgLYoppmA73Ffi3FIg8JNvU0=; b=O9CiUxRGvF37+LpUn0Xf5HOhI+DneyB8C57FkidT5jxCscI5XyIyDr1+/XF264P6cj yv8gZTsVYr10GGWLQe5ADsrDaiEChuhew09GFLFQkR3tqt4hx3ia09kqBvwk1Tvz4syf bIa4UttTmDJRHF+IjNI8hu6cp5pF3UlvU5gQRwqNCZ0pC3wtHxwmUvuAmmCLALCt58ea PjRDd8k+T9OkvchKPmyzQb2tnD/7oUr1tNWUEabqowiyy5Q6gXXiiBBczUZYbNXJHIPp syQqq8cdJBhpo5hALDfPslT51I55SaMY7C0gZtG8oqlIc9gRBSr6nXP030fSYzUhcH8N nvIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=dJIyZEZPfaHTLNzKPqddgLYoppmA73Ffi3FIg8JNvU0=; b=XBIVR+I1Yjy5C3iGaEl8GclotVLA3rhTsZoTlYoVv9ZfMJ5d2JGtmHSl3W3NVbuYi9 sghJp2ByoRDuMT55pnY51ta1m2KSX5h5sr+zKDBDKk//R/C/xG1xYGCI4NeHwJ2xXClz gN6av5mu83n6wCm/AxgildB/SG2QaLosqvtDp69uKpXil4PdxY7Ve2yP5+rPqRdhlSRA JWCVLcWsVPkIHyU3X6vnldndZmSOBgEHbnzzVs+jsexZ+qEF7/c/MsK0wGT1lRmJMOwl nqfEFOtVRRi4du2AB/FidvdbQv4YkseYFEOG1TXBSoqURn8b3HtKU9R6FBHSISr06OpZ Ifow== X-Gm-Message-State: APzg51BmDP0EABkOvKi4FtYt8t9DRrI9hgL3zRbONwaqLTxWusBG/20K E4tp845ma1LXlmAWK2dMLMMQkPMXuGPem7AApmRIpwmMeLc= X-Google-Smtp-Source: ANB0VdbTA1ZOImYLxTgs+7xGuDucpkn3oCevemiJOLnZ9wtIkOoWn1ZT+mDuXjA+YehpRdsWyAm++CWMi9ShDXjybKE= X-Received: by 2002:a5e:8d18:: with SMTP id m24-v6mr11597484ioj.217.1536453349266; Sat, 08 Sep 2018 17:35:49 -0700 (PDT) MIME-Version: 1.0 From: Allen Li Date: Sat, 8 Sep 2018 17:35:38 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I think we can close this. The comma operator suggested by Andreas is the right solution. From unknown Mon Jun 23 13:15:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Allen Li Subject: bug#27456: closed (Re: bug#27456: 25.2; Not possible to use -prune with find-dired) Message-ID: References: <87lg8bz96e.fsf@web.de> <87k243qm3z.fsf@felesatra.moe> X-Gnu-PR-Message: they-closed 27456 X-Gnu-PR-Package: emacs Reply-To: 27456@debbugs.gnu.org Date: Sun, 09 Sep 2018 02:40:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1536460802-3807-1" This is a multi-part message in MIME format... ------------=_1536460802-3807-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27456: 25.2; Not possible to use -prune with find-dired which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27456@debbugs.gnu.org. --=20 27456: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27456 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1536460802-3807-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27456-done) by debbugs.gnu.org; 9 Sep 2018 02:39:21 +0000 Received: from localhost ([127.0.0.1]:50735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fypdB-0000yN-IP for submit@debbugs.gnu.org; Sat, 08 Sep 2018 22:39:21 -0400 Received: from mout.web.de ([212.227.15.3]:36283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fypd9-0000y8-Gh for 27456-done@debbugs.gnu.org; Sat, 08 Sep 2018 22:39:20 -0400 Received: from drachen.dragon ([92.208.92.46]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MfkOq-1gB0pT0nu0-00NAJY; Sun, 09 Sep 2018 04:39:07 +0200 From: Michael Heerdegen To: Allen Li Subject: Re: bug#27456: 25.2; Not possible to use -prune with find-dired References: <87k243qm3z.fsf@felesatra.moe> Date: Sun, 09 Sep 2018 04:39:05 +0200 In-Reply-To: (Allen Li's message of "Sat, 8 Sep 2018 17:35:38 -0700") Message-ID: <87lg8bz96e.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zAdKVaO2E5//c/EmbuuLNF9kR2GUgPEGJtIWMmW9z0oTxWE+wx/ SdIbCBko6FaciYDXUbEmO93fY+O9cIEc2CHK4IUFSns8Zj+Qe4vUzvuA3poSGh9szgNH18p XMzv1qA5bAeJBfD4Jvm3rs3XM3YyvldlLMe1weLa2jFkkHo/cNN+XqIvNNARH0lijEk0cPR 2ay9LvxLpyhAis7aCyizA== X-UI-Out-Filterresults: notjunk:1;V01:K0:dlP8Q2XyBYs=:aNFMx+O/UpuS2rdzIkghIq 78YhQ6Q+G0yitg9Mt2+PZQ4JL1b/PUU14EY6Odky+sp5Zgg95sxTJewTZn7OpyRWiLrrfaqxU v9klzVvMfJRc3bZu9tIYsC76RZAZR2MpO+h4TPyo9EHq4GNrqElVptxOnRF9C54Lkn7xkHnym 2Clp/C8SgC8wb2DAz+uP8ZdbTbJ/Dv4AJ0GCuByD7ZibqMFa2aKLo+lkHfBAwvUBOwU3qPzWo Q5Y9G9tEMD5guYpiuR44HD5PHLImoYWZH4/3QQAjxAKirCGSZV82ti1LG5Fo1x08gH9mYaA6P bzjGaE8KCgmVIyph72YCLwQsVJxgYVWQYGdzwtlwiC2AkOfPRnkHhA2e6VQ3thStfqjZBxam3 6Ecmf0rH0vH2eYBIhqXopvr3lmXQcZCh+DNoraWZvh+m8pRwhXhjUoZ8K9llqAE+LRybyk8Ek twUKFUF3FEMVSlaED8kKOPvXZwbExflYTeCFKOgYqas0MIL0jZYgsWoLjVZkBYHA0DrbsR4db M7NgDj4ExjIWG93Al0OL+0RWTc8hyt3byvnWGqnkjWbSazDJwfFPbrGgPDO9hsoFi/LoyWvWz eE9Q33xteIU7w+stTTz8B1lMY+WClspkUTzsI47C95NLFCwYs2fAbUs7vBsDwzP1CMbgvss5Y OGWG9IQ937YhgqKgVJYZjNAqKgaJxMR972v0hv98DcHzetwxkg26W0z3G59Ud4x63ZHmAFxq7 AGkD8K8mRhxSAXLyKrq6yOubGfDEiSQSfxZdi10IRtOAjGbm0c4z7EdmuzB87hXAIrEAaFzAA qGRhLZM X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27456-done Cc: 27456-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Allen Li writes: > I think we can close this. The comma operator suggested by Andreas is > the right solution. Ok, fine - closing. Michael. ------------=_1536460802-3807-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Jun 2017 06:01:06 +0000 Received: from localhost ([127.0.0.1]:33793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOHeT-0005ry-Mu for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:01:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOHeR-0005rO-MD for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:01:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOHeL-00033c-Td for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:00:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOHeL-00033U-RP for submit@debbugs.gnu.org; Fri, 23 Jun 2017 02:00:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOHeK-0008Hx-QW for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOHeF-00031y-Vx for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:56 -0400 Received: from solmarta.felesatra.moe ([198.199.111.162]:49344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOHeF-00031a-PI for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 02:00:51 -0400 Received: from localhost (c-73-70-42-168.hsd1.ca.comcast.net [73.70.42.168]) by solmarta.felesatra.moe (Postfix) with ESMTPSA id 0F96CFFEAC for ; Fri, 23 Jun 2017 02:00:47 -0400 (EDT) From: Allen Li To: bug-gnu-emacs@gnu.org Subject: 25.2; Not possible to use -prune with find-dired Date: Thu, 22 Jun 2017 23:00:48 -0700 Message-ID: <87k243qm3z.fsf@felesatra.moe> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) It is not possible to effectively use the -prune action with find-dired. With plain find, -prune would be used like: find . -name "foo*" -prune -o -name "*.el" -ls However, find-dired wraps everything: (find-dired "." "-name \\"foo*\\" -prune -o -name \\"*.el\\" -ls") results in the equivalent call: find . \( -name "foo*" -prune -o -name "*.el" -ls \) -ls Notably, this will list files matching foo* Unfortunately, I'm not sure if there are any easy remedies. Perhaps find-dired should refrain from appending -ls if ARGS already contains -ls. In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) ------------=_1536460802-3807-1-- From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 05:23:02 +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: To: 27456@debbugs.gnu.org, michael_heerdegen@web.de, darkfeline@felesatra.moe Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.153647055119165 (code B ref 27456); Sun, 09 Sep 2018 05:23:02 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 05:22:31 +0000 Received: from localhost ([127.0.0.1]:50766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysB4-0004z3-VA for submit@debbugs.gnu.org; Sun, 09 Sep 2018 01:22:31 -0400 Received: from smtp-3.orcon.net.nz ([60.234.4.44]:42469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysB2-0004ys-52 for 27456@debbugs.gnu.org; Sun, 09 Sep 2018 01:22:29 -0400 Received: from [150.107.172.19] (port=44733 helo=[192.168.20.103]) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fysAv-00077a-Qn; Sun, 09 Sep 2018 17:22:21 +1200 References: <87k243qm3z.fsf@felesatra.moe> <87lg8bz96e.fsf@web.de> From: Phil Sainty Message-ID: <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> Date: Sun, 9 Sep 2018 17:22:21 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87lg8bz96e.fsf@web.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) The two workarounds indicated here do work nicely. For reference, to list everything except a certain directory (.git, in this example), you could use either of the following option sets at the "Run find (with args):" prompt: -type d -name .git -prune , -true -type d -name .git -prune -false -o -true Despite that, I think it would be useful and consistent for `find-dired' to acquire the prefix argument behaviour of `rgrep': > With C-u prefix, you can edit the constructed shell command line > before it is executed. > With two C-u prefixes, directly edit and run `grep-find-command'. This would give some users a more familiar solution to the problem if they are not used to the particular find options needed to work around the problem (which was the situation I found myself in just the other day, so the new activity on this bug was very timely :) -Phil From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 05:33:02 +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: To: Phil Sainty Cc: 27456@debbugs.gnu.org, darkfeline@felesatra.moe Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.153647115920412 (code B ref 27456); Sun, 09 Sep 2018 05:33:02 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 05:32:39 +0000 Received: from localhost ([127.0.0.1]:50770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysKs-0005JA-VU for submit@debbugs.gnu.org; Sun, 09 Sep 2018 01:32:39 -0400 Received: from mout.web.de ([217.72.192.78]:33819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysKq-0005Ix-PP for 27456@debbugs.gnu.org; Sun, 09 Sep 2018 01:32:37 -0400 Received: from drachen.dragon ([92.208.92.46]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MejmG-1gEKmz3VnM-00OGE8; Sun, 09 Sep 2018 07:32:21 +0200 From: Michael Heerdegen References: <87k243qm3z.fsf@felesatra.moe> <87lg8bz96e.fsf@web.de> <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> Date: Sun, 09 Sep 2018 07:32:19 +0200 In-Reply-To: <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> (Phil Sainty's message of "Sun, 9 Sep 2018 17:22:21 +1200") Message-ID: <87in3fi6cc.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:CxowTdvqGTOeXWehJQ0b7uxkIoYtiVu9cH3pOXzIbs5uZNh6f9B SauauJ7f5atdte9GRrXBTC7hnocUl4FxUGPvLq78YFFerhO9ak+2nhYkMO9x/1OvKzm5H+0 jLqNjuMt9IkK/QRb7wLrX++2BvVUCvQxiBUca9ImXGS+rKKYr5GAnGeZ7XlvAh7eK//b55E oc+jRGIs++C1IlV/JuvFw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6e+mKYpyyi0=:s6w6icdh66jjN2Jqopxsm4 6ePAdy8GzhWXEv9cADPEzbnOUISyyGxvJTBvtzpl33iOkAnqTJi7hGy/V8iZWjxDICaWXFEaC TeigrGLcmePw8UCNkzBWga+gzwEnkhQLYZr7i7ovqCBrPQQwmAhZHFkZdv5k26k0FsyMwN652 Yd/KI2FiZ7L0uQ8psK3umn1xP5vLSKqMlLm5YGkMij61HsfZjKTxESONvqQAamJyM78+xxfWD y0GZFpPIslUExNOSEssVRNRS4w3uFY90LHklhDjt1tw8JBpmunou3SOUxuoN8WWvugmxwJ0bw ghVLJ9B03iLk2N5kI9yR+sO9lH5ug9FOlqm1b+rrs7+wObmTFpp/RqVKp2GY6lJEkOC7o1V2Z vG2GWipQtrPk2x3vwDvHEdZwjD34p4Blv32mpPhbGrMvwbPttRvYfV5iDNthLcgKkoXgWSB1D 8jIQlYWraIPQZundYBqIq9cy6N5cels68W9rjInfSMFDbwYD3c5NZxc+7Wx8pupe/uG/EsIZb 9uBjC4eXYv9DmjWrCj8dPMxtANV9tU+9vkq2iu93cFEMYvnqFV0Q7E/bGZy6yBIwTTJBaPOKc YZXEA+wgJOa3ouhVv/TAPnGbS8PxDamEC9vfDxP5XCVa093Gdh9upR+AOURzUgD0e8jcpKTgy ZyR4hE96KeBS5mn+oPZywQXeY3tD97NdoKykPH6yjGvJIEF1swPUFwlqJxb7wjjHbqK/c/3NN EQJjXHxqDGbvaWXEd2cryGZgEEvltmhm3TAEZhFZi+ESLhO61i8hAKGWn//FsTLXPacGZUwx5 vawdmYl X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Phil Sainty writes: > Despite that, I think it would be useful and consistent for > `find-dired' to acquire the prefix argument behaviour of `rgrep': > > > With C-u prefix, you can edit the constructed shell command line > > before it is executed. > > With two C-u prefixes, directly edit and run `grep-find-command'. > > This would give some users a more familiar solution to the problem > if they are not used to the particular find options needed to work > around the problem (which was the situation I found myself in just > the other day, so the new activity on this bug was very timely :) Yes, that could be useful. Do you want to provide a patch, or can you open a new bug report with the feature request? Thanks, Michael. From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 09:39:02 +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: To: Michael Heerdegen Cc: 27456@debbugs.gnu.org, darkfeline@felesatra.moe Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.153648589611724 (code B ref 27456); Sun, 09 Sep 2018 09:39:02 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 09:38:16 +0000 Received: from localhost ([127.0.0.1]:50829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fywAa-000332-Ci for submit@debbugs.gnu.org; Sun, 09 Sep 2018 05:38:16 -0400 Received: from smtp-3.orcon.net.nz ([60.234.4.44]:39165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fywAZ-00032u-Ar for 27456@debbugs.gnu.org; Sun, 09 Sep 2018 05:38:15 -0400 Received: from [150.107.172.19] (port=5788 helo=[192.168.20.103]) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fywAW-0001WD-Vt; Sun, 09 Sep 2018 21:38:13 +1200 References: <87k243qm3z.fsf@felesatra.moe> <87lg8bz96e.fsf@web.de> <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> <87in3fi6cc.fsf@web.de> From: Phil Sainty Message-ID: Date: Sun, 9 Sep 2018 21:38:12 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87in3fi6cc.fsf@web.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 09/09/18 17:32, Michael Heerdegen wrote: > Yes, that could be useful. Do you want to provide a patch, or can you > open a new bug report with the feature request? For now I have raised this as bug#32668: 26.1; Give find-dired prefix argument behaviour equivalent to that of rgrep From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 11:50:02 +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: To: Michael Heerdegen Cc: 27456@debbugs.gnu.org, darkfeline@felesatra.moe Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.1536493788836 (code B ref 27456); Sun, 09 Sep 2018 11:50:02 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 11:49:48 +0000 Received: from localhost ([127.0.0.1]:50860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyyDr-0000DQ-Th for submit@debbugs.gnu.org; Sun, 09 Sep 2018 07:49:48 -0400 Received: from smtp-1.orcon.net.nz ([60.234.4.34]:33365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyyDp-0000DE-6Q for 27456@debbugs.gnu.org; Sun, 09 Sep 2018 07:49:46 -0400 Received: from [150.107.172.19] (port=25118 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fyyDl-00024m-Ec; Sun, 09 Sep 2018 23:49:41 +1200 From: Phil Sainty References: <87k243qm3z.fsf@felesatra.moe> <87lg8bz96e.fsf@web.de> <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> <87in3fi6cc.fsf@web.de> Message-ID: <5092adbd-826c-8f1b-45ba-6480fdfbaa20@orcon.net.nz> Date: Sun, 9 Sep 2018 23:49:41 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) What do people think about mentioning in the `find-dired' docstring the -true, -false, and comma operators, as being particularly useful for structuring a find command within the constraints applied by this function? Maybe even including a usage example for -prune? -Phil From unknown Mon Jun 23 13:15:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27456: 25.2; Not possible to use -prune with find-dired Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 14:05: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: To: Phil Sainty , Michael Heerdegen Cc: 27456@debbugs.gnu.org, 32668@debbugs.gnu.org, darkfeline@felesatra.moe Received: via spool by 27456-submit@debbugs.gnu.org id=B27456.153650188414415 (code B ref 27456); Sun, 09 Sep 2018 14:05:01 +0000 Received: (at 27456) by debbugs.gnu.org; 9 Sep 2018 14:04:44 +0000 Received: from localhost ([127.0.0.1]:51403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz0KS-0003kM-FF for submit@debbugs.gnu.org; Sun, 09 Sep 2018 10:04:44 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz0KQ-0003k2-Fu; Sun, 09 Sep 2018 10:04:42 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w89E3c6X115792; Sun, 9 Sep 2018 14:04:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=a2sjsKrvEZVaQch4AkUbEA8lx0V9eeSAWRfS58zrMJU=; b=a+EeJWfg6RhhAqO1iHe1RYodeS3j5t8oYWQydzMfJwEqOi9JMFRVox3gyBv89YwCuPZh JppTsV5uuxwqYZVnFhtcmX2au3YlaDXXbZ91SRI1OG9LlWSgG+hgWZorCNITWSYU29vY QmNeA/y5J4stoY/YQr4zF7VuxaBVKLf9irA8HulxIMdJnTG5CYc+ygJa+LmV7Qn+a7H9 jflTCyR44uCYBOHocFlq/UAjhWcPSomQ2pIsNE7FReckJjGEWzvzO+UcvHfMz0M9YQ3A +FcjHdUx2MtqlOuya2enmQhSYCoArsAASXEbSJaJ01PU+hf1hP+qJPdXIi3pS09QvIKM 3Q== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2mc72qae0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Sep 2018 14:04:34 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w89E4TKt031275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 9 Sep 2018 14:04:29 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w89E4R7k000604; Sun, 9 Sep 2018 14:04:27 GMT MIME-Version: 1.0 Message-ID: <0b2d5d16-846e-4711-b1c4-0030a6871b7e@default> Date: Sun, 9 Sep 2018 07:04:26 -0700 (PDT) From: Drew Adams References: <87k243qm3z.fsf@felesatra.moe> <87lg8bz96e.fsf@web.de> <4a51546f-d4b6-739e-5cc2-55c5f5694b33@orcon.net.nz> <87in3fi6cc.fsf@web.de> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9010 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809090155 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > For now I have raised this as bug#32668: 26.1; Give find-dired prefix > argument behaviour equivalent to that of rgrep FWIW, in my library `find-dired+.el', which adds to `find-dired.el', `find-dired' acts as follows (`C-h f find-dired'): ------8<--------------- find-dired is an interactive Lisp function in =E2=80=98find-dired+.el=E2=80= =99.=20 (find-dired DIR ARGS &optional DEPTH-LIMITS EXCLUDED-PATHS) Run =E2=80=98find=E2=80=99 and put its output in a buffer in Dired Mode. Then run =E2=80=98find-dired-hook=E2=80=99 and =E2=80=98dired-after-readin-= hook=E2=80=99. The =E2=80=98find=E2=80=99 command run (after changing into DIR) is essenti= ally this, where LS-SWITCHES is =E2=80=98(car find-ls-option)=E2=80=99: 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 =E2=80=98find=E2=80=99 switch =E2=80=98-path=E2=80= =99. When both optional args are non-nil, the =E2=80=98find=E2=80=99 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. ------8<--------------- The same is true for `find-name-dired' and `find-grep-dired' - they make th= e same use of `-prune', as does the new command `find-time-dired' (`C-h f')= : ------8<--------------- find-time-dired is an interactive Lisp function in =E2=80=98find-dired+.el= =E2=80=99. =20 (find-time-dired DIR MIN-TIME MAX-TIME &optional DEPTH-LIMITS EXCLUDED-PATHS) Find files in directory DIR newer or older than a timestamp. The output is shown in a Dired buffer. MIN-TIME is a format-time string parsable by =E2=80=98parse-time-string=E2= =80=99, such as "2014-12-25 23:59:00". Only files newer than this are shown. If MIN-TIME is nil or a string matching regexp "^\s-*$", there is no lower time limit. MAX-TIME is also a format-time string parsable by =E2=80=98parse-time-strin= g=E2=80=99. Only files older than this time are shown. If MAX-TIME is nil or a string matching regexp "^\s-*$", the upper time limit is the current system time. Optional arg DEPTH-LIMITS is a list (MIN-DEPTH MAX-DEPTH) of the minimum and maximum depths. If nil, search directory tree under DIR. Optional arg EXCLUDED-PATHS is a list of strings that match paths to exclude from the search. If nil, search all directories. If args DEPTH-LIMITS and EXCLUDED-PATHS are both non-nil then the command run is essentially the following: find . -mindepth MIN-DEPTH -maxdepth MAX-DEPTH \( -path EXCLUDE1 -o -path EXCLUDE2 ... \) -prune -o \( -TIME-SWITCH -SINCE-MIN -TIME-SWITCH +SINCE-MAX \) LS-SWITCHES where: * EXCLUDE1, EXCLUDE2... are the EXCLUDED-PATHS, but shell-quoted. * TIME-SWITCH is =E2=80=98find-diredp-time-prefix=E2=80=99 concatenated wit= h "min". * SINCE-MIN is the elapsed time since MIN-TIME in minutes. * SINCE-MAX is the elapsed time since MAX-TIME in minutes. * LS-SWITCHES is =E2=80=98(car find-ls-option)=E2=80=99. ------8<--------------- This code was improved by Tino Calancha. Without having studied the bug threads of #27456 or #32668, this sounds relevant. If it helps I can offer this code, as a patch or as is. The code is here: https://www.emacswiki.org/emacs/download/find-dired%2b.el