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

URI to save current workspace #33

Closed
chrisgrieser opened this issue Nov 16, 2021 · 3 comments
Closed

URI to save current workspace #33

chrisgrieser opened this issue Nov 16, 2021 · 3 comments

Comments

@chrisgrieser
Copy link
Contributor

I see two methods of implementing this:

  • A parameter like for example save-current=true to save a workspace before changing to a different workspace.
  • A separate URI for saving the current workspace, which can be run before the loading of a different workspace.

Not sure which implementation makes more sense, the latter is more fine grained control, while the former is more compact as it is only one URI.

@chrisgrieser
Copy link
Contributor Author

chrisgrieser commented Nov 17, 2021

Thanks a lot! Just to make sure I got this correctly:

obsidian://advanced-uri?workspace=foobar&saveworkspace=true will save the current workspace and then load the workspace "foobar", is that correct?

(I am asking, since the main.ts shows that saveworkspace accepts a string instead of true which confused me a bit.)

@chrisgrieser
Copy link
Contributor Author

Also minor thing: When only running obsidian://advanced-uri?saveworkspace=true, it does work as intended, however, there is no feedback to the user that anything happened (when not opening the console). I'd suggest to post a brief notification that the workspace has been saved.

@Vinzent03
Copy link
Owner

Oh yeah you are right. Will fix those two points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants