From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to search all open buffers? Date: Tue, 04 Sep 2007 23:38:53 +0300 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1188938411 17886 80.91.229.12 (4 Sep 2007 20:40:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2007 20:40:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 04 22:40:10 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISfBt-00055P-Ce for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2007 22:40:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISfBr-0003rR-OF for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2007 16:40:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ISfAi-0003d5-C9 for help-gnu-emacs@gnu.org; Tue, 04 Sep 2007 16:38:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ISfAh-0003cg-KL for help-gnu-emacs@gnu.org; Tue, 04 Sep 2007 16:38:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISfAh-0003cb-Gi for help-gnu-emacs@gnu.org; Tue, 04 Sep 2007 16:38:51 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ISfAh-0003C4-1s for help-gnu-emacs@gnu.org; Tue, 04 Sep 2007 16:38:51 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-163-125.inter.net.il [84.228.163.125]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DNQ72101 (AUTH halo1); Tue, 4 Sep 2007 23:38:48 +0300 (IDT) In-reply-to: (message from kj on Tue, 4 Sep 2007 13:30:24 +0000 (UTC)) X-Detected-Kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47214 Archived-At: > From: kj > Date: Tue, 4 Sep 2007 13:30:24 +0000 (UTC) > > >Then just search the files for that regex, e.g. with the Dired's `A' > >command. > > This is quite impractical. As far as I can tell, 'A' searches all > the "specified files", so solving my problem with 'A' entails first > going back and forth between *Buffer List* and various Dired buffers, > and marking those files that are being visited. I didn't mean to suggest that you mark the files that you are visiting; that's just silly. I meant to suggest searching through all the files in your project's directory. (There are Dired commands to mark only files whose names match a regexp, if you need to be more selective.) I explained elsewhere in this thread why I think that in an Emacs session that runs for long enough, the user can never be sure whether the file she needs to search is visited by some of the buffers. Thus the suggestion to look on disk, and let Emacs optimize by searching buffers where appropriate. > Just imagine, for a second, having to go through the equivalent > rigmarole of creating a tags file just to search within a *single* > buffer What rigmarole? All it takes is a single command: find . -name "*.c" | etags - A well organized project should have a TAGS target in its Makefiles anyway, and for an actively developed project that target should run automatically every day or so, to keep the database up to date. > In all honesty, reading your reply made me only *more* puzzled at > this resistance to a built-in command to search all file-visiting > buffers. There's no resistance at all. As others told you, there are at least two packages that offer this functionality, so any resistance would be simply foolish on my part. No, what I was trying to say was that if you are in dire need of such a command during program development, you should probably explore ways to organize your work and your projects in more efficient ways. It's analogous to the "goto-line" command: some people claim it's very important to them for finding lines announced by compiler error messages because they don't use the "M-x compile" facilities that are designed to do that job much better. Of course, you are free to ignore my views, if they don't seem helpful to you. > Now I find it downright bizarre and mysterious. Something > resembling a phobia or a religious taboo, and that simply cannot be > understood by outsiders... No need to get offensive or rude. I was describing the way I work on my projects; while it may seem strange to you (as much as yours seems strange to me), it serves me well for many years, and I was trying to help you make your developer life easier. You are welcome.