[comp.emacs] Multi-Buffer search?

paul@gill.UUCP (Paul Nordstrom) (08/25/89)

Within gnu emacs, is there a simple way to search for a string across
*all* buffers currently loaded?  I have looked with reasonable
diligence through TFM and see no reference to such a function.  If
there is no standard way to do this, has anyone written a function to
perform this type of search?  Thanks in advance for any help with this
question.




-- 
Paul Nordstrom
Gill & Co., L.P.
uunet!gill!paul

wsd@cs.brown.edu (Wm. Scott `Spot' Draves) (08/25/89)

In article <668@gill.UUCP> paul@gill.UUCP (Paul Nordstrom) writes:

   Within gnu emacs, is there a simple way to search for a string across
   *all* buffers currently loaded?  I have looked with reasonable

Although not exactly what you ask for, the tags routines might help.
They operate on a bunch of buffers at once: tags-search and
tags-query-replace perform the expected operations.  The limitation is
that a TAGS file must have been created for all the files you want to
search.  This is done with the etags program, which comes in the etc
directory of gnuemacs.  TAGS files are just great when you have a
directory with a bunch of source code in it.
-	-	-	-	-	-	-	-	-	-
Scott Draves		|	Space... The Final Frontier
wsd@cs.brown.edu	|
uunet!brunix!wsd  wsd@browncs.bitnet	Box 2555 Brown U Prov RI 02912

pinard@IRO.UMontreal.CA (Francois Pinard) (09/04/89)

In article <668@gill.UUCP> paul@gill.UUCP (Paul Nordstrom) writes:

   Within gnu emacs, is there a simple way to search for a string across
   *all* buffers currently loaded?

Not that I know.  But if the buffers can be associated with files, my
preferred way to this is to M-! execute:

	etags FILENAME...

to collect the file names into a TAGS file, then to do:

	M-x visit RET RET

to activate this TAGS file, and then:

	M-x tags-search RET pattern RET

to start the search.  M-, goes from one match to the next.
--
Franc,ois Pinard                                    pinard@iro.umontreal.ca
(514) 588-4656           ``Vivement GNU!''          ...!uunet!iros1!pinard