From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco =?iso-8859-1?Q?Potort=EC?= Newsgroups: gmane.emacs.devel Subject: Re: etags format question Date: Sun, 04 Jan 2009 22:44:34 +0100 Message-ID: References: <63acfd6c0901020909j75a05bb8j2b3d6b19ab8e64ab@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1231105582 27034 80.91.229.12 (4 Jan 2009 21:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Jan 2009 21:46:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: "vr.sundar" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 04 22:47:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJaoL-00087K-Ry for ged-emacs-devel@m.gmane.org; Sun, 04 Jan 2009 22:47:06 +0100 Original-Received: from localhost ([127.0.0.1]:39386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJan6-0002oF-Jr for ged-emacs-devel@m.gmane.org; Sun, 04 Jan 2009 16:45:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJan2-0002nW-7V for emacs-devel@gnu.org; Sun, 04 Jan 2009 16:45:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJan0-0002ll-IN for emacs-devel@gnu.org; Sun, 04 Jan 2009 16:45:43 -0500 Original-Received: from [199.232.76.173] (port=50482 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJan0-0002lY-DD for emacs-devel@gnu.org; Sun, 04 Jan 2009 16:45:42 -0500 Original-Received: from mx2.isti.cnr.it ([194.119.192.4]:3213) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJan0-00078S-0F for emacs-devel@gnu.org; Sun, 04 Jan 2009 16:45:42 -0500 Original-Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4 #31598) id <01N3WXLJ62SW9B3LTZ@mx.isti.cnr.it> for emacs-devel@gnu.org; Sun, 04 Jan 2009 22:44:35 +0100 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.4 #31598) with ESMTPSA id <01N3WXLIUA2Y9IACRR@mx.isti.cnr.it>; Sun, 04 Jan 2009 22:44:34 +0100 Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.69) (envelope-from ) id 1LJalu-0001ns-CZ; Sun, 04 Jan 2009 22:44:34 +0100 In-reply-to: <63acfd6c0901020909j75a05bb8j2b3d6b19ab8e64ab@mail.gmail.com> X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-operating-system: by monty-python.gnu.org: OpenVMS 7.2 (Multinet 4.3-4.4 stack) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107581 Archived-At: >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.