help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [h-e-w] Re: isearch-regexp-in-all-matching-files-in-tree?


From: Dalton, Barnaby
Subject: RE: [h-e-w] Re: isearch-regexp-in-all-matching-files-in-tree?
Date: Tue, 15 Oct 2002 09:21:03 +0100

To rename files I use a perl script 'rename' from the perl cookbook
http://www.linuxchix.org/pipermail/techtalk/2001-October/012104.html

To replace stuff in files have a look at
http://www.emacswiki.org/cgi-bin/wiki.pl?SearchAndReplaceAcrossMultipleFiles
. I use grep-x which does what you asked with the grep buffer but there are
other options documented here as well.

Barney

> -----Original Message-----
> From: Thomas L Roche [mailto:address@hidden
> Sent: 14 October 2002 7:56 PM
> To: David Forrest
> Cc: address@hidden; address@hidden
> Subject: [h-e-w] Re: isearch-regexp-in-all-matching-files-in-tree?
> 
> 
> 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
> 
> 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
address@hidden

This footnote also confirms that this email message has been scanned
for the presence of computer viruses known at the time of sending.

www.radioscape.com
**********************************************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]