Closed
Description
I use codegrip::addin_reshape()
and styler:::style_active_file()
in both RStudio and Positron (bound to keyboard shortcuts). Both of these functions call rstudioapi::modifyRange()
, which in turn calls rstudioapi::getVersion()
.
Recent changes in 3bd91a6 and 6a71e69 mean that getVersion()
fails outside of RStudio:
In Positron:
rstudioapi::modifyRange(Map(c, 1:5, 1), paste0("#", sample(letters, 5), " "))
#> Error in base$.Call("rs_rstudioVersion", PACKAGE = "(embedding)"): "rs_rstudioVersion" not available for .Call() for package "(embedding)"
rstudioapi::getVersion()
#> Error in base$.Call("rs_rstudioVersion", PACKAGE = "(embedding)"): "rs_rstudioVersion" not available for .Call() for package "(embedding)"
Created on 2024-10-18 with reprex v2.1.1
I don't think these addins are officially supported in Positron, but I know there has been some work to ensure a certain subset of rstudioapi functions work in Positron, including modifyRange()
(e.g., posit-dev/positron#1312 and posit-dev/positron#2582).
Apologies if this should be a Positron issue rather than rstudioapi.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels