[R] help.start in R-1.7.0 with Netscape 7.0.
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Apr 24 18:23:28 CEST 2003
On Mon, 21 Apr 2003, Rolf Turner wrote:
> No avuncular advice has been forthcoming from the list about
> my problem with getting html-help, but I've been fiddling around
> with it myself and have had a certain amount of insight. (???)
>
> The source of the problem seems to be the way that the variable
> isLocal is defined in browseURL():
>
> isLocal <- length(grep("^(localhost|):",
> Sys.getenv("DISPLAY"))) > 0
>
> This seems to make isLocal FALSE in any context in which I work.
>
> For instance, I am currently sitting at an NCD Xwindows terminal,
> logged into host ``erdos''. If I execute
>
> > Sys.getenv("DISPLAY")
>
> I get
> DISPLAY
> "131.202.169.153:0.0"
>
> the string of digits being the IP address of the terminal. Not
> a "^(localhost|):" in sight.
That's deliberate, and necessary to work around loopholes in Netscape's
remote access protocols.
> I thought to rectify this --- in a kludgy and perhaps dangerous
> way --- by creating for myself a local version of browseURL()
> in which isLocal is always TRUE. But a funny thing happened:
>
> I ***still*** got the annoying phenomenon of Netscape's trying
> to open a new browser window (and wanting a new ``profile'')
> every time I asked for help on another function.
Yes, that's intentional, see below.
> To investigate a bit, I created a local version of help() in
> which I could stick some browser() calls to find out the values
> of certain variables. Blow me down, but didn't things now
> work just fine! Took out the browser() calls; things still
> worked. Removed the local help() --- back to not working.
>
> Even more mysterious to me is the fact that if I just put in
> a local help(), by doing
>
> > help <- help
>
> then things don't work. But (ah-ha!) the way I created my local copy
> of help() was to make a local ascii file of the code of help() (with
> a ``help <- '' added at the beginning) and then source this file.
> When this procedure is followed, things ***do*** work!
>
> This applies even though
>
> > all.equal(help,get("help",pos=grep("base",search()))
>
> yields TRUE, so that nothing has actually changed in my local copy.
>
> So help() doesn't find the local copy of browseURL() unless there is
> also a local copy of help() --- and that local copy needs to have
> been created by sourcing a text file!!! This doesn't make any sense
> to me. It verges on the mystical. What on earth is going on?
Namespaces.
> More to the point is there any way that I can persuade help()
> that ``isLocal'' should be taken to be TRUE?
>
> I don't follow the rationale of ``isLocal'' anyhow. If I'm sitting
> at machine melvin, but am typing away into a window that is connected
> to host clyde, and I start R in that window, then help.start() will
> invoke the Netscape that lives on clyde. (Steps must of course have
> been taken to permit clyde to open a Netscape window on melvin's
> display, but that's all done in the normal course of events.) Hence
> the Netscape that gets fired up will look for the *.html help files
> on clyde and everything will work just as if I were sitting at
> clyde's console. So why would ``isLocal'' ***ever*** need to be
> FALSE?
That's not how it works. You would be using *any* netscape window on
melvin, not just one started from clyde.
You are shouting at the wrong audience here: the problem is the Netscape
protocol and how it is implemented (or not) in various versions of
Netscape. Under Linux/Unix it does not even start a window if not exists
in 7.0, but did before, yet it does not allow multiple windows which it
did before. That `verges on the mystical' indeed.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list