From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.devel Subject: Re: [PATCH, RFC] etags/ctags v22.0.92 break Linux kernel `make TAGS/tags` Date: Mon, 05 Feb 2007 09:25:52 +0100 Message-ID: References: <1166990491.2706.205.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1170664050 31690 80.91.229.12 (5 Feb 2007 08:27:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2007 08:27:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Frank Schmitt Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 09:27:14 2007 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 1HDzBx-0004O6-Lx for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 09:27:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDzBx-0007yW-52 for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 03:27:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HDzBg-0007y9-TH for emacs-devel@gnu.org; Mon, 05 Feb 2007 03:26:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HDzBg-0007xx-D8 for emacs-devel@gnu.org; Mon, 05 Feb 2007 03:26:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDzBg-0007xt-A0 for emacs-devel@gnu.org; Mon, 05 Feb 2007 03:26:56 -0500 Original-Received: from mx1.isti.cnr.it ([194.119.192.3]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HDzBf-00076w-L6 for emacs-devel@gnu.org; Mon, 05 Feb 2007 03:26:55 -0500 Original-Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.3-x3 #31251) id <01MCRO0UGE2OA9U6PR@mx.isti.cnr.it> for emacs-devel@gnu.org; Mon, 05 Feb 2007 09:25:53 +0100 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.3-x3 #31251) with ESMTPS id <01MCRO0U0OZIA9U0IK@mx.isti.cnr.it>; Mon, 05 Feb 2007 09:25:52 +0100 Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.63) (envelope-from ) id 1HDzAe-000694-C6; Mon, 05 Feb 2007 09:25:52 +0100 In-reply-to: X-INSM-ip-source: 146.48.81.102 Auth Optional-NoAuth X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-kernel: 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:65891 Archived-At: Sorry for the delay in my response. Frank, you had written: >One case I've just found: For the following class Emacs etags fails to >tag the class members and adds some strange lines for the template >parameters while exuberant ctags gives a much nicer result (see below) In fact, that happens when etags is called without the --members option. What I usually do is calling it with both --declarations and --members, whose meaning is: --declarations In C and derived languages, create tags for function declarations, and create tags for extern variables unless --no-globals is used. --members Create tag entries for members of structures in some languages. The reason why these are not the default is for compatibility with the ancient ctags, because they were new when first introduced, and because they make the TAGS file bigger. None of these reasons seems to hold any more, so maybe I should make these the default and adding --no-members and --no-declarations options. I am confident that setting at least --members as the default is good idea, so in the absence of contrary feedback, I will make --members the default and leaving --declarations as it is now, but I would gladly listen for opinions on this matter. At the end of the message I am including the output of etags with --members for the code snippet you propose. >code: >--------------------------------------------------------------------- >template >class CMultiChannelCSC19_3D >{ >private: > ipc3dLinkControlSetup setup; > ipc3dCSC19,ipcMultiChannel,ipc3dLinkControl> mcCSC; > advTimer cscInitTime; > advTimer cscSegmentationTime; > advTimer outputTime; >public: > void execute(CPluginCSCState& p, int w, int h, int d, const ipcMultiChannel* orgImage, ipcMultiChannel* regionImage, unsigned int* mapImage, ipc3dBlockCompressedLabelImage* compressedMapImage=NULL) > { > if (orgImage!=NULL) > { > //do something > } > } >}; >--------------------------------------------------------------------- >TAGS by emacs etags: >--------------------------------------------------------------------- > >foo.h,423 >template template template template class CMultiChannelCSC19_3D2,151 > void execute(CMultiChannelCSC19_3D::execute11,459 >--------------------------------------------------------------------- >TAGS by exuberant ctags: >--------------------------------------------------------------------- > >foo.h,680 >class CMultiChannelCSC19_3DCMultiChannelCSC19_3D2,151 > ipc3dLinkControlSetup setup;setup5,190 > ipc3dCSC19,ipcMultiChannel,ipc3dLinkControl> mcCSC; mcCSC6,220 > advTimer cscInitTime;cscInitTime7,375 > advTimer cscSegmentationTime;cscSegmentationTime8,398 > advTimer outputTime;outputTime9,429 > void execute(CPluginCSCState& p, int w, int h, int d, const ipcMultiChannel* orgImage, ipcMultiChannel* regionImage, unsigned int* mapImage, ipc3dBlockCompressedLabelImage* compressedMapImage=NULL)execute11,459 This is the output with --members. The first four lines make a tag for the templates, which extags does not do (as far as I know). A tag for ipc3dCSC19 is emitted, which exctags does not do. The tag names are of the form class::tag, allowing to search tags more easily. /tmp/t.cc,1293 template ,ipcMultiChannel,ipc3dLinkControl> mcCSC;^?CMultiChannelCSC19_3D::mcCSC^A6,227 advTimer cscInitTime;^?CMultiChannelCSC19_3D::cscInitTime^A7,388 advTimer cscSegmentationTime;^?CMultiChannelCSC19_3D::cscSegmentationTime^A8,418 advTimer outputTime;^?CMultiChannelCSC19_3D::outputTime^A9,456 void execute(^?CMultiChannelCSC19_3D::execute^A11,493