1

I already enable using GNU Global databases:

(setq cedet-global-command "global")
(when (cedet-gnu-global-version-check t)
  (semanticdb-enable-gnu-global-databases 'c-mode t)
  (semanticdb-enable-gnu-global-databases 'c++-mode t))

cedet-gnu-global-version-check shows correct version and cedet-gnu-global-show-root jumps to correct project root. However, according to Eric's answer here: How can I tell if CEDET is using GNU Global?, evaluating (semantic-symref-detect-symref-tool) always gives me grep, even though CEDET recognized GNU Global version.

How can I really enable CEDET to use GNU Global?

Edit: I have to force CEDET to use GNU Global:

(setq-default semantic-symref-tool "global")

Not sure if this is a correct way to setup, but currently this is my workaround to make CEDET use GNU Global. Or maybe (semantic-symref-detect-symref-tool) is buggy?

Community
  • 1
  • 1
Amumu
  • 17,924
  • 31
  • 84
  • 131

1 Answers1

3

In your edit, setting semantic-symref-tool to "global" is a fine way to start using it.

The detect mechanism (the default) will try to use Global iff there is a GPATH file at the root of your project. The root of your project is identified via EDE, or perhaps the current directory. Thus if you have some project in ~/myproj, but GPATH is in ~/myproj/src, then it will get missed.

Eric
  • 3,959
  • 17
  • 15
  • How do I hard code/set the project? Spent so much time wasted with EDE and couldn't get it to work correctly. –  Oct 30 '14 at 17:02