[ESS-bugs] help() failing under R-devel [FWD Douglas Bates]

Martin Maechler maechler at stat.math.ethz.ch
Mon Oct 26 09:26:15 CET 2009


"We" may have overlooked this
reply from Doug Bates to ESS-help,
mentioning a new, pretty important problem:


------- start of forwarded message -------
From: Douglas Bates <bates at stat.wisc.edu>
Sender: ess-help-bounces at stat.math.ethz.ch
To: ess-help at stat.math.ethz.ch
Subject: [ESS]  no S4 help under Windows XP
Date: Wed, 21 Oct 2009 08:47:25 -0500

I forgot to cc: the list on this reply.


---------- Forwarded message ----------
From: Douglas Bates <bates at stat.wisc.edu>
Date: Wed, Oct 21, 2009 at 8:46 AM
Subject: Re: [ESS] no S4 help under Windows XP
To: Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>


On Tue, Oct 20, 2009 at 4:32 PM, Stephen Eglen
<S.J.Eglen at damtp.cam.ac.uk> wrote:
>> I installed Goulet's package awhile ago, and am running ESS 5.3.10,
>> emacs 22.3.1 and R 2.8.1.  I started an R session with M-X R.  I don't
>> think I've made any customizations to R/ESS.
>>
>> ?setClass
>> or
>> ?Classes
>> gets me an empty buffer *help[R](setClass)*.
>>
>> Could anyone suggest a solution or diagnosis?  (Well, other than my
>> short-term fix of working in Linux--the data I'll need is on Windows and
>> needs to stay there).
>
> hi Ross, can I just confirm -- you find that
>
> ?setClass
>
> works on linux
>
> but not on windows?
>
> Does life get any easier if you add:
>
> (setq inferior-ess-r-help-command "help(\"%s\", htmlhelp=TRUE)\n")
>
> to your .emacs which should then start help windows in a web browser?

Not to hijack the thread but the default inferior-ess-r-help-command
fails under R-devel (2.11.0 development version) where the arguments
to 'help' are

> args("help")
function (topic, package = NULL, lib.loc = NULL, verbose = getOption("verbose"),
	  try.all.packages = getOption("help.try.all.packages"), help_type =
getOption("help_type"))
NULL

It gets a bit tricky to decide what expression you should use for a
...r-help-command when

help("help")

fails.

______________________________________________
ESS-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
------- end of forwarded message -------


So, Doug, and from ESS-core at least Kurt and me, as
R-developers, often working with 'R-devel' do need a different 
setting than the default

(defcustom inferior-ess-r-help-command "help(\"%s\", htmlhelp=FALSE)\n"
  "Format-string for building the R command to ask for help on an object.

This format string should use %s to substitute an object name.
If set, changes will take effect when next R session is started."
  :group 'ess-command
  :type 'string)

--- in lisp/ess-cust.el ---

namely something like

       "help(\"%s\", help_type="text")\n"
 

which works from R 2.10.0  (which is released *today* !)
and is compulsory from R 2.11.x on which is the current
"R-devel" version.

Consequently, the new default must depend on the R version,....

*OR* we use our own little R code, and set the help command to

       "helpESS(\"%s\", help_type="text")\n"

and under the hood, i.e., after startup of R, when we know the R
version, define  helpESS() depending on the R version.

Still a bit kludgy, but maybe the cleanest solution ??

Martin



More information about the ESS-bugs mailing list