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

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

Re: help with tags


From: Kai Großjohann
Subject: Re: help with tags
Date: Wed, 30 Jul 2003 17:11:55 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

"Javier Oviedo" <email_joviedo@yahoo.com> writes:

> Is there some utility that will let me automatically create this kind of
> tag/project system given some path? Ideally it would support the following
> functionality:
>
> 1. Given a root dir, it would add all sub-directories(and files within) to
> this project.
> 2. It would auto-update tags tables when/if a file is modified.
>
> I'm not sure if this is asking too much, but please let me know if there is
> anything that performs some or all of these features. Thanks in advance!

I think you have to do it manually, but make is your friend.

    rm TAGS; touch TAGS
    find . -name '*.[hc]' -print | xargs etags -a

These commands add all *.h and *.c files to the TAGS file.  You need
to rerun them whenever something big has changed.  So you could just
add these commands to your normal build process, for instance.  After
all, if something big has changed, you're going to build the program
anyway to check if it still works...

Note that small modifications are not a problem -- M-. is smart
enough to look around if the position information in TAGS is slightly
off.

You might also like the Emacs Code Browser and the Semantic
Bovinator.  The latter has some code parsers which give you tags-like
functionality, and the former provides a GUI.

Also, see M-x speedbar RET and also M-x imenu RET.  I use M-x imenu
RET a lot to jump around in the same file.
-- 
~/.signature


reply via email to

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