emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: etags format question


From: Francesco Potortì
Subject: Re: etags format question
Date: Sun, 04 Jan 2009 22:44:34 +0100

>I have a question regarding etags format and tags processing in
>etags.el. The etags format per the wikipedia entry
>http://en.wikipedia.org/wiki/Ctags is:
>
>    {tag_definition_text}<\x7f>{tagname}<\x01>{line_number},{byte_offset}
>
>Should the current tag text being looked for be a substring of the
>tag_definition_text or is it enough if it is a substring of tagname?

There is a series of matches tried.  Look at the find-tag-tag-order in
etags.el.  The tagname is the exact symbol one is looking for.  Have a
look at etc/ETAGS.EBNF too, and feel free to ask for more clarifications.

>I'm trying to set things up for ruby code to be able to jump to the
>right class taking module namespace into account. I used rtags to
>generate the tags (etags doesn't list ruby in the list of supported
>languages, ctags generates tags but doesn't qualify them with the
>module name.) The problem is when I hit M-. and type in ModA::ClassA I
>get back a no tag found, even though if I open up the tag file, I can
>see multiple instances of ModA::ClassA. And the tag is found if I just
>type ClassA though in this case it finds all the matches in other
>modules too. rtags generates tags like this:
>
>class A^?::ModA::ClassA^A13,317

No, you should have something like
class A (^?ModA::ClassA^A13,317

try to use etags on a C++ file and look at what it produces.

By the way, maybe Ruby code could be tagged by etags as a special case
of C++ handling?  Java is managed this way, but I do not know how near
Ruby is to C++/Java.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]