From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: mctags Date: Sat, 21 Oct 2017 13:59:30 -0600 Message-ID: <87y3o4qnkt.fsf@tromey.com> References: <87h8v439ub.fsf@gmail.com> <837ew0mupm.fsf@gnu.org> <83mv4wl4yv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508616022 23381 195.159.176.226 (21 Oct 2017 20:00:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Oct 2017 20:00:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 21 22:00:15 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5zwE-000433-Mx for ged-emacs-devel@m.gmane.org; Sat, 21 Oct 2017 22:00:07 +0200 Original-Received: from localhost ([::1]:59058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5zwM-0002ci-4B for ged-emacs-devel@m.gmane.org; Sat, 21 Oct 2017 16:00:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5zwF-0002aj-Ch for emacs-devel@gnu.org; Sat, 21 Oct 2017 16:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5zwB-0001IC-DB for emacs-devel@gnu.org; Sat, 21 Oct 2017 16:00:07 -0400 Original-Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:33374) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e5zwB-0000fJ-1G for emacs-devel@gnu.org; Sat, 21 Oct 2017 16:00:03 -0400 Original-Received: from cmgw3 (unknown [10.0.90.84]) by gproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id 9DAD61E0688 for ; Sat, 21 Oct 2017 13:59:42 -0600 (MDT) Original-Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id QKza1w00a2f2jeq01KzdZZ; Sat, 21 Oct 2017 13:59:42 -0600 X-Authority-Analysis: v=2.2 cv=H76r+6Qi c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=02M-m0pO-4AA:10 a=iRZporoAAAAA:8 a=VIb_BwI6GIt4NCLZuWkA:9 a=NOBgFS-JBQ2l-kSd6-zu:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ByPh4YgCjPmRbOW1ALrEhl+yoF1UTDS7zNK236cLuG8=; b=bARLDRqko+7+u/eGy3ai1FV0Rv GxQHxS1GZQfqqJRaO9Y+XLoUdR7OwRFVq542ndK5R5bdnDhblVA5h82tillFpUNAh+UqQR/75Xhl2 KSC90KfWxugIYU86SVNOI8f43; Original-Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:41056 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1e5zvi-000blE-Ov; Sat, 21 Oct 2017 13:59:34 -0600 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Fri, 13 Oct 2017 09:42:32 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.90.63 X-Exim-ID: 1e5zvi-000blE-Ov X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-90-63.hlrn.qwest.net (bapiya) [71.218.90.63]:41056 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 67.222.39.168 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:219666 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: Stefan> So I think the better answer is to let the user teach etags.el how to Stefan> create the TAGS file in such special cases (i.e. it can have a default Stefan> system, based on *.o thingies or based on VCS data, but that can be Stefan> overridden on a per-project basis, e.g. via .dir-locals.el). I have some patches to etags (not etags.el) to do this. The idea is to have a ".etags" config file that tells etags what to do. Then "etags --find" will read this file, walk the directory tree, and update the TAGS file. Here's a sample config file based on what gdb's "make TAGS" currently does: # Ignore some test suite files. !testsuite/*.[chylmsS] # Ignore some other things. !*.def !*/Makefile* # Handle DejaGNU (Tcl) files using regexps. *.exp --language=none --regex='/\(gdb_caching_proc\|proc\|proc_with_prefix\)[ \t]+\([^ \t]+\)/\2/' Making etags.el auto-update with this is simple: just run "etags --find". It would also be easy to script this using inotify-tools. This work still has some minor things to clean up. I didn't make --include work (I think --find should stop at any subdirectory .etags it finds, and then process those directories separately -- that is, include should be automatically handled); and there's some argument validation to be implemented. If this sounds interesting, I can clean it up and send it. Tom