Timed saves for backup

Bug #170167 reported by Ted Gould
This bug report is a duplicate of:  Bug #171092: Autosave. Edit Remove
0
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Wishlist
Ted Gould

Bug Description

[19:55:17] <Ted> Pissed me off because I forgot to
save. We need to get timed backups working for dumb
asses like me.
[19:55:32] <mental> we do have autosave
[19:55:39] <Ted> We do?
[19:55:46] <mental> unless the crash was a result of a
SIGABRT rather than a SEGV or something
[19:55:49] <mental> I need to fix that sometime
[19:56:10] <mental> unfortunately crashes due to
assertion failures currently do not trigger the
autosave mechanism
[19:56:12] <bryce> well, scribus has a nifty text box
thingee and some page/document management stuff
[19:56:32] <mental> presumably because if we weren't
careful it'd easily result in SIGABRT recursion
[19:56:51] <mental> but if someone wants to go and fix
that...
[19:56:59] <Ted> mental, Okay, but, I guess I was
thinking something like saving ever fixed interval. I
mean, if we get that far we may not be able to save a
'good' version of the document.
[19:57:36] <mental> true, though unless something's
been scribbling all over everything, 90% of the time
the repr stuff should be fine
[19:57:46] <mental> but, yes
[19:57:53] <mental> if you or someone want to implement
autosave, feel free
[19:57:54] <bryce> mental, yeah that's actually one of
the few tasks I left on the roadmap for this release.
I think we need to get that fixed.
[19:57:57] <mental> timed autosave, I mean
[19:59:59] <Ted> GTK+ has timers right?
[20:00:15] <Ted> Ones that just attach to the main run
loop.
[20:00:26] <Ted> (I really don't want to do POSIX timers)
[20:12:35] * mental returns
[20:12:37] <mental> yes, GTK does
[20:12:42] <mental> actually, it might be a Glib
feature nowadays
[20:13:58] <mental> yeah, see g_timeout_add or
g_timeout_add_full
[20:14:12] <mental>
http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#g
-idle-add
[20:15:15] <Ted> Okay, thought: should timed save be
document based (like each document has an x minute
timer) or one timer for the whole program?
[20:15:34] <Ted> I see the downside I see to having a
whole program timer is that it may 'stop' if you have
lots of documents open.
[20:15:59] <Ted> But it seems like a waste to have so
many timers.
[20:16:00] <mental> ah, all the documents saving at
once, you mean?
[20:16:11] <mental> well, I think it should forego
saving the documents if they have not changed
[20:16:16] <mental> (as determined by the modified marker)
[20:16:44] <bryce> you're saving to a backup file
rather than the original, right?
[20:16:46] <JonCruz> Java preferences is one place I've
seen that general problem addressed before
[20:16:49] <Ted> Yeah, that makes sense. But I'm just
worried about someone working on something like an icon
set, where they could have tons of small documents that
all are saved at once.
[20:17:08] <Ted> bryce, yeah.
[20:17:50] <Ted> I'm thinking
~/.inkscape/backup/filename.time
[20:19:38] <mental> Ted: well, even if you stagger them
somehow there's still a breakdown point where you have
so many modified documents that it won't finish before
the next save cycle
[20:19:46] <mental> or it'd just take an obscenely long
time to save
[20:19:50] <mental> so it's not an easy answer
[20:20:23] <Ted> Yeah, probably should detect that
case... I didn't think of the infinte save issue.
[20:28:29] <JonCruz> Ted: just do what emacs does as
far as the autosaving
[20:29:29] <Ted> JonCruz, which is?
[20:33:02] <JonCruz> IIRC, for autosave files, it puts
a '#' on the begining and end
[20:33:46] <JonCruz> Then also prepends '.#' as a
symlink to the instance of emacs that's doing the editing
[20:35:39] <Ted> I thought that '~' at the end was more
common?
[20:35:46] <Ted> What do you mean by 'a symlink to the
instance of emacs'? To the executable?
[20:36:15] <Ted> How often does it save? What if you
have multiple docs open? All at the same time?
[20:36:15] <Ted> (does it save them all at the same time)
[20:36:38] <JonCruz> the '~' at the end is the
*pre-edit* version
[20:37:20] <Ted> Oh, I didn't know that! That is
really good to know.
[20:37:30] <Ted> Do we thing that we should be doing
that too?
[20:37:35] <JonCruz> ls -lrt ~/\.*metadata.txt*
lrwxrwxrwx 1 joncruz joncruz 45 Feb 22 20:29
/home/joncruz/.#metadata.txt ->
<email address hidden>:1068699534

[20:37:55] <JonCruz> 8920 was the pid of the emacs
instance I was running

Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

Closed RFE 1052781 "Autosave" as it is a dup of this one.

Ted Gould (ted)
Changed in inkscape:
importance: High → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.