Bug#168259: r-base-core: help.start() assumes netscape is installed (PR#2275)

edd@debian.org edd@debian.org
Fri, 8 Nov 2002 16:02:13 +0100 (MET)



> Package: r-base-core
> Version: 1.5.1-0woody1
> Severity: minor
> 
> I don't have Netscape on my system. Trying to follow the sample

To best of my knowledge, this R feature dates from a time when 
Netscape was essentially the only browser out there. It also had 
a most useful feature: you could attach new request (resulting in
a new "frame" in X11 / window manager parlance) to a running Netscape 
making startup for this request /much/ faster than starting a new 
Netscape executable.

This feature lacks in other browsers which is why no one was able
to write a wrapper script around netscape, mozilla, galeon, konqueror,...
and pick whichever is found.

> session in the R Intro fails with a less than helpful error message:

Then this should be fixed in the R Intro -- maybe a line could be added
suggesting that the   browser="foo"   options may be needed to switch
away from netscape?

> Type `demo()' for some demos, `help()' for on-line help, or
> `help.start()' for a HTML browser interface to help.
> Type `q()' to quit R.
> 
> > help.start()
> Making links in ~/.R ...
> If netscape is already running, it is *not* restarted, and you must
>     switch to its window.
> Otherwise, be patient ...
> > sh: netscape: command not found
> 
> 
> Could some heuristic be put in place to use whatever is installed
> rather than blindly hope Netscape will be there? I thought I even saw

This has been discussed on the R lists, but as I recall, no consensus
was reached for the reasons outlined above.

> something about an /etc/alternatives mechanism for selecting a web
> browser but this does not seem to exist (yet?)

Now you're switching from a generic R problem to a Debian specific
solution -- but yes I may be able to do that. However, what we would
really need is a wrapper like, say, sensible-browser akin to the 
existing sensible-paper and sensible-editor.  Now, as I said above,
this will likely be difficult or impossible to do well, so nobody
did it.

Also, /etc/alternatives is designed to switch between variants of the
same program: emacs as a choice between emacs20 and emacs21, netscape
as one between static motif and other linkage variants, ... whereas
sensible-$FOO is a wrapper around different programs doing $FOO.

> Failing that, perhaps the program could check for the existence of
> Netscape before attempting to launch it, and display a suitable error
> message if it is not installed (hopefully with instructions for how to
> override).

Yes, but that is tough to do portably on Unix, Max, Win, ... where R
runs.

> I was lucky enough to fairly quickly find an example of how to work
> around this in Google; for the record, help.start(browser='mozilla')
> worked for me, and apparently R will now remember to use Mozilla in
> the future on my account.

Only for the running session. Set 
  options(browser="mozilla")
in ~/.Rprofile to make it truly permanent.

> Sorry if this is already fixed in testing/unstable.

No, I'd call it one of the "unfixable" ones.

Regards,  Dirk



>
> /* era */
> 
> -- 
> Join the civilized world -- ban spam like we did! <http://www.euro.cauce.org/>
>    tee -a $HOME/.signature <$HOME/.plan >http://www.iki.fi/era/index.html
> 
> 
> 
> 

-- 
According to the latest figures, 43% of all signatures are totally worthless.   

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._