On Tue, Nov 9, 2010 at 7:45 AM, Lex Trotman elextr@gmail.com wrote:
Step 1, if you open an R file do you get symbols in the sidebar?
Yes it does. Here on 0.20 (svn >= r5271).
Step one tick :-)
This tests that Geany's R tag parser is in fact working. But I'm not sure how much information it gathers, it looks pretty simple.
Step 2. to get tags for files that you don't want to have open all the time (eg libraries) you use geany -g tagfile rfile
Did this step work?
No. I tested the functionality using a single R file (attached), and it errors out. sh>geany -g "/usr/local/build/R.tags" "/usr/local/build/latticist/R/latticist.R" (5603) Failed to create tags file, perhaps because no tags were found.
sh>geany -g "/usr/local/build/R.tags" ... atticist/R/latticist.R" (5603) returned '1'
Opening the file in Geany will correctly identify two tags (Functions, in Symbols).
However, even if geany -g worked on .R files, the approach would be difficult to apply in practice. It requires the user to specify .R files, and given the structure of R packages this could be a quickly become tedious. It would have been much easier if Geany accepted a path in which it could recursively scan (and parse) R files. The rtags() function can do that, so it might make sense to find a conversion route for etags files.
No, thats why I said you need to convert it yourself, sorry. My googles of emacs tags format in the past have been somewhat unproductive, but maybe you can read the source. Geany also doesn't document tagmanager format (the more complex of its two formats) either.
Unfortunately I haven't yet managed to get any output from rtags() [2], pending a cry for help on r-help, so I couldn't post an example (@Jon, did you have any luck with that?). But here's [1] what I found as close as possible to a spec. Could you please take a look and let us know whether there's some resemblance with the Geany format, for a potential conversion route?
Thank you Liviu
[1] http://en.wikipedia.org/wiki/Ctags#Etags_2 [2] http://developer.r-project.org/rtags.html