← Back to all sparks
R

rstudio.prefs

INFRA · APIS
Velocity2.5

Manage 'RStudio' Preferences and Addin Shortcuts

Four years dormant, rstudio.prefs returns under a new maintainer.

r-packagesrstudiodeveloper-toolsconfiguration-as-codemaintenance
Current state
The package scripts RStudio's own settings — preferences, secondary repositories, keyboard shortcuts — as code you can drop into a project or an onboarding doc. After 0.1.9 in July 2022 it went quiet for four years. 0.2.0 ends that with a maintainer handoff from Daniel D. Sjoberg to S.A. van der Wulp, a shortcut-removal path, and a fix for a corrupted addins.json entry that made reassigned shortcuts fail silently.
Where it's heading
The through-line is teaching every setter how to unset. Secondary repositories got NULL removal back in 0.1.6; 0.2.0 extends the same convention to keyboard shortcuts. Most of the rest of 0.2.0 is arrears — a stale documentation URL that hid preferences such as enable_splash_screen, a deprecated purrr::update_list() call, and check_shortcut_consistency() erroring early on an unknown name.
Prediction
With a new maintainer and refreshed GitHub Actions, the near-term work is likely more catch-up of the same kind: remaining deprecated dependencies and the preference list that fetch_rstudio_prefs() reads from RStudio's docs. Nothing in these notes points past RStudio settings as the scope.

Recent moves

  1. 6h ago

    Shortcut removal, an addins.json fix, and a new maintainer

    The release that restarts the package after four years: shortcuts can now be removed by passing NULL, the corrupted .1-suffix addins.json entry is fixed, and maintenance passes to S.A. van der Wulp. The changes are small individually but they clear the backlog that accumulated while the package sat still.

    View source ↗
  2. 4y ago

    Preferences now read and written through rstudioapi

    Swaps hand-rolled manipulation of the preferences JSON file for the official {rstudioapi} calls, which is what let the package survive four years without a release. It also fixes the first-secondary-repository case and the app-data folder casing on Unix.

    View source ↗
  3. 4y ago

    Config files left alone when nothing would change

    Functions now abort before saving and backing up config files when no change would be made, so running a setup script twice stops littering backups. The fetch_rstudio_prefs() source URL is updated — the same class of breakage 0.2.0 had to fix again.

    View source ↗
  4. 4y ago

    Secondary repositories can be deleted again

    Fixes the removal path added one release earlier, where existing secondary repositories could not actually be set to NULL, and exports repo_string_as_named_list(). An early instance of the removal-semantics work that 0.2.0 later extends to shortcuts.

    View source ↗
  5. 4y ago

    Repository removal via NULL; config path helpers exported

    Introduces the NULL-means-remove convention on use_rstudio_secondary_repo() and exports rstudio_config_path() and check_min_rstudio_version() for callers building their own setup tooling. This is the convention 0.2.0 carries over to keyboard shortcuts.

    View source ↗
  6. 5y ago

    Documentation, error messages, and array-type caution

    Documentation, error messaging, printing style and test coverage, plus a note steering users away from array-typed preference updates pending further testing. Nothing here changes what the package can do.

    View source ↗