nx10 / httpgd

Asynchronous http server graphics device for R.
https://nx10.github.io/httpgd
GNU General Public License v2.0
377 stars 19 forks source link

include browser argument in the `hgd_browse` function #61

Closed kguidonimartins closed 3 years ago

kguidonimartins commented 3 years ago

Hey @nx10, thanks for this package. This package is an awesome solution for vim/emacs users dealing with x11 windows in a non-interactive way.

This PR changes the hgd_browse function by including an argument to control in which browser opens the server.

I made some tests changing R_BROWSER environmental variable for different browsers, but the original hgd_browse always uses my system default browser. Now, users can control this action by setting the browser name in the browser argument. Letting this argument empty, hgd_browse uses the browser defined in the R_BROWSER environmental variable. If this environmental variable also is empty, hgd_browse uses the system default browser.

nx10 commented 3 years ago

PR looks good, thank you very much. I agree that the user should be able to change the default behavior of hgd_browse.