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

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

Re: emac in large projects


From: Pascal Bourguignon
Subject: Re: emac in large projects
Date: Mon, 19 Feb 2007 19:58:29 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

"Ask" <ask.q@indiatimes.com> writes:
> I am a new learner of Emacs. How is it used for large projects. At
> least, how do we find all occurrences of a function, how do we jump to
> definition of a variable or function. There are other tools to do that
> - gid, cscope etc. Can it be done from within the emacs editor
> itself ?

There are add-on IDE's.

For example, have a look at http://cedet.sourceforge.net  for C/C++ development,
or at http://common-lisp.net/project/slime for Common Lisp development.


For the specific feature you ask, you can build a TAGS file for your
project, scanning all the source and header files with the etags
command, and using the find-tag command (M-.) to find definitions, etc.

For example, I put this target in my Makefile:

etags tags:
        find $$(pwd) \( -name \*.lisp \
                                        -o -name \*.[hc] \
                                        -o -name \*.hh -o -name \*.cc \
                                \) -print | etags -

M-x tags-reset-tags-table RET
M-x compile RET tags RET

Then I type the name of a function and M-.
it asks for confirmation of the name of the function,
and for the path to the TAGS file built by make tags above, (the first
time after a tags-reset-tags-table), and the goes to the definition.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HEALTH WARNING: Care should be taken when lifting this product,
since its mass, and thus its weight, is dependent on its velocity
relative to the user.


reply via email to

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