From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco =?utf-8?Q?Potort=C3=AC?= Newsgroups: gmane.emacs.devel Subject: Re: ctags/etags: rc file? Date: Thu, 20 Nov 2014 13:07:06 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1416485270 30596 80.91.229.3 (20 Nov 2014 12:07:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 12:07:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: ams@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 20 13:07:43 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XrQWU-0007AT-28 for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 13:07:42 +0100 Original-Received: from localhost ([::1]:34865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQWT-0004jA-Hy for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 07:07:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQWI-0004ge-JB for emacs-devel@gnu.org; Thu, 20 Nov 2014 07:07:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrQWA-0007j6-W8 for emacs-devel@gnu.org; Thu, 20 Nov 2014 07:07:30 -0500 Original-Received: from blade3.isti.cnr.it ([194.119.192.19]:8638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQW3-0007Yp-1k; Thu, 20 Nov 2014 07:07:15 -0500 Original-Received: from tucano.isti.cnr.it ([146.48.81.102]) by mx.isti.cnr.it (PMDF V6.5-x6 #32097) with ESMTPSA id <01PF6ATQM3SABXJ4P1@mx.isti.cnr.it>; Thu, 20 Nov 2014 13:07:10 +0100 (MET) Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.84) (envelope-from ) id 1XrQVu-00075e-Hs; Thu, 20 Nov 2014 13:07:06 +0100 In-reply-to: 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 eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 194.119.192.19 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177867 Archived-At: >Would it be possible for ctags/etags to read a simple .etags (or >something) file that contains the command line arguments? The reason >for it is that often projects have a bunch of default arguments that >are being passed to etags, which are not just regexps and it is >annoying to keep track of them at times. > >If .etags (one argument per line) contains, > > --language=none > --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' > --regex='/###key \(.*\)/\1/' > --regex='/[ \t]*global[ \t].*/' > *.m > >And then issuing "etags -Z" (or some other sensible short option) it >would be equivalent to running, > > etags --language=none --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' --regex='/###key \(.*\)/\1/' --regex='/[ \t]*global[ \t].*/' *.m You can put regular expressions for etags in a file. Have a look at the info file of Emacs (node Etags Regexps) or the output of `etags --help' (look for REGEXFILE). Note that if you call etags from a Makefile it is probably more clear and less prone to error to just put the --regex arguments on the command line in makefile itself.