Skip to content

help.start in R-1.7.0 with Netscape 7.0.

3 messages · Rolf Turner, Brian Ripley, Peter Dalgaard

#
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.

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.

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?

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?

				cheers,

					Rolf Turner
2 days later
#
On Mon, 21 Apr 2003, Rolf Turner wrote:

            
That's deliberate, and necessary to work around loopholes in Netscape's
remote access protocols.
Yes, that's intentional, see below.
Namespaces.
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.
#
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
Right. There seems to a lot of ill thought out design of that variety
going on these days. E.g.: put my laptop on the net, work on it from
the desktop, open a local file with NS/Mozilla. Up till a year or two
ago, that would work fine. Now, it detects that I have a browser open
on the desktop machine and that of course complains that it cannot
find the file on that machine. Same thing if I want to browse the Web
and download something to the laptop - need to close down whatever I
was doing beforehand or the download goes to the wrong machine. Login
at two machines simultaneously and browse from both? Forget it... Even
on the same machine you can get in trouble if you work on two things
at the same time and closing the browser in one workspace also kills
the one in the other workspace. Grrrr....