for backwards compatibility with older editors;-) we now provide etags format as well (I don't like the added complexity, but I suspect that many of you use emacs/xemacs..).
:tags -c -- create ctags format "tags" file for currently loaded modules
:tags -e -- create etags format "TAGS" file for currently loaded modules
(combines nicely with ghci's import chasing)
[cvs diff attached; tested briefly with Vim 6.3, Emacs 21.2.1, and
XEmacs 21.4, on WinXP]
could this please be added to HEAD (and probably to STABLE before
the next release)? i have the feeling that the bulk of the code should
move elsewhere, to be available both for ghci and for a ghc commandline
option - you'll know best. there'll be other ways to improve this as
well, but it looks like a useful start, and it is nice to have proper tags
back at last. fixes/improvements can follow.
enjoy,
claus
----- Original Message -----
From: "Claus Reinke" <[EMAIL PROTECTED]>
To: "Simon Marlow" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, June 06, 2005 2:22 AM
Subject: :tags for ghci
>
> while trying to get into the GHC.hs-business, I wrote a little
> addition to ghci/InteractiveUI.hs. as this is my first attempt in this
> area, please take it with a grain of salt, but the idea is to make use
> of available information and add a new command:
>
> :tags -- creates a "tags" file for the currently loaded modules
>
> supports Vim tags files only, sorry (on the small examples I tried,
> it is a definite improvement over hasktags, so it would be worth
> adding this anyway). cvs diff attached.
>
> I had a look into supporting Emacs as well, but the TAGS files
> format is somewhat underdocumented as "the format between
> etags and emacs..". From looking at code and example files, it
> seems that Emacsens not only group tags by file (and possibly
> store the line prefix instead of just the tag?), but insist on
> counting lines and character positions for each tag, *both*
> counted from the beginning of the file - can that be right?
>
> If yes, neither ghci nor any other sensible non-emacs tool will
> ever have enough information stored to produce TAGS files, so
> one would have to make an extra pass over each source file to
> extract the character positions for the tags lines..
>
> suggestions? comments?
>
> cheers,
> claus
>
> ps. is there any specification for TAGS files apart from etags.el?
>
>
--------------------------------------------------------------------------------
> _______________________________________________
> Cvs-ghc mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/cvs-ghc
>
InteractiveUI.hs.diff
Description: Binary data
_______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
