From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: ctags/etags: rc file? Date: Thu, 20 Nov 2014 21:19:12 +0900 (JST) Organization: Red Hat Japan, Inc. Message-ID: <20141120.211912.1151762649217499427.yamato@redhat.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1416485985 9148 80.91.229.3 (20 Nov 2014 12:19:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 12:19:45 +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:19:39 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 1XrQhz-0003PP-AF for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 13:19:35 +0100 Original-Received: from localhost ([::1]:34902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQhy-0006nR-Ft for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 07:19:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQhr-0006nL-FZ for emacs-devel@gnu.org; Thu, 20 Nov 2014 07:19:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrQhm-0002wS-F2 for emacs-devel@gnu.org; Thu, 20 Nov 2014 07:19:27 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:52118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrQhh-0002ul-4e; Thu, 20 Nov 2014 07:19:17 -0500 Original-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAKCJGJY014599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 20 Nov 2014 07:19:16 -0500 Original-Received: from localhost (dhcp-193-84.nrt.redhat.com [10.64.193.84]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAKCJEYE003837; Thu, 20 Nov 2014 07:19:15 -0500 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 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:177870 Archived-At: Hi, Yes, ctags has such ability. --options=file Read additional options from file. The file should contain one option per line. As a special case, if --options=NONE is spec‐ ified as the first option on the command line, it will disable the automatic reading of any configuration options from either a file or the environment (see FILES). There is more advanced feature. Look at my work at fishman/ctags: https://github.com/fishman/ctags/blob/master/docs/f-optlib.rst Optlib may be the feature you want. fishman/ctags was a branch of exuberant-ctags. However, these days fishman/ctags people are talking about merging the result into exuberant-ctags: https://github.com/fishman/ctags/issues/101 Masatake YAMATO > 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 >