[plug] trying to use emacs "tags" facility
Mike Holland
myk at plug.linux.org.au
Wed Jan 29 17:56:14 WST 2003
On Wed, 29 Jan 2003, David Buddrige wrote:
> I am told that there is a facility within emacs to define "tags". My
> understanding of this facility is that it allows you to automatically
> navigate to the definition of a given class/function when going through
Yes. It stole the idea from that inferior editor, vi. :-)
> However, I have not been able to figure out how the facility is supposed to
> work. Based on the manual downloadable from www.gnu.org, I used the "etags'
> program to generate a TAGS file in the directory containing my source code.
Does that file look like its got the right data?
To use it, use the `find-tag' function (bound to M-. on my box).
The first time, it will prompt you for which TAGS file to load. the
default is probably correct. It then prompts for the function name to
goto. Default is the name at the cursor. So it takes you from the call, to
the function definition, loading the file if needed.
After looking at the code, you probably want 'pop-tag-mark' (M-*) to
go back to where you were. Emacs is a great little IDE.
Note also the 'tags-search' function, for doing a global search over all
source files in a project. And 'tags-query-replace'.
I also have in init.el:
;; for browsing source code
(global-set-key 'kp_add 'find-tag )
(global-set-key 'kp_subtract 'pop-tag-mark )
regards, Mike.
--
"I do not think we can hope for any better things now. We shall stick it out
to the end, but we are getting weaker, of course, and the end cannot be far.
It seems a pity, but I do not think I can write more." - RF Scott
More information about the plug
mailing list