caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ava Arachne Jarvis <ajar@katanalynx.dyndns.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] exuberant ctags for ocaml ?
Date: Sun, 10 Nov 2002 06:14:38 -0600	[thread overview]
Message-ID: <20021110121438.GA16871@dan0032.urh.uiuc.edu> (raw)
In-Reply-To: <20021109174102.GA16702@roke.freak>

[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


  reply	other threads:[~2002-11-10 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 23:20 Alan Schmitt
2002-11-09 17:41 ` Michal Moskal
2002-11-10 12:14   ` Ava Arachne Jarvis [this message]
     [not found]   ` <20021110121939.GC711@dan0032.urh.uiuc.edu>
     [not found]     ` <20021110130849.GA9168@roke.freak>
2002-11-10 19:07       ` Ava Arachne Jarvis
2002-11-11 21:21         ` Michal Moskal
2002-11-10 23:03   ` Alan Schmitt
2002-11-12 12:18 Cuihtlauac ALVARADO
2002-11-12 20:25 ` Michal Moskal
2002-11-14  8:00   ` Cuihtlauac ALVARADO
2002-11-14 14:39     ` Mattias Waldau

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=20021110121438.GA16871@dan0032.urh.uiuc.edu \
    --to=ajar@katanalynx.dyndns.org \
    --cc=caml-list@inria.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).