autosave
Matthew Woehlke
mw_triad at users.sourceforge.net
Wed Apr 4 15:29:17 UTC 2007
Jens Dagerbo wrote:
> Here's a quick stab at autosave for KDevelop3.
> [snip]
> Opinions? Worth applying?
IMO, No.
Aside from the fact that there might be a reason I didn't save a file
(and automatically calling "save" potentially causes me to lose the
ability to go back to the on-disk version... especially if KDevelop
crashes so that undo history is gone), I can think of a very good reason
not to use 'save'. Say I am hacking on two files; tinkering in one
(eventually I will do something useful), and making serious changes in
another. I may be doing builds occasionally to test changes. Now with
auto-save, the "tinker" file gets saved in a non-working state, and
suddenly I can't build.
IMO the "right" way to do this is have something like a backup suffix
used for auto-save. This is how most implementations of auto-save (at
least, that I can think of offhand) work. You then delete the auto-save
file when a normal save is successful. Also, this way the file is still
marked 'modified' so you know it has been changed since your last
'regular' save. On opening the file, a check is done if there is an
auto-saved version; if yes, you are prompted to open the auto-save
version (preferably you also have the 'view diff' option).
Also, why put this in KDevelop and not KATE?
--
Matthew
"Will somebody get this walking carpet out of my way?!" -- Princess Leia
Organa
More information about the KDevelop-devel
mailing list