[ESS] help("foo") opens web browser but ?foo doesn't

Marc Schwartz marc_schwartz at me.com
Wed Mar 13 14:30:25 CET 2013


On Mar 13, 2013, at 7:57 AM, Henrik Singmann <henrik.singmann at psychologie.uni-freiburg.de> wrote:

> 
> Am 13.03.2013 13:13, schrieb Marc Schwartz:
>> Different incantation in .emacs:
>> 
>> (setq inferior-ess-r-help-command "help(\"%s\", help_type=\"html\")\n")
>> 
>> which works in both cases.
> 
> Thanks, but unfortunately produces the exact same behavior on my machine: opens browser for help("foo") but Emacs buffer for ?foo.
> 
> I realized it has to do with the options. When starting the R terminal from within emacs I get:
> 
>> > options(chmhelp=FALSE, help_type="text")
>> options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient.exe', show.error.locations=TRUE)
> 
> When running
> 
>> options(help_type="html")
> 
> I get the desired behavior afterwards.
> 
> However, I am unable to change my R startup options for the desired behavior. My Rprofile.site does contain the correct options. If adding a .Rprofile to my home directory (where my .emacs is located) with this line it doesn't help either. Googling was also no help.
> 
> So my question is: How do I customize my ESS startup options. Is there a variable for that?
> 
> Thanks,
> 
> Henrik


Not being on Windows, there may be some subtleties here, especially with Win7. However, a search of the R e-mail list archives comes up with the following thread:

  http://tolstoy.newcastle.edu.au/R/e17/help/12/05/12352.html

which may be helpful in some fashion. There does appear to be some interaction with the relevant help setting in .Rprofile and the setting in .emacs relative to the behavior you are observing.

Creating a .Rprofile in your local user folder should work, as opposed to creating/editing a .Rprofile.site file, which would be for multiple users, unless that is your situation.

If you use a local user specific .Rprofile, be sure to fully exit from Emacs/ESS/R and then restart, lest the file not be re-loaded upon ESS/R's startup.

Regards,

Marc



More information about the ESS-help mailing list