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: Sat, 30 Dec 2006 13:15:55 +0100 Message-ID: References: <1166990491.2706.205.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1167481024 1884 80.91.229.12 (30 Dec 2006 12:17:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2006 12:17:04 +0000 (UTC) Cc: Don Mullis , Olaf Dabrunz , Darren Hiebert , Bram Moolenaar , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 30 13:17:01 2006 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 1H0d90-0000mQ-93 for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 13:16:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0d8x-0002tr-Qj for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 07:16:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0d8W-0002sO-3h for emacs-devel@gnu.org; Sat, 30 Dec 2006 07:16:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0d8T-0002rU-7m for emacs-devel@gnu.org; Sat, 30 Dec 2006 07:16:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0d8S-0002rD-Ux for emacs-devel@gnu.org; Sat, 30 Dec 2006 07:16:25 -0500 Original-Received: from [194.119.192.3] (helo=mx1.isti.cnr.it) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H0d8Q-0005OZ-Tf; Sat, 30 Dec 2006 07:16:23 -0500 Original-Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.3-x3 #31251) id <01MBC79CGB8GA10S03@mx.isti.cnr.it>; Sat, 30 Dec 2006 13:15:58 +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 <01MBC79B4AXGA11AKF@mx.isti.cnr.it>; Sat, 30 Dec 2006 13:15:56 +0100 Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.63) (envelope-from ) id 1H0d7z-00012g-Ud; Sat, 30 Dec 2006 13:15:56 +0100 In-reply-to: Original-To: "Richard M. Stallman" X-INSM-ip-source: 146.48.81.102 Auth Optional-NoAuth X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 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:64485 Archived-At: > This also happens with the Emacs 21 version of etags. Olaf Dabrunz once > suggested that ctags optionally allows for duplicate entries, which > modern versions of vi can handle. > >Could you explain more clearly what this change means? >What does it mean to have "duplicate entries", and what would they do? Inside a tags file as generated by Emacs' Ctags, tag names are unique. For example, Linux defines macros with the same name in different source files, with alternative implementations. While Etags tags them all, Ctags does not. There is nothing preventing Ctags from doing that, it simply refuses to do it. In a year-old mail, Olaf Dabrunz suggested to me that this behaviour of Ctags, which I inherited, is there for compatibility with old editors, like the original Vi, while Vim can take advantage of duplicate entries. He then suggested that Ctags optionally allows for duplicate tags, which is a trivial change. Now I am asking: is there really any reason why Ctags should not create duplicate entries? Why not creating duplicate entries by default? The only drawback would be that the old Vi would jump to an unpredictable one, but the current behaviour is not much better, because only the first duplicate tag is created, the others are not included in the tags file. Olaf Dabrunz cites this proposed standard, used by at least Exhuberant ctags and Vim: , where the issue is better explained. In summary, I have three proposals for a change to Ctags, preferred first: 1. Duplicate entries are created, no warnings issued 2. Duplicate entries are created, warnings issued as they are now 3. An option is provided to create duplicate entries If a consensus is reached quickly, I can do the change now, during the pretest phase.