[R-SIG-Mac] Blank help window

Ben Tupper btupper @ending from bigelow@org
Fri Oct 19 00:31:34 CEST 2018


Oops.  I did not try it but now have.

ben using gale ~ $ defaults write org.R-project.R use.external.help YES

Using a fresh session of R.app 

?plot 

open the external browser with... 

"Hmm. We’re having trouble finding that site.

We can’t connect to the server at localhost.
If that address is correct, here are three other things you can try:

    Try again later.
    Check your network connection.
    If you are connected but behind a firewall, check that Firefox has permission to access the Web."


Switching back ...

ben using gale ~ $ defaults delete org.R-project.R use.external.help

and starting a fresh R.app open the blank help window/


> On Oct 18, 2018, at 6:26 PM, Marc Schwartz <marc_schwartz using me.com> wrote:
> 
> Ugggh....
> 
> I was fully expecting it to fail, given my presumptive new found wisdom...
> 
> Had it failed, then it would support the notion that R,app was irrelevant to the underlying issue with help and there was something going on with the server itself.
> 
> However, this now suggests (back to my original view), that there is something different in the manner in which R.app displays HTML help content in the built-in  browser window.
> 
> Did you try to set the help browser in R.app to use an external viewer using the command line invocation that I sent earlier?
> 
> That is, with R.app not running, in a terminal type:
> 
>   defaults write org.R-project.R use.external.help YES
> 
> Then run R.app and see what happens with ?plot.
> 
> To return R.app to use the default internal browser, close R.app and then in a terminal, type:
> 
>   defaults delete org.R-project.R use.external.help 
> 
> 
> 
> 
>> On Oct 18, 2018, at 6:13 PM, Ben Tupper <btupper using bigelow.org <mailto:btupper using bigelow.org>> wrote:
>> 
>> Hi,
>> 
>> ben using gale ~ $ R
>> 
>> R version 3.5.1 (2018-07-02) -- "Feather Spray"
>> <snip>
>> 
>> > options(help_type = "html")
>> > ?plot
>> starting httpd help server ... done
>> 
>> 
>> That brings up visible help in the default browser (Safari or Firefox depending upon which is set to be the default browser).
>> 
>> 
>>> On Oct 18, 2018, at 6:04 PM, Marc Schwartz <marc_schwartz using me.com <mailto:marc_schwartz using me.com>> wrote:
>>> 
>>> Hi Ben,
>>> 
>>> Ok, thanks for that clarification. That fundamentally alters my view of the issue.
>>> 
>>> For verification, can you start R in a terminal and then type:
>>> 
>>>  options(help_type = "html")
>>> 
>>> after which, then try help for some function (e.g. ?plot) and see what happens.
>>> 
>>> Thanks,
>>> 
>>> Marc
>>> 
>>> 
>>>> On Oct 18, 2018, at 5:45 PM, Ben Tupper <btupper using bigelow.org <mailto:btupper using bigelow.org>> wrote:
>>>> 
>>>> You are correct that it only comes up in the text pager when I invoke R from the terminal (with or without --vanilla).
>>>> 
>>>> RStudio help works as expected in the sense that help content is rendered within the RStudio panes on the "Help" tab - just as you surmised.
>>>> 
>>>> Cheers (really!),
>>>> Ben
>>>> 
>>>>> On Oct 18, 2018, at 5:32 PM, Marc Schwartz <marc_schwartz using me.com <mailto:marc_schwartz using me.com>> wrote:
>>>>> 
>>>>> Hi Ben,
>>>>> 
>>>>> A question, because as I go back and re-read both this thread and the prior one you posted on this issue, I have been presuming that when you run R from the terminal, you can successfully get help to open in an external browser.
>>>>> 
>>>>> However, given my re-read and what you now post below, I am wondering if, in fact, when running R in the terminal, you simply get the help displaying in the text pager.
>>>>> 
>>>>> I don't use RStudio, so not sure if help comes up in their own internal browser, or if it comes up in an external browser. Albeit, looking at their website, it appears to be an internal browser that stays within the IDE, in contrast to R.app opening the internal browser in an external window.
>>>>> 
>>>>> Can you confirm that when you run R from the terminal, does help appear within the terminal window in the pager, or does it come up in whatever external browser you are using, which I am guessing is Firefox based upon the output below.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Marc
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Oct 18, 2018, at 5:09 PM, Ben Tupper <btupper using bigelow.org <mailto:btupper using bigelow.org>> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> In a fresh R.app session
>>>>>> 
>>>>>>> debug(get("aqua.browser", envir = as.environment("tools:RGUI")))
>>>>>>> help('help')
>>>>>> starting httpd help server ... done
>>>>>> debugging in: browser(if (encodeIfNeeded) URLencode(url) else url)
>>>>>> debug: {
>>>>>>  x <- gsub("http://127.0.0.1 <http://127.0.0.1/>", "http://localhost <http://localhost/>", x, fixed = TRUE)
>>>>>>  .Call("aqua.custom.print", "help-files", x)
>>>>>>  invisible(x)
>>>>>> }
>>>>>> Browse[2]> n
>>>>>> debug: x <- gsub("http://127.0.0.1 <http://127.0.0.1/>", "http://localhost <http://localhost/>", x, fixed = TRUE)
>>>>>> Browse[2]> n
>>>>>> debug: .Call("aqua.custom.print", "help-files", x)
>>>>>> Browse[2]> browseURL(x)
>>>>>> 
>>>>>> 
>>>>>> opens the external browser http://localhost:28450/library/utils/html/help.html<http://localhost:28450/library/utils/html/help.html> <http://localhost:28450/library/utils/html/help.html%3Chttp://localhost:28450/library/utils/html/help.html%3E>
>>>>>> 
>>>>>> but the browser says...
>>>>>> 
>>>>>> "Hmm. We’re having trouble finding that site.
>>>>>> We can’t connect to the server at localhost.
>>>>>> If that address is correct, here are three other things you can try:
>>>>>> 
>>>>>>  Try again later.
>>>>>>  Check your network connection.
>>>>>>  If you are connected but behind a firewall, check that Firefox has permission to access the Web."
>>>>>> 
>>>>>> 
>>>>>> And...
>>>>>> 
>>>>>> Browse[2]> c
>>>>>> exiting from: browser(if (encodeIfNeeded) URLencode(url) else url)
>>>>>> 
>>>>>> ... opens the blank help window.
>>>>>> 
>>>>>> 
>>>>>> Finally, following up on Marc's suggestion that I invoke R without --vanilla...
>>>>>> 
>>>>>> ben using gale ~ $ diff R-app-options R-options 
>>>>>> 81c81
>>>>>> < <bytecode: 0x7fd0b1fcbbc0>
>>>>>> ---
>>>>>>> <bytecode: 0x7fb46a177890>
>>>>>> 108,110d107
>>>>>> < $help_type
>>>>>> < [1] "html"
>>>>>> < 
>>>>>> 184,185c181,182
>>>>>> <                             CRAN 
>>>>>> < "http://cran.utstat.utoronto.ca <http://cran.utstat.utoronto.ca/>" 
>>>>>> ---
>>>>>>>  CRAN 
>>>>>>> "@CRAN@" 
>>>>>> 247c244
>>>>>> < [1] 168
>>>>>> ---
>>>>>>> [1] 80
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Oct 18, 2018, at 4:49 PM, Duncan Murdoch <murdoch.duncan using gmail.com <mailto:murdoch.duncan using gmail.com>> wrote:
>>>>>>> 
>>>>>>> On 18/10/2018 8:50 AM, Ben Tupper wrote:
>>>>>>>> I also have no firewall running on the platform.  I do have anti-virus/malware and have turned it off.  The help window still renders with a blank page and there is no text captured with a copy-paste.
>>>>>>>> I tried debug() as Duncan suggested and get the following in a fresh R.app session...
>>>>>>> 
>>>>>>> Okay, that wasn't as informative as I had hoped.  Could you try the following:
>>>>>>> 
>>>>>>> debug(get("aqua.browser", envir = as.environment("tools:RGUI")))
>>>>>>> 
>>>>>>> then ask for help on something.  You should stop in the debugger seeing something like
>>>>>>> 
>>>>>>> debugging in: browser(if (encodeIfNeeded) URLencode(url) else url)
>>>>>>> debug: {
>>>>>>> x <- gsub("http://127.0.0.1 <http://127.0.0.1/> <http://127.0.0.1/ <http://127.0.0.1/>>", "http://localhost <http://localhost/> <http://localhost/ <http://localhost/>>", x, fixed = TRUE)
>>>>>>> .Call("aqua.custom.print", "help-files", x)
>>>>>>> invisible(x)
>>>>>>> }
>>>>>>> 
>>>>>>> At the prompt, type "n" (without the quotes, followed by return) twice, until you are at the .Call line.  Then type
>>>>>>> 
>>>>>>> browseURL(x)
>>>>>>> 
>>>>>>> This should open your external browser.  It will either show a blank page, or the help page:  that will indicate whether the problem is in the internal browser or in the server.
>>>>>>> 
>>>>>>> Then go back to R.app, and type "c".  This should open the same help page in the internal browser.  It might show a blank page, or the regular help page:  either one would tell us something.
>>>>>>> 
>>>>>>> Duncan Murdoch
>>>>>>> 
>>>>> 
>>>>> <snip>
>>>> 
>>>> Ben Tupper
>>>> Bigelow Laboratory for Ocean Sciences
>>>> 60 Bigelow Drive, P.O. Box 380
>>>> East Boothbay, Maine 04544
>>>> http://www.bigelow.org <http://www.bigelow.org/>
>>>> 
>>>> Ecological Forecasting: https://eco.bigelow.org/ <https://eco.bigelow.org/>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> Ben Tupper
>> Bigelow Laboratory for Ocean Sciences
>> 60 Bigelow Drive, P.O. Box 380
>> East Boothbay, Maine 04544
>> http://www.bigelow.org <http://www.bigelow.org/>
>> 
>> Ecological Forecasting: https://eco.bigelow.org/ <https://eco.bigelow.org/>
>> 
>> 
>> 
>> 
> 

Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/






	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list