Mountain Lion's Complicated Document Model

7 August 2012

A few thou­sand words on the Mountain Lion doc­u­ment model, the auto save model, how it differs from pre­vi­ous ver­sions of OS X, and so on. Does this really need to be so complicated? I very much prefer the way Sublime Text handles this problem: a doc­u­ment is con­tin­u­ously auto-saved to some secret location, with the changes only written to disk when you ex­plic­itly hit save. As soon as you make some changes to a document, the “unsaved” in­di­ca­tor in the tab changed to “unsaved”, but if you quit the editor at this point: (a) there’s no prompt to get you to save “unsaved” changes; and (b) if you restart the editor, you get every­thing back the way it was before you quit, in­clud­ing the “unsaved” indicator. (It doesn’t save the undo stack, I just noticed, so it’s not perfect, but it’s so much better than the con­fus­ing muddle of Moun­tain Lion.)