I'm trying to learn about ctags in emacs. I have built a TAGS file as per the instructions here: https://www.emacswiki.org/emacs/EmacsTags. I think I'm using exuberent-ctags, but I'm not sure.
I have a large code base around statistical models. Many classes have data members of the form
This would be in a header file. In the associated .cpp file I'll see code like
I'd like to press M-. and have emacs take me to the definition of
model_. Instead, I'm getting a long list of all the data members everywhere named model_, which is a very long list.
My questions are these:
Are my expectations realistic? I.e does the ctags system contain enough information to know that the
model_I'm clicking on belongs to the class whose member function I'm editing?
Is there an obvious configuration step that I have missed? I create the TAGS file using ctags -e -R --extra=+a. (I've tried with and without the --extra flag).
(Added later) If making TAGS work this way is hard, what should I be looking at instead? I assume I'm not the first person to need this functionality.