[IPython-dev] IPEP 15: Notebook autosave
MinRK
benjaminrk at gmail.com
Wed Apr 10 19:53:06 EDT 2013
On Sat, Apr 6, 2013 at 7:02 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
> I think it's a great idea. The traditional save model really makes no
> sense because the "default" behavior (what happens when you exit without
> saving) is not what the user wants to happen 99% of the time. I have a
> question and a suggestion.
>
> What happens when the browser window is closed? Does a save occur? A
> "checkpoint"? Is it possible to reliably do any action?
>
I will make it do a regular autosave (I'm not sure there is a guarantee of
success for calls in beforeunload though).
>
> My suggestion is to add undo support. This is generally how the "poor
> man's VCS" that you describe is usually implemented. Traditionally undo
> history is cleared when the program restarts (though this isn't a
> requirement), but this is fine because it just serves the need of "oops I
> didn't want to do that," of which I think the "I don't want to keep any of
> the changes since I last opened the file" of reverting to the last
> checkpoint is a special case of. "Reverting to checkpoint" would then just
> mean performing undo until the checkpoint. Having further actual
> checkpoints is unnecessary. The undo points would serve as them, and as
> long as performing multiple undos/redos is easy, that should be enough.
>
We have minimal undo - on a per-cell basis you can undo edits, and you can
undo cell deletions. We do not have a real, rich undoable history of all
changes to the notebook. I'm not sure how feasible that would be. Maybe
when we work out the transactional save machinery, we can store a history
of transactions, which should make pretty complete undo possible. But I
don't think it's in the cards in the immediate future.
>
> Also a comment. Regardless of whether you do undo or revert, you should
> think about how to word it/present it to the user so that it is clear that
> only the notebook document is being changed. The kernel state necessarily
> stays the same.
>
Thanks, this is indeed important.
-MinRK
>
> Aaron Meurer
>
> On Apr 6, 2013, at 7:42 PM, MinRK <benjaminrk at gmail.com> wrote:
>
>
>
>
> On Sat, Apr 6, 2013 at 6:35 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
>
>> The second bullet point seems incomplete.
>>
>
> yup, fixed.
>
>
>>
>> Aaron Meurer
>>
>> On Apr 6, 2013, at 7:13 PM, MinRK <benjaminrk at gmail.com> wrote:
>>
>> I've sketched a proposal<https://github.com/ipython/ipython/wiki/IPEP-15%3A-Autosaving-the-IPython-Notebook>for autosave in the Notebook. Have a look, discuss, etc. It's a much more
>> webapp-centric approach than emacs / MS Word-style autosaved backups.
>>
>> -Min RK
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130410/4341dc47/attachment.html>
More information about the IPython-dev
mailing list