emacs-devel
[Top][All Lists]
Advanced

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

Re: xref and GNU Global?


From: Eric Ludlam
Subject: Re: xref and GNU Global?
Date: Fri, 21 Aug 2015 21:41:33 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

On 08/21/2015 08:37 AM, Stephen Leake wrote:
Nicolas Petton <address@hidden> writes:

Stefan Monnier <address@hidden> writes:

I find GNU Global to be far superior to etags or ctags.  Is there any
plan to have support for it in xref.el? (Or maybe there is and I missed
it).

Yes.  IIRC the plan is to wait for Nicolas Petton to start working on
it.

Hmm, right.  First I'll have a look at what semantic & xref already have
to offer :)

One approach is to use what semantic currently has for gnu global;
that's in emacs/lisp/cedet/semantic/db-global.el. I'm not clear if all
of that is accessible via the xref interface yet.

I suspect semantic/db-global.el provides the same functionality as
ggtags, possibly without as much UI; the current design goal is for xref
to be the UI for semantic cross-reference features.

Global support from cedet/semantic comes from a few different places. The core interface is a few calls in cedet-global.el. Helpful for getting some raw data.

The semantic/db-global.el is for using GNU Global as a database backend. Stand-alone, it is not useful. With Semantic and it's generic database system, it provides a way to find symbol declarations across a project. You would use this if you wanted to write or use an existing tool using semantic's tag finding APIs to find declarations. semantic-complete-jump is an example that uses that. The nice thing about semantic's database system is it can mix multiple tools together, for example global for project wide, and Semantic's parser system for buffers you are editing that global doesn't know about yet.

semantic/symref/global.el is another place with global support. This one is pretty simple as far as running and parsing output for use with the semantic symref searching system. This tool is useful for finding references, and also providing other tag information along with the different hits.


Eric



reply via email to

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