emacsorphanage / helm-gtags

GNU GLOBAL helm interface
203 stars 31 forks source link

Not sure where else to get support: point symbol is included in jump target candidates? #199

Closed choretortle closed 7 months ago

choretortle commented 7 months ago

I've been up and down all the documentation I can find online. I'm missing something big with regards to how either GLOBAL or HELM-GTAGS works:

If I make an extremely basic C project with a main.c and a single header file in an "include" folder, and place a function or variable definition in the header, and reference and use that function or variable in main.c, navigating with M-"." and M-"," always gives me "[N Candidates(s)]" "Find tag from here", and includes the symbol at point in the search candidates (?) I thought it was suppose to automatically jump when there was only one option?

Am I not using GLOBAL "gtags" properly? Is somthing related to GRTAGS the culprit? How can definitions be properly and permanently referenced as such without always making every existing reference a possible definition?

I started this odyssey when I noticed that no external definitions of functions were showing up in the eldoc minibuffer, but all "references" in the file do show up. In addition, I need to make symlinks to system libararies and headers; but I'm stuck trying to get the autojump function to work at all.

Any help would be much appreciated.

choretortle commented 7 months ago

So, it occurred to me that while you can define functions in headers it's not correct form; so maybe that's why it wasn't identifying the definitions. So, I got successful results putting the definition in another ".c" file. The only problem is, I also got successful results when I put the definition back in it's own header, as a double check.

I have no idea what went wrong or why my other source project was misbehaving. Until I can actually identify the problem; I guess we're closed here.

choretortle commented 7 months ago

How embarrassing, I think it went as follows: I was not getting definitions for library functions in a project. I did a test project, but only with a declaration in a header, where only a true definition is treated uniquely. Only when a definition was present, either in file or elsewhere, did it give desired behavior (I'm assuming).