If you need rtags() in R to give you an output, I use:<div><br></div><div>rtags(path = "/path/to/R/library/base", recursive = T, ofile =  "/home/whatever.tags")</div><div><br></div><div><br></div><div><br>
<div class="gmail_quote">On Thu, Nov 11, 2010 at 4:45 PM, Lex Trotman <span dir="ltr"><<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12 November 2010 02:32, Nick Treleaven <<a href="mailto:nick.treleaven@btinternet.com">nick.treleaven@btinternet.com</a>> wrote:<br>
> On Thu, 11 Nov 2010 09:11:30 +1100<br>
> Lex Trotman <<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>> wrote:<br>
><br>
>> > However, even if geany -g worked on .R files, the approach would be<br>
>> > difficult to apply in practice. It requires the user to specify .R<br>
>> > files, and given the structure of R packages this could be a quickly<br>
>> > become tedious. It would have been much easier if Geany accepted a<br>
>> > path in which it could recursively scan (and parse) R files. The<br>
>> > rtags() function can do that, so it might make sense to find a<br>
>> > conversion route for etags files.<br>
>> ><br>
>><br>
>> Whats the structure of R packages?<br>
>><br>
>> Presuming from the above that it is lot of files in nested directories<br>
>> you could use find to run geany -g on them all.  Whilst that gives you<br>
>> lots of tag files to open, I don't expect it to be too much slower<br>
>> than one huge file.<br>
>><br>
>> Otherwise patches are welcome.<br>
><br>
> I'm not sure that reimplementing Unix find is something Geany should be<br>
> doing really. But documenting how to do that in the manual would<br>
> be a good idea.<br>
><br>
> Supporting CTags format is something on the TODO list.<br>
><br>
> You can 'see' the format in tagmanager/tm_tag.c in the tm_tag_write()<br>
> function. That is just called repeatedly for each tag entry in the file.<br>
<br>
</div>Bah missed it :-)<br>
<br>
The R source reveals<br>
<br>
write.etags <-<br>
    function(src,<br>
             tokens, startlines, lines, nchars,<br>
             ...,<br>
             shorten.lines = c("token", "simple", "none"))<br>
{<br>
    ## extra 1 for newline<br>
    shorten.lines <- match.arg(shorten.lines)<br>
    offsets <- (cumsum(nchars + 1L) - (nchars + 1L))[startlines]<br>
    lines <-<br>
        switch(shorten.lines,<br>
               none = lines,<br>
               simple = sapply(strsplit(lines, "function", fixed =<br>
TRUE), "[", 1),<br>
               token = mapply(shorten.to.string, lines, tokens))<br>
    tag.lines <-<br>
        paste(sprintf("%s\x7f%s\x01%d,%d",<br>
                      lines, tokens, startlines,<br>
                      as.integer(offsets)),<br>
              collapse = "\n")<br>
    ## simpler format: tag.lines <- paste(sprintf("%s\x7f%d,%d",<br>
lines, startlines, as.integer(offsets)), collapse = "\n")<br>
    tagsize <- nchar(tag.lines, type = "bytes") + 1L<br>
    cat("\x0c\n", src, ",", tagsize, "\n", tag.lines, "\n", sep = "", ...)<br>
}<br>
<br>
So someone who reads C and R can write a converter :-)<br>
<br>
Cheers<br>
<font color="#888888">Lex<br>
</font><div><div></div><div class="h5"><br>
><br>
> Nick<br>
> _______________________________________________<br>
> Geany-devel mailing list<br>
> <a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
><br>
_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</div></div></blockquote></div><br></div>