Jade's weblog Archive

Using TAGS files with emacs and OpenACS

[11:16] <bartt> You use a TAGS file for that.
[11:16] <bartt> Are you familiar w/ M-. ?
[11:16] > No, not really.
[11:17] <bartt> OK, let me publish some scripts I use to create TAGS files for OpenACS.
[11:17]         jadeforrest cheers :)
[11:17] <bartt> TAGS files are one of the best things about Emacs and VIM
[11:17] <SchemaThings> tks bartt!
[11:17] <SchemaThings> totally
[11:18] <SchemaThings> the toolmaster 9000
[11:18]         bartt setting up a ~/bin GNU Arch achive
[11:19] > I can't believe I was living without oacs.el before :)
[11:44] <bartt> OK, for those with tla, you can get otags & otags-site using:
[11:45] <bartt> tla get -A bart-arch@thecodemill.biz--2004 bin--main--0 bin
[11:45] <bartt> Do this in your ~ and then add ~/bin to your PATH.
[11:45]         bartt making a tar file of this archive.
[11:47] <bartt> You can download the tar file from: http://www.thecodemill.biz/repository/otags.tgz
[11:47] <bartt> Extract in ~ (creates ./bin)
[11:48] <bartt> Then run otags-site <path to your OpenACS server root>
[11:48] <bartt> E.g. otags-site /web/openacs-4
[11:48] <bartt> This will create 2 files in each package directory: TAGS and TAGS-TCL
[11:49] <bartt> Plus a master set of TAGS and TAGS-TCL files in server root.
[11:49] hazmat [~hazmat@pool-68-162-33-2.nwrk.east.verizon.net] has joined #openacs
[11:51] <bartt> TAGS contains tags of all TCL procedure definitions, XQL query definitions and all SQL package bodies.
[11:52] <bartt> TAGS-TCL contains tags of all TCL procedure definitions and XQL query definitions but not the SQL package bodies.
[11:52] <bartt> otags-site calls otags
[11:52] <bartt> otags is configured to index Oracle XQL files.
[11:53] <bartt> Change the regexp in otags to index PostgreSQL XQL files instead.
[11:53] <bartt> Re-running otags-site will update the TAGS and TAGS-TCL files.
[11:53] <bartt> To use these files press M-. in Emacs
[11:54] <bartt> Upon first use Emacs will ask for a TAGS file.
[11:54] <bartt> If you want to search the entire site you point it to the master TAGS file. E.g. /web/openacs-4/TAGS
[11:55] <bartt> If you want to limit your search to a single package point it to the package TAGS file. E.g. /web/openacs-4/packages/acs-tcl/TAGS
[11:55] <bartt> If you want to limit your search to on the TCL and XQL files of a single package point it to the package TAGS-TCL file. E.g. /web/openacs-4/packages/acs-tcl/TAGS-TCL
[11:55] <bartt> Let me know if you have any questions.
[11:57] <bartt> You can switch TAGS files in an Emacs session w/ M-x tags-reset-tags-table
[11:57] > Is this documented anywhere, or should I copy and paste from this session so I don't forget?
[11:57] <bartt> I haven't documented this. Most of it is documented in Emacs though.
[11:58]         bartt Reminds himself to write another article
[11:59] <bartt> C-h i
[11:59] <bartt> m emacs
[11:59] <bartt> m tags
[11:59] <bartt> Will get you to the tags documentation in Emacs
[11:59] <SchemaThings> tags is a standard feature of either editor if you can tag the body of stuff you're working with
[12:00] <SchemaThings> so the bartt tag generator is the custom code / technique here
[12:00] <dirkgomez> lars uses them in a very interesting way
[12:00] <SchemaThings> how so?
[12:01] <bartt> Also very useful: M-x tag-search and M-x tags-query-replace
[12:01] <bartt> Followed by M-,

01:52 PM, 11 May 2004 by Jade Rubick Permalink | Comments (0)

XML