plot
plot copied to clipboard
is there a way to not launch a new browser process for each new graph?
Using plot (which defaults to chrome, and I can't seem to make firefox work, but that's another problem), every time I create a plot, it launches a new Chrome process. This wouldn't be so horrible if Chrome didn't think it was a brand new install every time it launches, asking me if I want Chrome to be my default browser and if I want to send data to google, neither of which I want. Any way to make the default be opening a new window in, say, firefox? Or, at a minimum, using an existing chrome process?
I want this too, and there is some work in progress to use a webview.h browser and websocket so that a single browser window will handle all plots. There is someone with a working prototype, but I haven't haven't had a lot of time for this lately.
There are reports of firefox working. Try setting the default browser in PLOT:SRC;PLOT;browser. You can also configure options there. FWIW: my Chrome doesn't ask me about defaults, sending data, etc. In order to remove the menus and tabs we need to have a new configuration directory (user-data-directory) for Chrome with each plot in a temp directory. It could be that on your OS this makes Chrome think it's a new install. Try unsetting this in encode-chrome-options.
Clearly R(?) has figured out the correct incantion for firefox as evaluating various table generating forms at the R repl exhibit the behavior I'm looking for.
@slyrus, does @tobyWorland commit solve the issue for you?
@Symbolics good question but first I have to get cephes to build :(
FWIW, using the latest cephes from github solves the building on MacOS problem.
@Symbolics it's better. I'd still rather see a new tab open than a new window (and maybe without the GUI notification of launching a new process showing up in the dock). And it doesn't seem to work on firefox. A new window opens, but nothing is in it (other than the default stuff). So, progress, but not there yet.
My access to MacOS is limited, and I won't be able to help with the MacOS/Firefox problem. If you have the bandwidth, I'd appreciate someone looking into this. Alternatively, the webview.h plot view viewer is progressing and would love some help. That would solve all these issues, on all platforms.
...rather see a new tab open than a new window...
@slyrus
You just want a tab to open in your regular browser? As long as Firefox is set as your default browser (setf plot:*default-browser-command* :default) should have it open in a new tab instead. I don't have a mac to test, but I see no reason why it shouldn't work.
Perhaps a variable should be added to control whether a toolbarless browser should be used or the user's regular one.
@slyrus, is this working for you? Can we close the issue?
@slyrus, I'm going to close this as fixed now. If you encounter problems, please open another issue, or reopen this one.