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: [h-e-w] Re: isearch-regexp-in-all-matching-files-in-tree? Date: Tue, 15 Oct 2002 12:54:03 -0400 Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1034700903 10456 80.91.224.249 (15 Oct 2002 16:55:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2002 16:55:03 +0000 (UTC) Cc: help-emacs-windows@gnu.org, help-gnu-emacs@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 181Uy9-0002hn-00 for ; Tue, 15 Oct 2002 18:54:57 +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 181Uyg-0003x1-00; Tue, 15 Oct 2002 12:55:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 181UxP-00026P-00 for help-gnu-emacs@gnu.org; Tue, 15 Oct 2002 12:54:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 181UxN-00025p-00 for help-gnu-emacs@gnu.org; Tue, 15 Oct 2002 12:54:10 -0400 Original-Received: from e32.co.us.ibm.com ([32.97.110.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 181UxK-00024i-00; Tue, 15 Oct 2002 12:54:06 -0400 Original-Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.194.23]) by e32.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g9FGs5dn039622; Tue, 15 Oct 2002 12:54:05 -0400 Original-Received: from d03nm120.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id g9FGs4MF266650; Tue, 15 Oct 2002 10:54:04 -0600 Original-To: Bill Pringlemeir 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/15/2002 10:54:04 AM, Serialize complete at 10/15/2002 10:54:04 AM 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:2640 gmane.emacs.windows:996 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2640 Thomas L Roche Mon, 14 Oct 2002 14:18:59 -0400 >>>> 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? I replied >> 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. Bill Pringlemeir 10/15/2002 11:37 AM > C-h f -> "dired-mark-files-regexp" > dired-mark-files-regexp is an interactive compiled Lisp function > in `dired'. (dired-mark-files-regexp REGEXP &optional > MARKER-CHAR) > Mark all files matching REGEXP for use in later commands. A > prefix argument means to unmark them instead. `.' and `..' are > never marked. > REGEXP is an Emacs regexp, not a shell wildcard. Thus, use `\.o$' > for object files--just `.o' will mark more than you might think. Again, that only handles part of the use case, which I see having 3 main parts: 0 interactive search/replace for a string within 1 files with names matching another string 2 anywhere in the directory tree below the current directory So dired-mark-files-regexp allows me to mark the files by name (1), and dired-do-query-replace-regexp does the interactive search/replace. But only find-name-dired (or similar) seems to get me the files desired in the entire directory tree. However that I still need to dired-mark-files-regexp, with '.*', in order to mark all the files returned by find-name-dired! Is there a way around that?