From skyebend at skyeome.net  Fri Sep 25 20:53:34 2015
From: skyebend at skyeome.net (Skye Bender-deMoll)
Date: Fri, 25 Sep 2015 11:53:34 -0700
Subject: [Rd] issues with dev.new avoiding RStudio plot device on unix?
Message-ID: <5605982E.5000104@skyeome.net>

Hi R-devl,

I'm still unable to force opening an *interactive* non-Rstudio 
platform-specific plot device on *unix* systems.

dev.new() add a new argument 'noRStudioGD' in R 3.1.1.  Thank you. It 
works for me when using RStudio on Windows, but on the unix system it 
opens a pdf device instead of an interactive device when using an 
interactive RStudio session (with R_DEFAULT_DEVICE and 
R_INTERACIVE_DEVICE not set).

Do other unix RStudio users see this behavior?

It appears that the relevant line of dev.new (and in zzz.R):

    else if (nzchar(dsp) && .Platform$GUI %in% c("X11", "Tk"))
              X11
    else defdev


but when I step through in debugger, I see that

Browse[2]> .Platform$GUI
[1] "RStudio"

so instead of returning X11, it returnd defdev (pdf)

perhaps changing to

.Platform$GUI %in% c("X11", "Tk", "RStudio")

would work, but seems a little strange logically.


best,
  -skye

p.s.  I wonder if instead of having a noRStudioGD=TRUE flag, it might be 
a more future-proof design to have an avoid.devices='RStudioGD' argument 
  in case users need to induce similar behavior to avoid other current 
or future devices?  Probably to late now tho.



[Rd] issues with dev.new avoiding RStudio plot device on unix?
Skye Bender-deMoll