From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Thomas L Roche" Newsgroups: gmane.emacs.help,gmane.emacs.windows Subject: Re: isearch-regexp-in-all-matching-files-in-tree? Date: Mon, 14 Oct 2002 14:55:34 -0400 Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1034621917 12079 127.0.0.1 (14 Oct 2002 18:58:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2002 18:58:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, help-emacs-windows@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 181AQF-00038Z-00 for ; Mon, 14 Oct 2002 20:58:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 181AQ7-0007BW-00; Mon, 14 Oct 2002 14:58:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 181AP9-0006Qu-00 for help-gnu-emacs@gnu.org; Mon, 14 Oct 2002 14:57:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 181AP7-0006Pl-00 for help-gnu-emacs@gnu.org; Mon, 14 Oct 2002 14:57:26 -0400 Original-Received: from e32.co.us.ibm.com ([32.97.110.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 181ANU-0005UZ-00; Mon, 14 Oct 2002 14:55:44 -0400 Original-Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e32.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g9EItapw049702; Mon, 14 Oct 2002 14:55:36 -0400 Original-Received: from d03nm120.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id g9EIvGio033154; Mon, 14 Oct 2002 12:57:16 -0600 Original-To: David Forrest X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 X-MIMETrack: Serialize by Router on D03NM120/03/M/IBM(Release 5.0.10 |March 22, 2002) at 10/14/2002 12:55:35 PM, Serialize complete at 10/14/2002 12:55:35 PM Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2602 gmane.emacs.windows:975 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2602 On Mon, 14 Oct 2002, Tom Roche wrote: >> Use case: I'm in a dired buffer in GNU Emacs 21.1.1 on w2k. I >> want to _interactively_ search for the string 'GenericAction' >> (and replace with 'ActionClass') in all files with names >> matching '*.java' anywhere in the directory tree below the >> current directory. Dave Forrest 10/14/2002 02:37 PM > Would the Operate/Query replace in marked files Q > or > dired-do-query-replace do what you need? No, because it requires marking the matching files first, but if there's a way to do that, I could (manually) chain the two operations. Alternatively, is there a way that I could query-replace-regexp on a grep-mode buffer, instead of a dired buffer? I'd be happy if I could M-x grep-find RET find . -type f -print0 -name '*.java'| xargs -0 -e grep -n -e 'GenericAction' | grep -v 'EGLGenericAction' | grep -v 'GenericActionModel' | grep -v 'GenericActionCodeGenContrib' RET Q RET GenericAction RET ActionClass RET