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 (or a lot of 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’s high 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? As long as you also have the option to rewind and take your document in a different direction, what could possibly be the harm?

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

In these programs, your document is saved every time there’s even the tiniest pause in your typing or working—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 application,” 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 about the Versions world of document management:

  • All the version information is stored in the same original document file. (It’s not like there’s a rat’s nest of icons for each thing you’re working on.) But 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).

    Note

    Behind the scenes, the various versions of each document are saved in an invisible folder on your hard drive called .DocumentRevisions-V100. But you probably guessed that.

  • OS X creates a new snapshot of your document once an hour. You can also create new snapshots manually at even shorter intervals—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. Thoughtfully enough, 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-30).

    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-30. 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 springs into existence. If the original was called “Kumquat Tarts,” then the new one is called “Kumquat Tarts copy”—but 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. (You can even store it in iCloud at this point; see iCloud Drive.) Or use the secret menu-bar menu shown in Figure 4-30.

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). That, of course, is nothing new; lots of programs have Revert to Saved commands that work similarly.

What’s cool 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-31. 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. (And behind it all, you see another sort of version: Apple’s animated, starry version of the galaxy.)

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

Figure 4-31. This is your 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 starry 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 windows into 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 Starry 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 to it, if necessary.

    Tip

    If you press Option, then 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 current condition of 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 Starry 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-31. Now copy the highlighted material (either press ⌘-C or move your mouse to the top of the screen so that the menu bar appears, and 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 to complete this astonishing act of salvation.

  • 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 says 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! Just choose File→Revert to→Last Saved (or Last Opened).

Get Switching to the Mac: The Missing Manual, Yosemite 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.