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

Store notebooks in a permanent location by default #265

Closed
StevenSiew opened this issue Aug 8, 2020 · 9 comments · Fixed by #475
Closed

Store notebooks in a permanent location by default #265

StevenSiew opened this issue Aug 8, 2020 · 9 comments · Fixed by #475

Comments

@StevenSiew
Copy link

Where are the notebooks in Pluto which I had created on my hard disk?
I am unable to locate them and the documentation does not say.

@fonsp
Copy link
Owner

fonsp commented Aug 8, 2020

When you go to the main menu, you will see the list of recent notebook files.

Did you save your notebook by giving it a filename?

howtomove

If not, then they were saved in your temporary folder. Run tempdir() in a Julia REPL to find out where that is:

image

and the use a file browser to find your notebooks. (Sort by date)

@Paethon
Copy link
Contributor

Paethon commented Aug 8, 2020

It might be a good idea to save a certain number of notebooks in a specific Pluto-temp directory that is not cleared out on reboot like tempdir() usually is.

I think the current system might make people not realize that unless you explicitly save a notebook it is basically meant as a throwaway. Maybe also offer a small red note at the top warning that the notebook will not be preserved?

Otherwise, I can already envision the number of users whining that all their hard work is gone because they rebooted their machine 😁

@fonsp
Copy link
Owner

fonsp commented Aug 12, 2020

Hmmm yes that makes sense, where should it save them?

@fonsp
Copy link
Owner

fonsp commented Sep 2, 2020

Any suggestions?

@Paethon
Copy link
Contributor

Paethon commented Sep 2, 2020

Sorry, completely forgot about that. Thanks for the bump 😄

One possibility would be to look into Base.DEPOT_PATH and try to see if we can save the notebooks there. At least on my system (Arch Linux), this seems to work without any problem.

DataDeps.jl is doing a lot more complicated stuff to find a directory to save data dependencies, but I am not sure we have to use something this complicated (https://github.com/oxinabox/DataDeps.jl/blob/master/src/locations.jl)

@fonsp
Copy link
Owner

fonsp commented Sep 2, 2020

So that's ~/.julia/pluto_notebooks/ or C:\Users\hannes\.julia\pluto_notebooks\ for most people right? I like it

@Paethon
Copy link
Contributor

Paethon commented Sep 2, 2020

Yes. Also note that the documentation clearly states, that the first entry in DEPOT_PATH has to be writable by the user. So that should not be a problem!

@fonsp fonsp changed the title Unable to find Pluo notebooks on my hard disk Store notebooks in a permanent location by default Sep 2, 2020
@eschnett
Copy link

eschnett commented Sep 4, 2020

I like to use Docker images to transport my Julia environment to other places. Everything below ~/.julia is in the image, and changes there won't survive when the session ends. However, e.g. the home directory is mounted and writable.

The key point is: there should be a straightforward way to change the standard notebook location. For example, an environment variable PLUTO_NOTEBOOK_DIR overriding the default choice would do fine.

@fonsp
Copy link
Owner

fonsp commented Sep 15, 2020

@dralletje What do you think?

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

Successfully merging a pull request may close this issue.

4 participants