all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Francesco Potortì" <pot@gnu.org>
To: ams@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: ctags/etags: rc file?
Date: Thu, 20 Nov 2014 13:07:06 +0100	[thread overview]
Message-ID: <E1XrQVu-00075e-Hs@tucano.isti.cnr.it> (raw)
In-Reply-To: <E1XrQDJ-0005kZ-BN@fencepost.gnu.org>

>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.



  reply	other threads:[~2014-11-20 12:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 11:47 ctags/etags: rc file? Alfred M. Szmidt
2014-11-20 12:07 ` Francesco Potortì [this message]
2014-11-20 12:14   ` Alfred M. Szmidt
2014-11-20 12:12 ` Ivan Shmakov
2014-11-20 12:19 ` Masatake YAMATO
2014-11-20 12:34   ` Alfred M. Szmidt
2014-11-21  2:26     ` Masatake YAMATO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1XrQVu-00075e-Hs@tucano.isti.cnr.it \
    --to=pot@gnu.org \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.