Mac OS X Lion 10.7 Deep Dive: Versions and Auto Save

The new, complementary functionality of auto save and versions is an interesting beast. It’s the type of feature that a few years from now you’ll be amazed you ever lived without, but right now feels kind of weird. In some ways it feels like a step backward until you understand how it works.

Things start out feeling pretty normal. When you create a new document and then go to save it, you’ll see “Save…” in the File menu, which replaces both “Save” and “Save as…” from previous versions of the OS. Frankly that’s a welcome change as it didn’t make much sense to have them both there for an unsaved document, considering they both led to the same save dialog. However, the uncomfortable feeling starts when you go to save your document after making some changes, or go to do a “Save as…”. This is what you’ll see then:

![Versions File Options](/content/images/2017/01/versions-file-options.png)
New file options

Where’s “Save” and “Save as…”? What’s “Save a Version” and “Duplicate”? There are a lot of changes here. The shortcut for “Save a Version” is a good clue to what’s happened. Apple has renamed “Save” to “Save a Version”. The concept behind the wording is that you’ll be creating an explicit marker in the version history for this version. It’s also saving the document in the traditional sense, of course, in that the next time you open it you’ll see what you just saved, but that’s less important now with auto save – you could never hit Command-S, never select “Save a Version” from the File menu, and your changes would still be saved.

“Duplicate” is a replacement for “Save as…”. When you think about it this may be a better description of what “Save as…” actually does. Anyone reading this probably understands how “Save as…” works from years of use, but a brand new computer user might think that “Save as…” overwrites their document, so that after doing “Save as…” they would still have only one document, not two. Duplicate makes it very clear what’s happening. When duplicating you get the same dialog as the old “Save as…”, letting you choose a filename and location for the duplicate copy.

“Revert to Saved” enters you into the Time Machine-like version browser for the document (more on that later).

Saving, Editing, and Locking

A version-enabled document can exist in one of three states: locked, edited, or saved. A saved document is one where the most recent saved version is the same as the current state of the document. There is no special indicator of this state, except for the absence of contra-indicators.

![Versions Saved DP4](/content/images/2017/01/versions-saved-dp4.png)
A saved document

You can lock or duplicate a saved document or browse past versions.

![Versions Saved Options DP4](/content/images/2017/01/versions-saved-options-dp4.png)
Options for a saved document

An edited document is one where the most recent saved version is not the same as the current state of the document. As soon as you make a change to a “saved” document it becomes an “edited” document. This is indicated by the word “Edited” appearing in the title bar of the document.

![Versions Edited DP4](/content/images/2017/01/versions-edited-dp4.png)
An edited document

You can lock, duplicate, or revert an edited document, or browse past versions.

![Versions Edited Options DP4](/content/images/2017/01/versions-edited-options-dp4.png)
Options for an edited document

“Revert to Last Opened Version” is equivalent to the familiar trick of closing without saving for those times when you want to start over after a bunch of edits.

![Versions Revert Dialog DP4](/content/images/2017/01/versions-revert-dialog-dp4.png)
Reverting a document

Duplicating an edited document will give you the option to revert the document after duplicating.

![Versions Edited Duplicate](/content/images/2017/01/versions-edited-duplicate.png)
Duplicating an edited document

One thing that is hard to get used to is auto save on close. If you close a file with unsaved edits the application will no longer prompt you to save your changes – it will simply save them and close. Related to this change Apple has done away with indicating an unsaved document through the red close button of a document window. In previous versions of the OS, an unsaved document would have a gray dot in the close button.

A locked document will not be auto saved and cannot be edited. This is indicated by “Locked” appearing in the title bar of the document, and in the file icon itself getting a lock icon overlay.

![Versions Locked DP4](/content/images/2017/01/versions-locked-dp4.png)
A locked document

The lock icon is shown on the file icon in the Finder as well. This is important because locked files are full-on locked – you can’t even change the filename. Selecting a locked file in the Finder and hitting enter won’t do anything, where on non-locked files this allows you to edit the filename.

![Versions Locked File Icon](/content/images/2017/01/versions-locked-file-icon.png)
A locked file on the desktop

Trying to edit a locked document will generate a prompt to unlock or duplicate the document.

![Versions Locked Dialog DP4](/content/images/2017/01/versions-locked-dialog-dp4.png)
Editing a locked document

Versions

Versions is surprisingly straightforward. You can get to the versions interface by either selecting “Browse All Versions…” from the document options drop down, or you can select “Revert to Saved” from the File menu (why these don’t get the same name I don’t understand). On the left side you’ll see your current document and on the right all your previous versions. You can move back and forward in time by either clicking on the windows that appear “in the distance”, or by scrubbing through the timeline on the right side.

![Versions Browse](/content/images/2017/01/versions-browse.png)
Versions interface

As was demonstrated at WWDC you can selectively pull from previous versions and drop them into your current version in addition to just wholesale restoring a previous version. Interestingly, the windows showing previous versions are also “live” windows. All toolbar options are selectable, but the system prevents the changes from happening. If you try and change the font, for example, you can get the list of fonts and pick one, but your choice will be ignored.

![Versions Browse Edit DP4](/content/images/2017/01/versions-browse-edit-dp4.png)
Trying to edit a previous version

One other interesting tidbit is that when the versions interface is loading up the text “Retrieving versions from Time Machine” is shown. Under the hood the tech powering versions is based off of what Apple developed for Time Machine, but Time Machine is not required to be configured or running in order to use versions, so it seems somewhat incorrect to say that the versions are being retrieved from Time Machine.