Originally posted by @aushev in #13322 (reply in thread):
yes exactly, I am using rstudioapi::getActiveDocumentContext() and in RStudio it works perfectly for both editor and the console. I understand it might be difficult to have something equally universal in Postiron - but even just a separate function for the console context (like existing rstudioapi::getConsoleEditorContext()) would work, as long as it is an R function
We added the infra for doing this in #15154 but have not yet hooked it up to the rstudioapi function.
Originally posted by @aushev in #13322 (reply in thread):
yes exactly, I am using
rstudioapi::getActiveDocumentContext()and in RStudio it works perfectly for both editor and the console. I understand it might be difficult to have something equally universal in Postiron - but even just a separate function for the console context (like existingrstudioapi::getConsoleEditorContext()) would work, as long as it is an R functionWe added the infra for doing this in #15154 but have not yet hooked it up to the rstudioapi function.