* Re: emac in large projects
@ 2007-02-20 21:42 A Soare
0 siblings, 0 replies; 9+ messages in thread
From: A Soare @ 2007-02-20 21:42 UTC (permalink / raw)
To: Emacs Help [help-gnu-emacs]
You must create a TAGS file first of all, in which one keeps the symbols from your project.
For example, to create a file TAGS of all symbols of EMACS you can use from a Shell
# find -name *.el -o -name *.[ch] | xargs etags
(see the documentation from find, xargs, etags)
II. From Emacs:
M-x visit-tags-table RET
<path-to-your-TAGS-file>
then M-. for the first occurence of a definition of a symbol
or
C-u 1 M-. for the next occurences, etc.
And for more see the doc from emacs info, node TAGS.
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.4825.1172007761.2155.help-gnu-emacs@gnu.org>]
* emac in large projects
@ 2007-02-19 15:57 Ask
2007-02-19 18:52 ` Robert Thorpe
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ask @ 2007-02-19 15:57 UTC (permalink / raw)
To: help-gnu-emacs
Hi
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 ?
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emac in large projects
2007-02-19 15:57 Ask
@ 2007-02-19 18:52 ` Robert Thorpe
2007-02-19 18:58 ` Pascal Bourguignon
2007-03-01 14:49 ` Ken Goldman
2 siblings, 0 replies; 9+ messages in thread
From: Robert Thorpe @ 2007-02-19 18:52 UTC (permalink / raw)
To: help-gnu-emacs
On Feb 19, 3:57 pm, "Ask" <a...@indiatimes.com> wrote:
> Hi
>
> 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,
Etags helps with this. For this particualar problem you'd probably
use grep to find occurance of the name of the function.
> how do we jump to
> definition of a variable or function.
Using Etags and the M-. command. See the info page for tags.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emac in large projects
2007-02-19 15:57 Ask
2007-02-19 18:52 ` Robert Thorpe
@ 2007-02-19 18:58 ` Pascal Bourguignon
2007-02-19 19:21 ` Tassilo Horn
2007-03-01 14:49 ` Ken Goldman
2 siblings, 1 reply; 9+ messages in thread
From: Pascal Bourguignon @ 2007-02-19 18:58 UTC (permalink / raw)
To: help-gnu-emacs
"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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emac in large projects
2007-02-19 15:57 Ask
2007-02-19 18:52 ` Robert Thorpe
2007-02-19 18:58 ` Pascal Bourguignon
@ 2007-03-01 14:49 ` Ken Goldman
2007-03-01 16:07 ` Hadron
2 siblings, 1 reply; 9+ messages in thread
From: Ken Goldman @ 2007-03-01 14:49 UTC (permalink / raw)
To: help-gnu-emacs
Ask wrote:
>
> 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 ?
The ...tag function previously described are fine.
Another solution is to run grep within emacs, and then click on a hit or
step through the hits. It's not context sensitive like the tags
feature, but it requires no preprocessing and works for any directory
regardless if the programming language.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emac in large projects
2007-03-01 14:49 ` Ken Goldman
@ 2007-03-01 16:07 ` Hadron
0 siblings, 0 replies; 9+ messages in thread
From: Hadron @ 2007-03-01 16:07 UTC (permalink / raw)
To: help-gnu-emacs
Ken Goldman <kgold@watson.ibm.com> writes:
> Ask wrote:
>>
>> 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 ?
>
> The ...tag function previously described are fine.
>
> Another solution is to run grep within emacs, and then click on a hit
> or step through the hits. It's not context sensitive like the tags
> feature, but it requires no preprocessing and works for any directory
> regardless if the programming language.
There is a cscope interface for emacs. I recommend it. tags are
extremely limited imo. cscope does a much better, if slower, job.
google up xcscope.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-03-01 16:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20 21:42 emac in large projects A Soare
[not found] <mailman.4825.1172007761.2155.help-gnu-emacs@gnu.org>
2007-02-20 22:43 ` Hadron
-- strict thread matches above, loose matches on Subject: below --
2007-02-19 15:57 Ask
2007-02-19 18:52 ` Robert Thorpe
2007-02-19 18:58 ` Pascal Bourguignon
2007-02-19 19:21 ` Tassilo Horn
2007-02-20 15:26 ` Hadron
2007-03-01 14:49 ` Ken Goldman
2007-03-01 16:07 ` Hadron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).