[Rd] two help problems in R-2.0.0 for Windows (PR#7269)

ligges at statistik.uni-dortmund.de ligges at statistik.uni-dortmund.de
Fri Oct 8 19:50:06 CEST 2004


Prof Brian Ripley wrote:

> On Thu, 7 Oct 2004 ligges at statistik.uni-dortmund.de wrote:
> 
> 
>>Well, for htmlhelp, there is another error. The browser (e.g. Mozilla 
>>1.7.3) tries to open "T:\R\library\stats\html/Normal.html" and has 
>>problems with different kinds of slashes (/ vs. \).
> 
> 
> I can't reproduce that.  I get forward slashes only. Can you track down 
> where the \ are coming from?


Brian,

you are right, in the object "file", there are only forward slashes.
Looks like Mozilla (1.7.3) cannot interpret 
"T:/R/library/stats/html/Normal.html" and it changes the string in its 
navigation bar to: "T:\R\library\stats\html/Normal.html"

Specifying "file:///T:/R/library/stats/html/Normal.html" works, but the 
"file:///" part seems to be required if using forward slashes.

Note that the fix to use
chartr("/", "\\", file)
is also used in help.start(). I guess there was a reason to include it.


>>  options(chmhelp=FALSE, htmlhelp=TRUE)
>>  ?dnorm  # does not work!
>>
>>
>>This can be fixed by changing line 4 in
>>.../src/library/utils/R/windows/help.R
>>as follows:
>>
>>-    browseURL(file)
>>+    browseURL(chartr("/", "\\", file))
>>
>>
>>
>>
>>AArrrrrgh, I've never used non-text help pages in the developer releases 
>>... and obviously nobody else ...
> 
> 
> Well, I have and Firefox works properly, for example.  I've not used
> Mozilla recently as Firefox seems rather better.  I also checked, and IE6
> works too.  Do you have a browser set (options(browser=)), or are you
> relying on file associations?

The latter.

> Since this is to be a file:// URL, I believe forward slashes are correct, 
> but we are at the mercy of Windows browser providers.

See above. The line
     browseURL(paste("file://", file, sep="/"))
works for me.

Uwe


> Brian
>



More information about the R-devel mailing list