all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to search all open buffers?
Date: Tue, 04 Sep 2007 23:38:53 +0300	[thread overview]
Message-ID: <usl5utbc2.fsf@gnu.org> (raw)
In-Reply-To: <fbjmlg$g26$1@reader1.panix.com> (message from kj on Tue, 4 Sep 2007 13:30:24 +0000 (UTC))

> From: kj <socyl@987jk.com.invalid>
> 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.

  parent reply	other threads:[~2007-09-04 20:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 20:33 How to search all open buffers? kj
2007-08-27 22:36 ` Eric Hanchrow
2007-08-27 22:57   ` Lennart Borgman (gmail)
2007-08-27 23:32 ` Drew Adams
2007-08-29 15:52   ` Eric Hanchrow
     [not found] ` <fb1e0l$jm0$1@reader1.panix.com>
     [not found]   ` <mailman.5468.1188330586.32220.help-gnu-emacs@gnu.org>
2007-08-29  9:51     ` Richard G Riley
2007-08-30 16:46     ` kj
2007-08-30 21:18       ` Eli Zaretskii
2007-08-30 22:12         ` Dieter Wilhelm
2007-08-31  3:18           ` Eric Hanchrow
2007-08-31  6:08             ` Dieter Wilhelm
2007-08-31 13:07               ` Eric Hanchrow
2007-08-31  8:40           ` Eli Zaretskii
     [not found]       ` <mailman.76.1188508709.18990.help-gnu-emacs@gnu.org>
2007-09-04 13:30         ` kj
2007-09-04 15:51           ` Tom Tromey
2007-09-04 16:45             ` Lennart Borgman (gmail)
2007-09-04 19:03               ` J. David Boyd
2007-09-04 20:38           ` Eli Zaretskii [this message]
     [not found]           ` <mailman.323.1188938333.18990.help-gnu-emacs@gnu.org>
2007-09-07 19:16             ` kj
     [not found] <defy23tpt1.fsf@freenet.de>
2007-09-01  1:22 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=usl5utbc2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.