Pluto.jl: Store notebooks in a permanent location by default

Created on 8 Aug 2020  路  9Comments  路  Source: fonsp/Pluto.jl

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.

almost closed

Most helpful comment

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 :grin:

All 9 comments

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)

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 :grin:

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

Any suggestions?

Sorry, completely forgot about that. Thanks for the bump :smile:

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)

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

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!

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.

@dralletje What do you think?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fonsp picture fonsp  路  4Comments

MikaelSlevinsky picture MikaelSlevinsky  路  6Comments

fonsp picture fonsp  路  5Comments

MikaelSlevinsky picture MikaelSlevinsky  路  7Comments

aramirezreyes picture aramirezreyes  路  3Comments