[ESS] launch help.start() in EWW browser
Naresh Gurbuxani
n@re@h_gurbux@n| @end|ng |rom hotm@||@com
Wed Sep 10 12:49:46 CEST 2025
Correcting a mistake in the section on Mac terminal emacs. Here in R session, browser option is already set up.
!> options("browser”)
$browser
[1] "/usr/bin/open”
> On Sep 9, 2025, at 12:34 PM, Naresh Gurbuxani <naresh_gurbuxani using hotmail.com> wrote:
>
>
> Sent from my iPhone
>
> Begin forwarded message:
>
>> From: Tyler Smith via ESS-help <ess-help using r-project.org>
>> Date: September 8, 2025 at 10:05:20 PM EDT
>> To: ESS-help <ess-help using r-project.org>
>> Subject: [ESS] launch help.start() in EWW browser
>> Reply-To: Tyler Smith <tyler using plantarum.ca>
>>
>> On Fri, Sep 5, 2025, at 6:17 AM, Naresh Gurbuxani via ESS-help wrote:
>>> When running R in terminal emacs, what options are needed so that
>>> help.start() opens EWW browser?
>>
>> The following elisp code opens the R html docs in EWW, when called via `M-x ess-eww`.
>>
>> It seems to work fine for me on Ubuntu Linux. If it works generally, I'd be happy to clean it up for inclusion in ESS.
>>
>> Alternatively, if we accept running Emacs in daemon mode as a pre-requisite (i.e., meaning emacsclient is available), it's probably not too hard to find the proper syntax for the `browser` argument of `help.start()`. I looked at that too, but then this approach presented itself. It has the advantage of not needing the emacsclient server.
>>
>> Let me know if this looks useful!
>>
>> - tyler
>>
>>
>> ```
>> (defun ess-eww ()
>> (interactive)
>> (let ((BUF (generate-new-buffer "URL"))
>> (PORT))
>> (ess-command "print(tools::startDynamicHelp(NA))" BUF)
>> (with-current-buffer BUF
>> (setq PORT (buffer-substring 5 (point-max))))
>> (kill-buffer BUF)
>> (eww (concat "http://127.0.0.1:" PORT "/doc/html/index.html"))))
>> ```
>>
>> ______________________________________________
>> ESS-help using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list