I have a dream... about tags
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
I have a dream... about tags         


Author: Nordlöw
Date: Sep 4, 2007 03:57

I have a dream...

I have been using gtags (GNU GLOBAL) for some time now. The problem
with gtags is that is does not handle C++ namespaces, that is you
can't lookup ClassName::member just by entering this language
construct from the minibuffer. etags can however do this. It also has
a rather annoying bug that makes the indexer skip inline functions in
files containing the standard construct
#ifdef __cplusplus
extern "C" {
#endif
I have already contacted the maintainer of GNU GLOBAL about this
problem, but it seems like other todos are more imporant.

etags can however lookup such ClassName::member C++ constructs, which
is great. But, for what I have seen, etags has other deficiencies. It
doesn't handle lookups of symbols that have multiple definitions
(occur multiple times and/or in different files/functions). Nor does
it index static variables. I also haven't found a way to lookup all
uses (calls) of a structure, variable or function, which gtags can do.
Show full article (2.10Kb)
3 Comments
Re: I have a dream... about tags         


Author: Scott Frazer
Date: Sep 4, 2007 06:39

Nordlöw wrote:
> I have a dream...
>
> I have been using gtags (GNU GLOBAL) for some time now. The problem
> with gtags is that is does not handle C++ namespaces, that is you
> can't lookup ClassName::member just by entering this language
> construct from the minibuffer.

[snip]
> etags can however lookup such ClassName::member C++ constructs, which
> is great. But, for what I have seen, etags has other deficiencies. It
> doesn't handle lookups of symbols that have multiple definitions
> (occur multiple times and/or in different files/functions).

Sure it does. Besides tags-loop-continue, see:

http://www.emacswiki.org/cgi-bin/wiki/EtagsSelect
> Nor does it index static variables.

Try using this, it's much more thorough:

http://ctags.sourceforge.net/
> I also haven't found a way to lookup all
> uses (calls) of a structure, variable or function, which gtags can do.
Show full article (2.18Kb)
no comments
Re: I have a dream... about tags         


Author: Tom Tromey
Date: Sep 4, 2007 08:49

>>>>> "Nordlöw" == Nordlöw gmail.com> writes:

Nordlöw> Has anyone else also found these problems annoying, and
Nordlöw> perhaps found some solutions to them? Are there alternatives
Nordlöw> to etags or gtags that solves these problems?

Lately I've been using GNU idutils for some of my needs in this area.
idutils is not really tagging, it is more like full-text indexing for
programs. idutils doesn't do incremental updates of the ID file
(bad), but it is smart about only searching for full identifiers, and
it is much, much faster than a grep.

You might also be interested in CEDET.

Tom
no comments
Re: I have a dream... about tags         


Author: Eli Zaretskii
Date: Sep 4, 2007 13:17

> From: =?iso-8859-1?B?Tm9yZGz2dw==?= gmail.com>
> Date: Tue, 04 Sep 2007 10:57:24 -0000
>
> etags can however lookup such ClassName::member C++ constructs, which
> is great. But, for what I have seen, etags has other deficiencies. It
> doesn't handle lookups of symbols that have multiple definitions
> (occur multiple times and/or in different files/functions). Nor does
> it index static variables. I also haven't found a way to lookup all
> uses (calls) of a structure, variable or function, which gtags can do.
>
> Has anyone else also found these problems annoying, and perhaps found
> some solutions to them? Are there alternatives to etags or gtags that
> solves these problems?

One alternative, specifically designed for C++, is ebrowse, which
comes with Emacs.
no comments