emacs-devel
[Top][All Lists]
Advanced

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

Re: xref and GNU Global?


From: Stephen Leake
Subject: Re: xref and GNU Global?
Date: Fri, 21 Aug 2015 07:37:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

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.


Another approach is to try to integrate ggtags with xref.

There are two major differences between ggtags and xref:

xref provides a way to dispatch, in order to choose the right tool.
ggtags apparently has another way.

In addition, ggtags uses compilation mode to display the results; xref
has a different display by default (the display function can be changed
by a hook).

The first step is to decouple the gnu global code into "UI", "accumulate
reference" and "display references" sections (that may be done already;
I didn't actually look).

Then set xref-find-function and a few other things, to have the xref UI
dispatch to the Gnu Global "accumulate references" code.

Then you can either add new code that produces xref-locations, or set
the hook that changes the display function for xref.

-- 
-- Stephe



reply via email to

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