Package: otags Version: 3.09.0-1+zack Severity: wishlist Tags: patch Please add tagging of the ocaml standard library in both vim and emacs formats. The corresponding tags file could be shipped in /var/lib/otags/{vi,emacs} and users willing to use them could point their favorite editors to them.
Attached you can find a patch that: - provide a /usr/sbin/update-otags script which tags `ocamlc -where` in both format and store the results as /var/lib/otags/{vi,emacs}/TAGS - adds a cron.daily entry which invokes update-otags - invokes update-otags in otags postinst script Still TODO (imo): - parsing the whole `ocamlc -where` lead to errors for .mli/.ml that uses camlp4 syntax extensions. They are not a problem since otags after printing parse errors on stderr proceed in its work ignoring the files (for this reason the cron entry redirect stderr to /dev/null). However it should be possible to parse that files correctly using otags' -pa flag, I've not investigated it in detail though. Still, in order to implement this there should be a way to distinguish syntax extension installed in `ocamlc -where` to add all of them to otags cmdline. Such a distinction is not provided in the current ocaml packaging still for debian. Cheers. -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.14-2-686 Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Versions of packages otags depends on: ii libc6 2.3.5-8.1 GNU C Library: Shared libraries an ii ocaml-nox [ocaml-nox-3.09. 3.09.0-2+zack ML language implementation with a otags recommends no packages. -- no debconf information
diff -Nuar otags-3.09.0.old/debian/changelog otags-3.09.0/debian/changelog --- otags-3.09.0.old/debian/changelog 2005-12-04 11:22:49.000000000 +0100 +++ otags-3.09.0/debian/changelog 2005-12-04 11:46:25.000000000 +0100 @@ -1,3 +1,9 @@ +otags (3.09.0-1+zack) UNRELEASED; urgency=low + + * added otagging of `ocamlc -where` + + -- Stefano Zacchiroli <[EMAIL PROTECTED]> Sun, 4 Dec 2005 11:46:07 +0100 + otags (3.09.0-1) unstable; urgency=low * New upstream release diff -Nuar otags-3.09.0.old/debian/dirs otags-3.09.0/debian/dirs --- otags-3.09.0.old/debian/dirs 2005-12-04 11:22:49.000000000 +0100 +++ otags-3.09.0/debian/dirs 2005-12-04 11:31:06.000000000 +0100 @@ -1,2 +1,4 @@ usr/bin usr/lib/ocaml/3.09.0/otags +var/lib/otags/emacs +var/lib/otags/vi diff -Nuar otags-3.09.0.old/debian/otags.cron.daily otags-3.09.0/debian/otags.cron.daily --- otags-3.09.0.old/debian/otags.cron.daily 1970-01-01 01:00:00.000000000 +0100 +++ otags-3.09.0/debian/otags.cron.daily 2005-12-04 11:40:54.000000000 +0100 @@ -0,0 +1,4 @@ +#!/bin/sh + +test -x /usr/sbin/update-otags || exit 0 +/usr/sbin/update-otags diff -Nuar otags-3.09.0.old/debian/otags.install otags-3.09.0/debian/otags.install --- otags-3.09.0.old/debian/otags.install 1970-01-01 01:00:00.000000000 +0100 +++ otags-3.09.0/debian/otags.install 2005-12-04 11:44:23.000000000 +0100 @@ -0,0 +1 @@ +debian/update-otags usr/sbin/ diff -Nuar otags-3.09.0.old/debian/postinst otags-3.09.0/debian/postinst --- otags-3.09.0.old/debian/postinst 1970-01-01 01:00:00.000000000 +0100 +++ otags-3.09.0/debian/postinst 2005-12-04 11:34:15.000000000 +0100 @@ -0,0 +1,9 @@ +#!/bin/sh -e + +case "$1" in + configure) + /usr/sbin/update-otags 2> /dev/null + ;; +esac + +#DEBHELPER# diff -Nuar otags-3.09.0.old/debian/rules otags-3.09.0/debian/rules --- otags-3.09.0.old/debian/rules 2005-12-04 11:22:49.000000000 +0100 +++ otags-3.09.0/debian/rules 2005-12-04 11:42:58.000000000 +0100 @@ -55,6 +55,8 @@ dh_installdocs dh_installexamples dh_installman debian/otags.1 + dh_install + dh_installcron dh_link dh_strip dh_compress diff -Nuar otags-3.09.0.old/debian/update-otags otags-3.09.0/debian/update-otags --- otags-3.09.0.old/debian/update-otags 1970-01-01 01:00:00.000000000 +0100 +++ otags-3.09.0/debian/update-otags 2005-12-04 11:39:04.000000000 +0100 @@ -0,0 +1,7 @@ +#!/bin/sh +OTAGS="/usr/bin/otags" +test -x "$OTAGS" || exit 0 +OCAMLDIR=`ocamlc -where 2> /dev/null` +test -d "$OCAMLDIR" || exit 0 +$OTAGS -r -vi -o /var/lib/otags/vi/TAGS $OCAMLDIR +$OTAGS -r -emacs -o /var/lib/otags/emacs/TAGS $OCAMLDIR