From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: vr.sundar Newsgroups: gmane.emacs.devel Subject: etags format question Date: Fri, 2 Jan 2009 09:09:13 -0800 Message-ID: <63acfd6c0901020909j75a05bb8j2b3d6b19ab8e64ab@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1230916181 30269 80.91.229.12 (2 Jan 2009 17:09:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2009 17:09:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 02 18:10:46 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 1LInXh-0008TG-8v for ged-emacs-devel@m.gmane.org; Fri, 02 Jan 2009 18:10:38 +0100 Original-Received: from localhost ([127.0.0.1]:49589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LInWS-0002W1-5G for ged-emacs-devel@m.gmane.org; Fri, 02 Jan 2009 12:09:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LInWN-0002Vt-VK for emacs-devel@gnu.org; Fri, 02 Jan 2009 12:09:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LInWN-0002Vh-CT for emacs-devel@gnu.org; Fri, 02 Jan 2009 12:09:15 -0500 Original-Received: from [199.232.76.173] (port=50140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LInWN-0002Ve-8R for emacs-devel@gnu.org; Fri, 02 Jan 2009 12:09:15 -0500 Original-Received: from qw-out-1920.google.com ([74.125.92.144]:3090) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LInWM-0000QM-U1 for emacs-devel@gnu.org; Fri, 02 Jan 2009 12:09:15 -0500 Original-Received: by qw-out-1920.google.com with SMTP id 4so2891587qwk.24 for ; Fri, 02 Jan 2009 09:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=v18SmdPDz6eW987jH65GF6r57vh6bmq4hJ35LkZ80Js=; b=HOtdqasq1jzwjEV1I41l6+l9oSn+t35tTkz7/1VPJS1SWJkIQHH8rLVlHwZFymCk8c jmtPmKTQOBbCNLSljKuhk3bXth17LzAYEQy2FDV9/EEPsDk4/wrJrWpUh7mYfwk/Nlgp kVwZHdH4dm0c97nb3ZEDOVMpeSOh02AgontQ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=uBWEmaJDmZNT4Z96BlWAwKBxQ4+EIMfdUyvnv7V3AebA42eT9nGpOz7rbfyMjGDaBl 8Q5R58Z2x3tbKzBUbW7eXTIQi2NTl+fDNDHUd612D3zyU/8Jimg9P6tag4SdKPzOjqip mEuKE4wL1CppN4U3zZ9xUH5Rzur37ua7Ec6gA= Original-Received: by 10.214.149.8 with SMTP id w8mr15132138qad.346.1230916153935; Fri, 02 Jan 2009 09:09:13 -0800 (PST) Original-Received: by 10.214.81.5 with HTTP; Fri, 2 Jan 2009 09:09:13 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:107529 Archived-At: Hi, 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? 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^?=7F::ModA::ClassA=01^A13,317 (where ^? =3D=3D \x7f and ^A =3D=3D\x01, tag_definition_text =3D=3D class A= and tagname =3D=3D ModA::ClassA) It looks the search_forward finds the tag but the qualification using the 8 order functions fails. (This is in find-tag-in-order in etags.el). Of the 8 order functions, I expected the last one - tag-any-match-p - to match. But it expects \177 (=3D=3D \x7f) to be after the point where the tag matched. ;; t if point is in a tag line with a tag containing TAG as a substring. (defun tag-any-match-p (tag) "Return non-nil if current tag line contains TAG as a substring." (looking-at ".*\177")) In my case, the text being searched for is ModA::ClassA and matches not the tag_definition_text (which has a \x7f after it) but the tagname and I think it fails because of this. Is my understanding right or am I missing something? Does the tag being searched for have to be part of the actual text and not just the generated tagname? If so why? Shouldn't match-any-p match it if it is part of the text or the tagname? How is this handled for example with c++ where you could qualify a method with the class name and jump to the right method using tags? This is my first foray into looking at (e)lisp code though I've been using emacs for a few months now. Any comments or pointers on this is much appreciated. thanks sundar