Auto Save and Versions

In the beginning, Jobs created the Save command—because computers were slow. Every time you saved, your work was interrupted for a few seconds as the very slow program on your very slow computer saved your work onto a very slow floppy disk.

And that, ladies and gentlemen, is why most programs still don’t autosave: because the interruptions were just too annoying.

Apple figured it was time the world revisit that scenario. Computers now have plenty of horsepower. They could be saving your work continuously , and you’d never even know it. Why shouldn’t all programs save your work as you go, automatically and invisibly?

And so, in OS X, Auto Save is here. Unfortunately, it’s available in only a few programs, Apple’s showcase programs: Pages, Keynote, Numbers, Preview, and TextEdit.

In these apps, your document is saved in the background. No progress bar, no interruption. If you quit or close the document without remembering to save, no problem: Your work will be there when you open the document again later.

Note

“But wait a minute,” cry the masses—“I like being able to close a document without saving changes! Sometimes all I wanted to do was fool around, play ‘what-if’ games—and then close it without saving changes!”

Just for you, Apple offers a pair of sneaky little checkboxes in System Preferences→General. First, “Ask to keep changes when closing documents.” If that’s turned on, then when you close a document with unsaved changes, the Mac asks if you want to keep the edits, just as it does in all other programs.

But if you quit the program without saving, your changes are auto-preserved; Auto Save apps autosave your documents when you quit their programs, so you can pick up where you left off the next time. You can override that, too, if you like; turn on “Close windows when quitting an app,” also in System Preferences→General. Now you’ll get the “Save changes?” box when you quit the app with unsaved changes.

Versions

In those enlightened programs that work with Auto Save, there’s a more complicated but more powerful feature at work: Versions. It’s an invisible paper trail of every in-progress condition of your document—and you can return to any earlier version at any time. You can even return to an earlier version and copy just a chunk of it into the current version, which is great when one paragraph of your previous draft was gold but the rest was junk. Here’s what you need to know:

  • All the version information is stored in the original document file. When you send the document to somebody else (by email or network, for example), the Mac sends only the current version, stripping out all the history. Nobody will ever know how much you labored over your work (or how little).

  • OS X creates a new snapshot of your document once an hour. You can also create snapshots manually—by using the File→Save command (⌘-S), as you always have.

    These snapshots, or versions, represent rewind points that you can return to later, even months or years after you first created the document. The Mac records, invisibly, only what’s changed between versions, so your files don’t get all big and bloated.

Note

All right, you don’t have total time-rewinding control. OS X stores hourly versions for a day, daily versions for a month, and weekly versions for all previous months.

  • There’s a secret menu in the title bar. Point to the name of your document. In Auto Save–compatible files, a little appears in the title bar (Figure 4-27).

    Point to the title of your document to see this secret menu. It lets you rename the document, change its tags, or file it into a new folder, without ever leaving the window.

    Figure 4-27. Point to the title of your document to see this secret menu. It lets you rename the document, change its tags, or file it into a new folder, without ever leaving the window.

  • The Save As command is hidden in these programs. It appears in the File menu only when you hold down the Option key.

    Apple is hoping that you’ll learn to use the new way. When you want to spin off a different version of a document—to experiment with taking it into a radical new direction, for example—choose File→Duplicate. Before your very eyes, a copy of the open window appears. If the original was called “Kumquat Tarts,” then the new one is “Kumquat Tarts copy”; that name is highlighted, selected, right in the title bar.

    To leave your duplicated document in the same folder as the original, just type a new name and press Return. To file it in a different folder, choose File→Save. You get the standard Save dialog box, where you can choose a name and a folder for it.

Tip

You can also choose to move a document to a different folder later right there in the program. Just choose File→Move To and choose a new storage bin for it.

Rewinding to an earlier version

The point of all of this, of course, is to make it easy to go back in time—to undo the mediocre work you’ve done, or to resurrect some genius work that you later deleted.

The quick way is to choose File→Revert to→Last Saved (or Last Opened). That command restores the document to the last snapshot version (or to the way it was when you most recently opened it, if no new versions have been created).

Of course, lots of programs have Revert to Saved commands that work similarly. What’s new is that you can revert your document to any snapshot, even an ancient one from weeks or months ago. To do that, choose File→Revert to→Browse All Versions.

After a moment, you see the stunning display shown in Figure 4-28. On the left, you see your document in its current condition. On the right, you see a stack of windows that represent all the different snapshots of your document, going back in time.

This display gives you the chance to go back in time to recover an earlier, better version of your document (or just a part of it).

Figure 4-28. This display gives you the chance to go back in time to recover an earlier, better version of your document (or just a part of it).

You can have all kinds of productive fun in this version browser:

  • Compare the current version (on the left) with the next-most-recent one (on the right). These are live documents, so you can scroll through them as necessary. If you decide to stick with the latest edition on the left, just click Done. You leave the version-history world and go back to editing.

  • Zoom back in time to inspect older versions (snapshots) of your document. On the right side of the screen, you see earlier versions of the document—maybe even dozens of them, stretching back in time.

    You can click individual windows’ title bars to see what’s in them. You can also click or drag your cursor through the notches at the right side. It’s like a time ruler that flies through the past. (As you go, the time/date stamp below the right-side window identifies where you are in time—that is, which version you’re examining.)

  • Restore an earlier version. If you finally find the incarnation of the document you consider superior to your current one, click Restore. You leave Blurry Versionland and return to your document, which has now been rewound to its earlier condition.

    If you later decide you should not have gone back to that earlier version, no problem. Your later version—the one you started out with—is still in the version browser, too. So you can fast-forward back to it, if necessary.

    Tip

    If you press Option, the Restore button changes to say Restore a Copy. In other words, you’ll create a previous-version duplicate of the document, without disturbing the one you’ve just been working on.

  • Restore part of an earlier version. Often, the current version of your work is generally good, but you really wish you could recover one magical sentence or paragraph or section—something you’ve since edited or deleted.

    You can do that in Blurry Versionland, too, because Copy and Paste work here!

    Use the time ruler to find the earlier edition of your document, the one containing the good stuff. Then drag through the desired text or graphics in the window on the right, as shown in Figure 4-28. Now copy the highlighted material (press ⌘-C, or choose Edit→Copy). Click in the current version of the document, the one at left, and now paste (⌘-V, or use the menu bar). Click Done.

  • Delete a version. Once you’ve found a draft you never want to see again, move your cursor to the top of the screen; the menu bar appears. Choose File→Revert To→Delete This Version.

Tip

If you press Option, the command changes to Delete Old Versions; it gets rid of all old versions of the file.

Revert

Even though Auto Save is constantly backing up your document, it also remembers how the file looked the moment you opened it. And you want to know what’s crazy? It can revert to that condition even if you’ve been manually saving your work all along! That’s better than the old Revert command ever was. Just choose File→Revert to→Last Saved (or Last Opened).

Get Switching to the Mac: The Missing Manual, El Capitan Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.