* xref and GNU Global?
@ 2015-08-19 9:02 Nicolas Petton
2015-08-19 14:06 ` Stephen Leake
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Nicolas Petton @ 2015-08-19 9:02 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
Hi,
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). Else I might start working on that.
Nico
--
Nicolas Petton
http://nicolas-petton.fr
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 9:02 xref and GNU Global? Nicolas Petton
@ 2015-08-19 14:06 ` Stephen Leake
2015-08-19 21:27 ` Nicolas Petton
2015-08-19 14:22 ` Dmitry Gutov
2015-08-19 17:19 ` Stefan Monnier
2 siblings, 1 reply; 12+ messages in thread
From: Stephen Leake @ 2015-08-19 14:06 UTC (permalink / raw)
To: emacs-devel
Nicolas Petton <nicolas@petton.fr> 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). Else I might start working on that.
Currently there is support for GNU Global in Semantic, and xref has some
hooks into Semantic.
So please post your specific use cases, and we can discuss gettting
those to work via xref/Semantic.
--
-- Stephe
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 14:06 ` Stephen Leake
@ 2015-08-19 21:27 ` Nicolas Petton
2015-08-20 15:16 ` Stephen Leake
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Petton @ 2015-08-19 21:27 UTC (permalink / raw)
To: Stephen Leake, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
Stephen Leake <stephen_leake@stephe-leake.org> writes:
> Nicolas Petton <nicolas@petton.fr> 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). Else I might start working on that.
>
> Currently there is support for GNU Global in Semantic, and xref has some
> hooks into Semantic.
>
> So please post your specific use cases, and we can discuss gettting
> those to work via xref/Semantic.
I haven't used xref.el at all yet, so I don't have any use case, but
I'll try it and tell you!
Nico
--
Nicolas Petton
http://nicolas-petton.fr
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 21:27 ` Nicolas Petton
@ 2015-08-20 15:16 ` Stephen Leake
2015-08-21 8:54 ` Nicolas Petton
0 siblings, 1 reply; 12+ messages in thread
From: Stephen Leake @ 2015-08-20 15:16 UTC (permalink / raw)
To: emacs-devel
Nicolas Petton <nicolas@petton.fr> writes:
> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
>> Nicolas Petton <nicolas@petton.fr> 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). Else I might start working on that.
>>
>> Currently there is support for GNU Global in Semantic, and xref has some
>> hooks into Semantic.
>>
>> So please post your specific use cases, and we can discuss gettting
>> those to work via xref/Semantic.
>
> I haven't used xref.el at all yet, so I don't have any use case, but
> I'll try it and tell you!
The use case is for Gnu Global, not for xref.
Give an example of how you currently use Gnu Global, and we can see if
xref can (or even should) support that.
--
-- Stephe
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 9:02 xref and GNU Global? Nicolas Petton
2015-08-19 14:06 ` Stephen Leake
@ 2015-08-19 14:22 ` Dmitry Gutov
2015-08-19 21:28 ` Nicolas Petton
2015-08-19 17:19 ` Stefan Monnier
2 siblings, 1 reply; 12+ messages in thread
From: Dmitry Gutov @ 2015-08-19 14:22 UTC (permalink / raw)
To: Nicolas Petton, emacs-devel
On 08/19/2015 12:02 PM, Nicolas Petton wrote:
> 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). Else I might start working on that.
I would approach it from a different direction: by adding xref support
to ggtags (in GNU ELPA).
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 14:22 ` Dmitry Gutov
@ 2015-08-19 21:28 ` Nicolas Petton
2015-08-21 7:46 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Petton @ 2015-08-19 21:28 UTC (permalink / raw)
To: Dmitry Gutov, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 08/19/2015 12:02 PM, Nicolas Petton wrote:
>
>> 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). Else I might start working on that.
>
> I would approach it from a different direction: by adding xref support
> to ggtags (in GNU ELPA).
I meant in general, with ggtags or something else, but yes, I'd probably
do it this way too.
Nico
--
Nicolas Petton
http://nicolas-petton.fr
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 21:28 ` Nicolas Petton
@ 2015-08-21 7:46 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2015-08-21 7:46 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel, dgutov
> From: Nicolas Petton <nicolas@petton.fr>
> Date: Wed, 19 Aug 2015 23:28:55 +0200
>
> Dmitry Gutov <dgutov@yandex.ru> writes:
>
> > On 08/19/2015 12:02 PM, Nicolas Petton wrote:
> >
> >> 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). Else I might start working on that.
> >
> > I would approach it from a different direction: by adding xref support
> > to ggtags (in GNU ELPA).
>
> I meant in general, with ggtags or something else, but yes, I'd probably
> do it this way too.
If we want GNU Global support be part of the core functionality, and
consider it as replacement for etags, then its support should be in
core Emacs, not on ELPA.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 9:02 xref and GNU Global? Nicolas Petton
2015-08-19 14:06 ` Stephen Leake
2015-08-19 14:22 ` Dmitry Gutov
@ 2015-08-19 17:19 ` Stefan Monnier
2015-08-19 21:37 ` Nicolas Petton
2 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2015-08-19 17:19 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel
> 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.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 17:19 ` Stefan Monnier
@ 2015-08-19 21:37 ` Nicolas Petton
2015-08-21 12:37 ` Stephen Leake
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Petton @ 2015-08-19 21:37 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> 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 :)
Cheers,
Nico
--
Nicolas Petton
http://nicolas-petton.fr
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-19 21:37 ` Nicolas Petton
@ 2015-08-21 12:37 ` Stephen Leake
2015-08-22 1:41 ` Eric Ludlam
0 siblings, 1 reply; 12+ messages in thread
From: Stephen Leake @ 2015-08-21 12:37 UTC (permalink / raw)
To: emacs-devel
Nicolas Petton <nicolas@petton.fr> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: xref and GNU Global?
2015-08-21 12:37 ` Stephen Leake
@ 2015-08-22 1:41 ` Eric Ludlam
0 siblings, 0 replies; 12+ messages in thread
From: Eric Ludlam @ 2015-08-22 1:41 UTC (permalink / raw)
To: Stephen Leake, emacs-devel
On 08/21/2015 08:37 AM, Stephen Leake wrote:
> Nicolas Petton <nicolas@petton.fr> writes:
>
>> Stefan Monnier <monnier@iro.umontreal.ca> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-08-22 1:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 9:02 xref and GNU Global? Nicolas Petton
2015-08-19 14:06 ` Stephen Leake
2015-08-19 21:27 ` Nicolas Petton
2015-08-20 15:16 ` Stephen Leake
2015-08-21 8:54 ` Nicolas Petton
2015-08-19 14:22 ` Dmitry Gutov
2015-08-19 21:28 ` Nicolas Petton
2015-08-21 7:46 ` Eli Zaretskii
2015-08-19 17:19 ` Stefan Monnier
2015-08-19 21:37 ` Nicolas Petton
2015-08-21 12:37 ` Stephen Leake
2015-08-22 1:41 ` Eric Ludlam
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.