You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICT it's currently not possible to activate a source editor by document ID, which makes unsaved documents inaccessible to automation when they lose focus.
library(rstudioapi)
documentNew("# first document")
id1<- getSourceEditorContext()
# we have context for first document, open a second doc
documentNew("# second document")
id2<- getSourceEditorContext()
# cannot re-activate first document
The text was updated successfully, but these errors were encountered:
I just followed a few internal Slack conversation threads and realized that rstudio/rstudio#8938 is intended to support a feature like this where the proposal was for
something like documentActivate(), that accepts either a document ID or a document path.
AFAICT it's currently not possible to activate a source editor by document ID, which makes unsaved documents inaccessible to automation when they lose focus.
The text was updated successfully, but these errors were encountered: