Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save_all helper? #1850

Closed
hadley opened this issue Aug 18, 2018 · 4 comments
Closed

save_all helper? #1850

hadley opened this issue Aug 18, 2018 · 4 comments
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Aug 18, 2018

  if (rstudioapi::hasFun("documentSaveAll")) {
    rstudioapi::documentSaveAll()
  }

Is repeated in a lot of places. If it was extracted out, you could also imagine adding implementations for other editors.

@jimhester jimhester added the feature a feature request or enhancement label Aug 20, 2018
@AmundsenJunior
Copy link
Contributor

I'm considering two ways of implementing this. First option is to place a save_all() function into R/utils.R. I'm not sure that this is the best location, if we are anticipating expanding with impls for other editors. In that case, it makes more sense to me to create R/save-all.R, and export the function from that file.

@jimhester
Copy link
Member

I think we should put it in R/save-all.R with an eye towards expanding the functionality to other editors in the future. Although doing so would likely require a package to communicate with them ala rstudioapi.

@AmundsenJunior
Copy link
Contributor

@jimhester created PR for save-all.R

@lock
Copy link

lock bot commented Mar 9, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Mar 9, 2019
HughParsonage pushed a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants