From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: auto-refresh TAGS file on ChangeLog mod? Date: Mon, 25 Aug 2008 09:45:36 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86d4jxqhkf.fsf@lifelogs.com> References: <86iqtyxuqc.fsf@lifelogs.com> <86tzde8oc6.fsf@lifelogs.com> <86wsi9t6d0.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219676239 29029 80.91.229.12 (25 Aug 2008 14:57:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2008 14:57:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 25 16:58:12 2008 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 1KXdOX-0006QC-4q for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 16:50:13 +0200 Original-Received: from localhost ([127.0.0.1]:41922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXdNX-0005NK-Qh for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 10:49:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXdFN-0007KW-Ne for emacs-devel@gnu.org; Mon, 25 Aug 2008 10:40:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXdFK-0007HA-MC for emacs-devel@gnu.org; Mon, 25 Aug 2008 10:40:45 -0400 Original-Received: from [199.232.76.173] (port=53121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXdFK-0007Gn-Dp for emacs-devel@gnu.org; Mon, 25 Aug 2008 10:40:42 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:54990 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KXdFK-0007K4-1s for emacs-devel@gnu.org; Mon, 25 Aug 2008 10:40:42 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KXdFH-0001ii-DP for emacs-devel@gnu.org; Mon, 25 Aug 2008 14:40:39 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Aug 2008 14:40:39 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Aug 2008 14:40:39 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:+iAaGsk9hvJ9WiFqtledWJyBUNI= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:102938 Archived-At: On Fri, 22 Aug 2008 09:43:14 -0600 Tom Tromey wrote: Tom> I've wanted to roll the retags idea into etags itself. It could read Tom> a ".retags" file, daemonize, and use inotify to watch for changes in a Tom> directory tree. I never found the time to do it though. Ted> I'd like the solution to be implemented in Emacs, not externally. Tom> Why is that? I like to avoid external dependencies. Tom> My first attempt was done that way. But, given that etags is already Tom> external to emacs, I reasoned that it doesn't buy much to go this Tom> route. I understand and see your side as well. I was hoping to avoid another external tool. I'm not against it, just exploring the options. Ted> Emacs doesn't have inotify facilities AFAIK Tom> Nope. FWIW, retags actually uses the inotify-tools package. This is Tom> just a couple of little inotify wrappers that are handy for shell Tom> scripts; Emacs can use them just as easily. But, as you say, adding Tom> inotify support to Emacs would also not be difficult. I don't know if asynchronous notices will be possible (I have to look at the libraries), or if it should be implemented as a process filter to inotify-tools. The latter seems a much easier target. I'm leaving this despite (see below) thinking it's not necessary for retagging, because inotify support for Emacs is probably going to be useful for other packages. Ted> New files of interest can probably be inferred by building a list of Ted> extensions in TAGS; if you have .c files already then you'll want new.c Ted> as well. I think anything more than this should require manual Ted> reindexing or some user configuration of "I want to tag all *.c files." Tom> Right, this is where the .retags file comes in. It tells retags what Tom> to do. The particular use case that I needed here was "don't index Tom> anything in testsuite/". I definitely do not want new .c files in Tom> testsuite showing up... Thanks for clarifying. That's something I did not consider. It's probably easier to just have a Makefile that will track those dependencies automatically. Actually, what I think may be appropriate is just a way to say "make tags" before running `find-tag'. All the extra intelligence is just duplicating what the user already has in the Makefile, and what Make provides. WDYT? Ted