Open jbrennan opened 9 years ago
+1 to this
lol, when I made save all there were complaints that it saved all files. And that was explicit!
I would quite like to implement an autosave feature. But not Apple's autosave because that's a privacy nightmare.
@fileability Maybe the complaints didn't account for a world before Git/Reviewing your commits? :)
Practically for me, the save on window defocus is a nice balance of predictability when you have processes that watch and rebuild on file changes and you don't want them continuously/unpredictably working.
I think there is some merit in having a mode where chocolat automatically saves files at certain intervals. I'd use that, probably.
Reminds me that also undo serialisation would be really nice.
Yeah I run into the situation where I make some changes in a few files, hop over to the browser and reload the page, then spend a few cycles trying to figure out why only some of my changes have shown up, then remembering to go back and cmd+s all the files I just edited. It’s a bummer.
Yeah especially when you're really working a bunch of tabs, this comes up a lot.
I have been thinking about this whole issue. Treatise incoming.
The main utility is to be able to open and close Chocolat without having to bother with save dialogs. Also it means we can reduce Chocolat's memory footprint by closing files that have been opened but are not being actively used.
Really I don't have a problem with OS X's "Versions" feature, except for every detail of its implementation. Like how an entire history goes into the quasi secret .DocumentRevisions-V100
database, unencrypted and with apparently no regard for privacy whatsoever. If I accidentally paste a password into a text document, I don't want it hanging around in plaintext for evermore!
I do like how Chocolat is a traditional open/save kind of an app. It's predictable: if you haven't saved, it's in memory. If you have saved, it's on disk. All programmers implicitly understand this mode of operation.
However, it would be nice if there was a basic (non-magical) autosave feature that encompassed both untitled and unsaved files.
Ground rules:
Note that if you switch the functionality of edited documents around, you get a different but equally valid model: documents on disk aren't committed to disk unless the user does so explicitly (cmd-S). However the latest user version is kept in the document store just in case chocolat crashes. I'm going to avoid this model because it's not radical enough to warrant the development effort.
As for the implementation, we can follow OS X Versions roughly:
Only one revision of each document would be stored, minimising to risk to security & privacy, and simplifying the UI. Also, autosave should be disabled for documents larger than a certain size (e.g. 8MB?).
For the UI, I am determined to avoid the "open chocolat and get dozens of untitled files you had open last time" syndrome. When I open Chocolat I want a clean slate. So autosaved untitled files should be easily accessible but not mass-opened by default on next launch. I propose an "open untitled" UI.
For unsaved edited files it's easier. We just need a way to revert to the revision in the document store. A button in the titlebar would do it.
It would be great to have Apple's Autosave feature. Use Desk app as an example of perfect text editor. I don't know why owner thinks about it as a privacy concern.
The preference “Save on Window Defocus” works, but only for the currently open file. If you edit other files and defocus the window, only the current active file is saved. I really expect it to save everything.