[IPython-User] PLEASE make autosave standard

Tom tmbdev@gmail....
Tue Nov 6 20:01:11 CST 2012


"This is all solvable, but it would be a significant expenditure of time
and effort, and so far no-one's got round to doing it."

It only becomes a significant expenditure of effort because people are
trying to reinvent the wheel and mix this issue up with unrelated and
complicated issues of backup files, multiple instances, version control,
and god knows what else. In fact, autosave is pretty simple:

- periodically, you save the notebook to an autosave file, but only if it
has been modified
- autosave only saves user input (which is all text fairly small), not the
output or images
- the autosave file for "filename.ipynb" is "#filename.ipynb#" in the same
directory
- the autosave file is removed whenever a manual save takes place (and only
gets recreated once there are modifications)
- when you open a file, you check whether there is an autosave file for it
and offer the user to recover it, open it as a new file, or delete it

"Periodically" means something reasonable like every few hundred keystrokes
or every few minutes or something cell related, whatever is easiest to
implement.

Autosave files are not backup files; autosave files only exist while there
are unsaved modifications to a file and when something has crashed, so
saving them in the same directory as the original file is fine and they
don't clutter up anything.

Opening a file multiple times is also not an issue: you already risk data
loss in iPython when you do that, and autosave files clobbering each other
doesn't make that situation any worse than it already is. (Opening a file
multiple times should be prohibited, but that's a completely separate
issue).

If doing autosave well over slow connections looks too complicated, just
turn it off for slow/remote conections and put up a warning indicator in
the menu bar; autosaving 95% of the time is a lot better than autosaving 0%
of the time, which is the current situation.

"Perhaps it's better to focus on reducing the need for autofocus. As others
have said, Ctrl+S should work in all browsers to save the notebook. The
original post also mentions problems with long output"

You cannot fix this by trying to fix bugs elsewhere. No matter how many
bugs you fix, computers crash, lose power, and get forced reboots from
Windows updates. Nor is manual saving a solution because people don't
expect to have to do that anymore and simply will not remember. I don't
remember to (even now that it works), which is why I keep losing work in
iPython.

Implementing autosave is a small task and easily done if you decide to do
it, and it greatly alleviates the pain resulting from many other bugs.

Tom


On Wed, Nov 7, 2012 at 1:44 AM, Jon Wilson <jsw@fnal.gov> wrote:

> On 11/06/2012 06:19 PM, Carl Smith wrote:
> > it'd probably be more useful if it displayed
> > the amount of time since the last save
>
> Or even (also?) tell you how many cells have changed since the last save.
> Regards,
> Jon
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121107/5439d0ca/attachment.html 


More information about the IPython-User mailing list