[ Direct Download: TeXShop 3 for Lion | Lion Source | TeXShop 2 | Version 2 Source ] [ Contact ]

About TeXShop

Automatic Saving

Automatic Saving is a powerful new feature in Lion.

When Auto Save is on, you can essentially forget about saving files. The file will automatically be saved every few minutes. Only changes will be saved so there is not a lot of disk activity. With medium size documents, this is completely unnoticeable on my machine. I'll be interested in the experience of users with very large source files. Apple provides additional ways to optimize this feature which I have not implemented yet because I suspect they won't make much difference with TeX source files.

If you quit a program, you will no longer be asked to save changed files. Instead the changes will automatically be saved. Similarly if you shut down your machine and Auto Save is activated for all programs, then the machine will simply shut down. But the next time you boot up, all those programs will start again and all the documents will have the latest changes you made before shutting down.

If you copy the source of a file, or drag the entire file to mail, or do similar operations, the file will automatically be saved first and users will always get the latest version.

It is still possible to directly save a file using the "Save" menu command or keyboard equivalent. When Auto Save is on, this command is renamed "Save A Version."

In previous Macintosh systems, file that have been edited are marked as "dirty" with a black circle in the red close button at top left of the window. When Auto Save is on, edited documents are marked by appending the word "- Edited" to the document's name in the window's title bar. If you "Save A Version", this "- Edited" notice goes away.

Since the Macintosh is only saving changes, it has a complete record of all the versions of the document. Theoretically, you could go back to earlier versions and reconstruct the document as it was yesterday, or last month. As we will see in a moment, this isn't just theoretically possible --- it is actually easy.

You might wonder if the file containing a document has all the old versions hidden away somewhere. Could I send someone the TeX source of a letter of recommendation which currently says ``Paul is a creative student'', but whose initial version said ``Paul hasn't had a new idea in years"? Happily, no. Files on disk only contain the latest version.

What happens if I decide to experiment , get confused, lose my way, and end up with a source document that makes no sense, and then discover that my crazy changes have been saved out from under me? This question has several answers. First, if you typeset your experiment, then you saved over the old source anyway. But you can use undo to get back to the original document because TeXShop's undo works even across file saves.

However, Lion has a much nicer solution to this problem. It has always been true in TeXShop and other programs that you can click the title of a window while holding down the control or apple key and see a complete path to your document, listed as a series of entries in a drop down menu. By selecting an item in this menu, you can directly go to that spot of the file system.

With Auto Save on, you can click in the title of a window without holding down a key and another menu will drop down. This menu has the following items: Lock (or Unlock), Duplicate, Revert to Last Opened Version, and Browse All Versions. Suppose we select that last item.

The Macintosh screen then switches to a Time Machine view showing the current document on the left and a receding stack of earlier views on the right. You can leaf through these earlier versions, noting the date and time that the version was created. All these views are alive, so you can copy and paste between versions, or restore an earlier version.

This works even if you have not activated Time Machine. So it is a personal Time Machine just for TeXShop source documents.

Often users have a folder of old papers which they haven't edited in a long time, but refer back to from time to time. Lion understands this and implements a "Locking" feature for old papers. When a document has not been edited for 15 days, it is automatically "locked" and the window title shows the document name followed by the text "- Locked". Automatic saving is turned off for such documents and "Save A Version" puts up a warning dialog.

If a document is locked, clicking on the word "Locked" produces a drop down menu with an item which Unlocks the file. Thus if you really want to work on the file again, you can do so.

If a document is active, the drop down menu from the title bar contains the command "Lock", so once a document is finished, it is easy to Lock it.