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 NAA04706; Sun, 10 Nov 2002 13:14:42 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA00460 for ; Sun, 10 Nov 2002 13:14:41 +0100 (MET) Received: from dan0032.urh.uiuc.edu (dan0032.urh.uiuc.edu [130.126.244.41]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gAACEeD07492 for ; Sun, 10 Nov 2002 13:14:40 +0100 (MET) Received: by dan0032.urh.uiuc.edu (Postfix, from userid 1000) id E53C612C67; Sun, 10 Nov 2002 06:14:38 -0600 (CST) Date: Sun, 10 Nov 2002 06:14:38 -0600 From: Ava Arachne Jarvis To: caml-list@inria.fr Subject: Re: [Caml-list] exuberant ctags for ocaml ? Message-ID: <20021110121438.GA16871@dan0032.urh.uiuc.edu> Mail-Followup-To: caml-list@inria.fr References: <20021108232027.GL2196@alan-schm1p> <20021109174102.GA16702@roke.freak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021109174102.GA16702@roke.freak> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk [Michal Moskal - Sat, 9 Nov 2002 01:41:36 PM CST] > On Fri, Nov 08, 2002 at 06:20:27PM -0500, Alan Schmitt wrote: > > I was wondering if someone uses exuberant ctags with ocaml ... > > I'm using OCaml-otags, that, with little patche, works very nice > with vi. Another patch is need to compile it with ocaml 3.05+. > You can find the patches in question in: > > ftp://ftp.nest.pld.org.pl/test/SRPMS/ocaml-otags-3.04.3-2.src.rpm I added, I believe, sufficient string escaping (escaping '*' seems unnecessary, and you don't need to escape '^' since they occur after the initial '^' in the format string used to print a line in the tag file, you don't even need to escape []...). (vi.ml): ------------------------------------------------ let escape s = let part_es = String.escaped s in let buffer = Buffer.create (String.length part_es) in String.iter (fun c -> match c with | '.' -> Buffer.add_string buffer "\\." | '$' -> Buffer.add_string buffer "\\$" | _ -> Buffer.add_char buffer c) part_es; Buffer.contents buffer (* FIXME: escape ^$/* and probably few more things with \ *) let line filename tagname linebeg = let etag = Printf.sprintf "%s\t%s\t/^%s$/;\n" tagname filename (escape linebeg) in etag, (String.length etag) ------------------------------------------------ Also, once you get the patches finished up, remember to submit them to the author of otags. :) -- | The one day you'd sell your soul for something, souls are a glut. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners