[IPython-User] autosave in notebook
Sun Jan 15 14:49:47 CST 2012
2012/1/15 Brian Granger <email@example.com>:
> 2012/1/15 Zoltán Vörös <firstname.lastname@example.org>:
>> Hi Brian,
>> On one hand, I see your point, on the other hand, I don't. I agree that
>> unintentionally overwriting existing and valid data with new, but faulty one
>> is a problem. However, just as big a problem is when the browser fails, and
>> you lose the data altogether.
> Yes, which is why we are thinking about these things. But
> realistically, I have been using/developing the notebook for many
> months (probably more than most), and I can't think of a single time
> that my browser crashed leading to a loss of data. That is not to say
> it doesn't happen, but that the situation is not so severe that can't
> take a little time to figure our a permanent solution.
Intermittent network connections and traveling laptops (connected to
non-local notebook) are probably more likely causes than crashing
>> As a temporary solution, couldn't there be a backup file to which one could
>> autosave every 5 minutes, or whatever, and you would only write to the
>> master file when pressing the "Save" button? That would eliminate the issue
>> you raised, but would still be more than nothing.
> I guess I would rather wait a bit longer and figure out how we want
> the notebook to integrate with version control systems. In our view
> this part of the notebook is extremely important and is worth getting
> right. For now I am -1 on implementing a temporary solution,
> especially one which pollutes the local directory. I would like to
> hear from others though (@fperez, @minrk, @takluyver?).
Fernando proposed *exactly* this, backup-save a while back, and I
think it's a good idea. A document-based webapp that doesn't autosave
is simply not a good webapp, because the assumption network
connections are sustained and reliable is a 'recipe for data loss', as
you put it. This is not a significant issue for localhost notebooks,
but it would be for remote ones. My principal objection at the time
to an implementation detail was adding clutter to the working dir,
which I think we should work very hard to avoid doing.
>> If that is an acceptable solution (writing to notebook.ipynb.backup every 5
>> minutes), I still don't know how one would implement this. I could set up a
>> timer, and call save_notebook(), but how can I retrieve the currently active
>> tab in the browser? If I write the timer function into the notebook
>> template, will the same timer apply to all open notebooks, or only the
>> active one? Besides, I am not certain at all as to where exactly the timer
>> should be.
> Implementing this would require changes on both of server and browser
> side of things. We would need a new URL/handler to handle the
> autosave requests along with the logic in the notebookmanager. On the
> browser side, the timer should be in savewidget.js and it will affect
> only a single notebook at a time.
>> Any comments on this, or you think that this approach is just an ugly hack,
>> and it is really not worthwhile?
>> On 01/15/2012 08:34 PM, Brian Granger wrote:
>>> Autosave without version control built-in is a recipe for data loss
>>> disaster. To prevent unwanted losses from autosave, you need the
>>> ability to rewind and recover lost work. This is something we are
>>> thinking about, but is still a ways off.
>>> 2012/1/15 Zoltán Vörös<email@example.com>:
>>>> Hi All,
>>>> I am sorry for spamming the mailing list, but I happen to use the
>>>> notebook quite a lot at the moment, and during this I find myself facing
>>>> newer and newer questions. I try to find the answer, before posting the
>>>> problem here:)
>>>> Is there a way to set autosave on on the html notebook? I don't mean the
>>>> content of the cells, because that could be pulled out of the history
>>>> (at least, the inputs), but the notebook as a whole. I see that for
>>>> large notebooks with many images this might create a bottleneck, but if
>>>> the user was able to switch this off/on, that would be great.
>>>> the function that is invoked on Cntr-M-S. I could look into this, but I
>>>> don't know, whether there is already an effort under way.
>>>> IPython-User mailing list
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> firstname.lastname@example.org and email@example.com
> IPython-User mailing list
More information about the IPython-User