Re: [Gnumeric] Re: [PATCH] first draft of new auto-save functionality.
- From: "C. Scott Ananian" <cananian lesser-magoo lcs mit edu>
- To: Jody Goldberg <jody gnome org>
- Cc: gnumeric-list gnome org
- Subject: Re: [Gnumeric] Re: [PATCH] first draft of new auto-save functionality.
- Date: Sat, 23 Feb 2002 02:36:18 -0500 (EST)
On Sat, 23 Feb 2002, Jody Goldberg wrote:
On Sat, Feb 23, 2002 at 01:49:29AM -0500, C. Scott Ananian wrote:
This is a first draft of new auto-save code, which works more like emacs
#<foo># files and less like XL's (IMO broken) model.
While this is definitely an improvement over the existing XL style,
it is not what I had in mind at all. My goal is to support a vim
style .swp file to store a journaled backup. I would accept a
simpler patch to implement this form of backup using the current
mechanism (timers, dialogs etc), but it does not seem worth while.
Yes, I got that impression from your last message, but I think the
simplicity of the current code has much to recommend it. The auto-save
should be bullet-proof. A journalled backup, although theoretically nice,
is going to absorb a lot of coding time and will never be tested enough
(because how often does anyone use the recovery code? hopefully not
often!) to guarantee that it won't fail at the worst possible time.
Also, with any journalled system you have to worry about consistency in
the face of crashes mid-update & etc...
Using the standard file-save, in human-readable xml, seems the best way
to make a bullet-proof scheme. The standard file save ought to be the
best tested part of the code base. And if you look at my patch, you'll
find that it is really very very short & simple. The only changes are to
allow saving to a file descriptor instead of a filename (I could remove
that, but I'd hate to have gnumeric inadvertently overwrite someone's file
if we can easily help it, even if it's a one-in-a-million chance), and
to have the file open dialog tell you which WorkbookControl it created ---
something it really should be doing anyway!
I don't think it's every wrong to treat the user's data with the utmost
care. And I don't think a simple check-point scheme is necessarily
exclusive of a more fine-grained journalled approach in addition, if you
really feel there's solid merit to it.
The *current* auto-save code, modelled on XL, is next to useless.
You have to explicitly enable it? For every workbook? And it will
sometimes silently overwrite your existing file with changes you really
didn't mean to commit? That might be all right for Microsoft, but we know
how to do things better.
--scott
Cocaine Minister Leitrim Dictionary biowarfare strategic AP General
genetic Serbian munitions LA jihad South Africa Marxist WTO Attache
( http://lesser-magoo.lcs.mit.edu/~cananian )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]