[ESS] rtags not working?
david.carslaw at kcl.ac.uk
Tue Nov 26 09:20:13 CET 2013
Thanks for this. I sent my message too hastily by the looks of it. I use helm (which I find to be very useful BTW) and on closer inspection I think it is a problem with helm and not ESS. I didn't know about some of these possibilities below, which look to be very useful. At the moment I separately make a TAGS file using rtags and then load in in my .emacs using
Using M . to visit an R function in my package is very convenient - and the narrowing providing by helm did work very nicely with it. I'll report the problem to the maintainer of helm.
From: Vitalie Spinu [mailto:spinuvit at gmail.com]
Sent: 25 November 2013 22:29
To: Martin Maechler
Cc: Carslaw, David; ess-help at r-project.org
Subject: Re: [ESS] rtags not working?
>>> Martin Maechler on Mon, 25 Nov 2013 22:46:02 +0100 wrote:
> On Mon, Nov 25, 2013 at 9:46 PM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>> M-. is an emacs thing (find-tag). I doubt it has anything to do with >> ESS. How do you generate the rtags? With C-c C-e t?
> We are talking about the R function rtags(), and its typical result > from ofile="TAGS", which you then (after "visiting" that tags-table) > can use in emacs with M-. as Vitalie said. C-c C-e t is a new > keybinding that sets up the tags table (and more) for you.
Thanks Martin for clarification. I wasn't very explicit. Let me popularize this feature even further.
There are two ways to build tags from ESS, one with C-c C-e C-t which will look into ess-build-tags-command and, if non-nill, will use that command to ask the sub-process to build the tags. In the case of R, this is rtags.
If ess-build-tags-command is nil, then the ESS imenu regexpressions are used and the etags command is used to build the tags. You can force etags/imenu even when ess-build-tags-command is non-nill with C-u C-c C-e C-t. This is useful if you want to build tags for sources other than R, like C, Cpp, FORTRAN etc, and should work for other dialects as well (julia, sas etc).
You can even use M-x ess-build-tags-for-directory from other non-ESS modes which define imenu regexpressions. I didn't test this part extensively though.
More information about the ESS-help