all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Convenient way to set "root of my project"?
Date: Wed, 28 Jan 2009 08:49:51 +0100	[thread overview]
Message-ID: <87r62neuow.fsf@tux.homenetwork> (raw)
In-Reply-To: 43f72653-1412-4402-8074-ef5302ab07a0@35g2000pry.googlegroups.com

Brett Hoerner <bretthoerner@gmail.com> writes:

> I'd like for commands like "grep" and "find file" to open at the root
> of my "project" (I know emacs has no knowledge of projects).  Does
> anyone do / use something similar?
>
> For example, I'm in /foo/bar/blah/doo/woo/file and I M-x grep, it's
> based in /foo/bar/blah/doo/woo/ and I don't want to take the time to
> change the path every time - 99% of the time I want to search my
> current project (let's say /foo) for something.  Ditto for find-file,
> changes are the file I want isn't in /foo/bar/blah/doo/woo/, but
> somewhere further up the tree (and down another branch), I'd love to
> start at /foo.
>
> Ideas?  Or maybe I'm using both of these wrong and someone can tell me
> the proper emacs-foo?

You have to use the appropriate tool to do a recursive search
For grep it's the -r option.

Search the word "defun" in all my elisp dirs and subdirs:
,----
| (diredp-do-grep "grep -nHr -e defun   /home/thierry/elisp/icicles")
`----

==> 2 mn 11

But you can use more convenient tool like traverselisp.el.

M-x traverse-deep-rfind RET /home/thierry/elisp/icicles RET defun RET .el

==> 37 s

Faster but traverse is set to ignore all .hg, .svn etc...
You can set that as you want. (for files also)
Here it search only on .el files.

traverselisp is on emacswiki at:

http://www.emacswiki.org/cgi-bin/emacs/traverselisp.el
or
hg clone http://freehg.org/u/thiedlecques/traverselisp/ 

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





  parent reply	other threads:[~2009-01-28  7:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 22:13 Convenient way to set "root of my project"? Brett Hoerner
2009-01-28  7:11 ` Drew Adams
2009-01-28  7:49 ` Thierry Volpiatto [this message]
2009-01-28  7:57 ` Kevin Rodgers
2009-01-28  9:03 ` Andreas Politz
2009-01-28 10:57 ` Peter Dyballa
     [not found] ` <mailman.6052.1233129460.26697.help-gnu-emacs@gnu.org>
2009-01-28 15:22   ` Brett Hoerner
     [not found] ` <mailman.6072.1233140265.26697.help-gnu-emacs@gnu.org>
2009-01-28 15:24   ` Brett Hoerner
     [not found] ` <mailman.6047.1233126709.26697.help-gnu-emacs@gnu.org>
2009-01-28 15:25   ` Brett Hoerner
2009-01-28 21:24     ` Scott Frazer
2009-01-29 17:00     ` 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=87r62neuow.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --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.