Otags Reloaded: Emacs and vi Tag Generation for OCaml
Otags generates TAGS files suitable for emacs and vi/vim from OCaml sources. Otags employs
camlp4 for parsing. Therefore otags can easily handle files that
use camlp4 syntax extensions. Otags reloaded is a complete
rewrite for the new camlp4 that is shipped with OCaml since
See also the
complete list of changes.
- 2016-01-15: otags 4.02.2 released
- fix crash on cppo line directives
- 2016-01-10: otags 4.02.1 released
- upgrade to OCaml 4.02 (module aliases, exception patterns and
extensible variants are supported, attributes are not because of
missing support in camlp4)
- minor bug fixes
- 2013-09-25: otags 4.01.1 released
Bleeding edge OCaml users may use the configure option
--no-version-check to compile otags for an unsupported
version of OCaml.
Optionally use --prefix, --bindir or --mandir if you don't like
the default installation directories.
- make install
You might need to become superuser before make install.
otags ocaml.ml -pa rq quotation.ml
to generate an Emacs TAGS table for ocaml.ml in
standard syntax and quotation.ml with (revised)
quotations. Note that otags switches the parsing engine between
the two files.
Add option -r to recurse into subdirectories and
option -vi to generate vi and vim tags tables. For
more details and more examples consult
the man page.
Compatibility and Otags version numbers
For tagging source files otags uses a recursive function that
traverses the abstract syntax tree that comes out of the camlp4
parser. It is therefore quite unlikely that a given otags version
works well for more than one major OCaml version. For this reason
otags version numbers simply follow the OCaml version numbers.
For instance otags version 3.11.1 is the 1. otags release for
OCaml 3.11.xx. In general, an otags version X.YY.Z will only
compile with OCaml X.YY.*
Alvarado and Jean-Francois
Monin wrote the first OCaml tagging program based on camlp4
and released this as otags. Some old otags version can still be
found on their websites.
Around 2005 I released a few versions for OCaml 3.09. All these
old otags versions require the original camlp4 from Daniel de Rauglaudre,
which is now available as camlp5. My
latest release for the old camlp4 was otags 3.09.3.3 for OCaml
3.09.3. The debian maintainers developed some patches to make
this version compile with later OCaml versions and camlp5.
last changed on
10 Jan 2016