On Mon, Jan 4, 2016 at 1:21 AM, Jean Bigboute <jeanbi...@gmail.com> wrote:
I often download Python tutorial notebooks from Github and go through them on my local machine. Notebook's Autosave updates the files as I am playing with them. If I want to discard my modifications and start fresh, the only way I seem to be able to is to either make a backup before starting or to download the notebook file again from Github.
I am running Python 2.7 via Anaconda on Mac OSX El Capitan 10.11.2 using Safari (mostly) and Firefox (occasionally).
Questions:
1) Is it possible to save more than one Checkpoint? If I save/restore, I only see one item in the Restore Checkpoint flyout
With a custom CheckpointsManager, but not the default one. I’m not sure if there is one readily available that provides this.
2) Is it possible to turn off Auto Save by default?
Yes, in ~/.jupyter/custom/custom.js
:
require(['base/js/namespace', 'base/js/events'], function (IPython, events) {
events.on("notebook_loaded.Notebook", function () {
IPython.notebook.minimum_autosave_interval = 0; // disable autosave
});
});
-MinRK
I found some threads on this for IPython notebooks using magics and config files. Magics have to be executed per notebook and I understand there have been changes to the config file system in general in Jupyter.Unrelated question: Is there a way to interact with this group from a newsreader? gmane.comp.programming.jupyter allows reading but not posting.
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/07d5a480-aca3-41e6-8285-d7e0a7a8b8fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
There also is an open issue about creating a mechanism for example notebooks so that one does not modify the examples accidentally.
(For example by adding a flag in the notebook file to say that it should be copied before being opened or should not be saved inplace by default.)
S.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAHNn8BX0vnqkrnDugTW9bTMkNQTJhQZWNTuB5tCt3GC_ohgPTA%40mail.gmail.com.
On Mon, Jan 4, 2016 at 1:21 AM, Jean Bigboute <jeanbi...@gmail.com> wrote:
...
Questions:
1) Is it possible to save more than one Checkpoint? If I save/restore, I only see one item in the Restore Checkpoint flyout
With a custom CheckpointsManager, but not the default one. I’m not sure if there is one readily available that provides this.
2) Is it possible to turn off Auto Save by default?Yes, in
~/.jupyter/custom/custom.js
:require(['base/js/namespace', 'base/js/events'], function (IPython, events) { events.on("notebook_loaded.Notebook", function () { IPython.notebook.minimum_autosave_interval = 0; // disable autosave }); });
-MinRK
There also is an open issue about creating a mechanism for example notebooks so that one does not modify the examples accidentally.
(For example by adding a flag in the notebook file to say that it should be copied before being opened or should not be saved inplace by default.)
S.
...
> Thanks. I think that multiple Checkpoints would be a better way to go. Or, perhaps, making Autosave off by default and controllable without having to edit a Custom JS file.
MultipleCheckpoint Manager is not on the roadmap on purpose. The API allows it, but the details and possibility of version control are too numerous be in core.
Autosave is on by default for good reason, discussed with great length, and it is always possible to revert to last manual save through the checkpoint menu,
so it will likely not be disable by default.
I won't contest this but I am glad my other tools don't work this way.
...deletia...
I'm puzzled by both decisions. If I understand correctly, the Notebook, which is designed to encourage experimentation, is configured by default to regularly overwrite files on a filesystem with the user's only recourse being to manually save a single checkpoint in between automated overwrites.
Please look at the all history of the feature, in particular the PR corresponding to the IPep:I won't contest this but I am glad my other tools don't work this way.You might not realize that but many tools behave this way. Especially in a browser if you do not want people to loose work.Actually, even many desktop apps have this feature. I can restart my computer, and have various “unsaved” work being restoredat their current state.Also please have a look at how checkpoint behave. You can perfectly work without ever manually triggering a save/checkpoint,and your original file (if you downloaded it, or whatever) is still available.--M
2) Is it possible to turn off Auto Save by default?Yes, in
~/.jupyter/custom/custom.js
:require(['base/js/namespace', 'base/js/events'], function (IPython, events) { events.on("notebook_loaded.Notebook", function () { IPython.notebook.minimum_autosave_interval = 0; // disable autosave }); });
-MinRK
If I understand correctly, the Notebook, which is designed to encourage experimentation, is configured by default to regularly overwrite files on a filesystem...
March 1, 2017 at 10:25 PM
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CADT3MEAt5ca0pJfLTvsOo5wqHLNWC0M0%2BmzGEVv6yUxx2v%3Dzgg%40mail.gmail.com.
March 1, 2017 at 10:14 PM
Sorry, NOT acceptable. I do NOT want to have to change every single notebook. Why should I?I think there are many people who dislike the auto-save option. I will give you just one example. I like to have a master version of the notebook, then I want to experiment. When I experiment, I just DON"T SAVE. So the master remains unchanged. With autosave, my master notebook will change WITHOUT ME NOTICING. You say, you can revert to the last manual save, but that's a useless feature because next time I edit the master notebook, I may want to make a permanent change, after which I will manually save. This save will now contain both the desired changes as well as the unwanted one. Now I have lost the ability to revert. It's a complete mess. Please don't ask me to change my habit, which I have formed in decades of using computers--not going to happen.Regardless of whether the Jupyter notebook developers agree or not, many of us have some very good reasons why we want to turn off auto-save PERMANENTLY. It should be an easy option and a user's choice.Just please make a version of the custom JS file work. Is it too much to ask? Don't make us conform to the tool, make the tool conform to what the user wants.
Sorry for the rant, I get pretty worked up by things like those, having been burnt several times...
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/aa000ae1-a59c-4035-b6da-1aa5308ce1a4%40googlegroups.com.
March 1, 2017 at 1:45 PM
require(['base/js/namespace', 'base/js/events'], function (IPython, events) {
events.on("notebook_loaded.Notebook", function () {
IPython.notebook.minimum_autosave_interval = 0; // disable autosave
});
});
config:
/Users/davide/.jupyter
/Users/davide/anaconda/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/Users/davide/Library/Jupyter
/Users/davide/anaconda/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/Users/davide/Library/Jupyter/runtime
Call it custom.js, and put into ~/.jupyter/customI did this, and it does not seem to work. Note: I am on macOS and using Anaconda.
On 2 March 2017 at 21:50, DG <davide....@gmail.com> wrote:Call it custom.js, and put into ~/.jupyter/customI did this, and it does not seem to work. Note: I am on macOS and using Anaconda.You're doing the right thing, but I suspect you might be waiting for an event that has already been fired before your code is loaded, so you never see it. Scatter some console.log() calls around the javascript to see what bits are getting run (you can pull up the browser Javascript console to see messages from console.log()).
Well, the script loads, BUT AUTOSAVE IS STILL ON. That's disappointing.
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/d9322f9c-0023-42f0-abca-45e59e83f14c%40googlegroups.com.
%%javascriptvar nb = Jupyter.notebook;var interval = nb.minimum_autosave_interval nb.kernel.execute("NB_interval = '" + interval + "'");
%%javascriptvar nb = Jupyter.notebook;var interval = nb.minimum_autosave_interval = 0;
%%javascriptJupyter.notebook.set_autosave_interval(0);
console.log("Loading autosave disable script");
require(['base/js/namespace', 'base/js/events'], function (IPython, events) { events.on("notebook_loaded.Notebook", function () { IPython.notebook.minimum_autosave_interval = 0; // disable autosave
});});
console.log("Loading autosave disable script");require(['base/js/namespace', 'base/js/events'], function (Jupyter, events) {
events.on("notebook_loaded.Notebook", function () {
Jupyter.notebook.autosave_interval = 0; // disable autosave });});