From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA27863; Thu, 12 Jul 2001 09:46:45 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA27923 for ; Thu, 12 Jul 2001 09:46:44 +0200 (MET DST) Received: from ivanova.zhar.net (216-99-217-88.dsl.aracnet.com [216.99.217.88]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6C7khn21318 for ; Thu, 12 Jul 2001 09:46:43 +0200 (MET DST) Received: from jae by ivanova.zhar.net with local (Exim 3.12 #1 (Debian)) id 15KbBK-0000Mh-00 for ; Thu, 12 Jul 2001 00:46:42 -0700 Date: Thu, 12 Jul 2001 00:46:42 -0700 From: John Eikenberry To: caml-list@inria.fr Subject: Re: [Caml-list] ocaml/vim/tags Message-ID: <20010712004642.A1127@zhar.net> Mail-Followup-To: John Eikenberry , caml-list@inria.fr References: <20010711165803.A30954@zhar.net> <15181.20069.221159.316790@pc803> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15181.20069.221159.316790@pc803>; from Jean-Christophe.Filliatre@lri.fr on Thu, Jul 12, 2001 at 09:14:45AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The version of etags I have on my system (5.0.1) doesn't support --regex arguments. It supports --regex-[lang] where you have to define [lang] with --langdef. I messed around a bit trying to get it working after finding it in the archives without results. I recieved a simple perl script from Christian Lindig that does the basics and will work for now. Thanks. Jean-Christophe Filliatre wrote: > > John Eikenberry writes: > > > > Oh, and I found an example using etags and its regex... but I had little > > luck with it either. Seems etags' regex features have changed quite a bit > > since 1999/01. > > I don't know vim, but I'm using the following hack to get tags for > Emacs using etags, and it still works nice (of course it is not as > satisfactory as tags based on a parsing of ocaml files) > > ====================================================================== > find . -name "*.ml*" | sort -r | xargs \ > etags "--regex=/let[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/and[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/type[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/exception[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/val[ \t]+\([^ \t]+\)/\1/" \ > "--regex=/module[ \t]+\([^ \t]+\)/\1/" > ====================================================================== > > The 'sort -r' is used to have .mli entries appearing first, then .ml > entries. Indeed, when looking for an identifier, you usually only want > its type declaration; if you also want its code, then use C-u M-. > > Hope this helps, -- John Eikenberry [jae@zhar.net - http://zhar.net] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr