Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Re-enable old style auto-save for TextEdit (with a real "Save As..."). System 10.8
While better than Lion's behavior, the lack of a true "Save As..." in Mountain Lion frustrates me. I never really saw anything wrong with the old style Autosave feature, where a temporary file gets saved periodically until you close the original file. I liked being able to edit a document and then retroactively apply all changes since the last save to a new file with a different name and location from the old file.

This is what's wrong with the "Duplicate" command, which, when it duplicates the file, includes all the changes since the last save. This forces the user to be prescient about what sorts of changes they may want to make to the file at some point in the future, whereas the old "Save As..." helpfully allows you to move all your recent changes to a different file. Unfortunately for most Apple applications, you are stuck with the new behavior. However, for TextEdit, there appears to be a way to revert to the software's Autosave and "Save As... " to that used by computers since the dawn of time.

In this hint I described how to turn off the auto-save feature for an application, which at least in TextEdit causes the true "Save As..." menu item to re-appear in the File menu and enables the Command-Shift-S shortcut to act as the real "Save As...," not "Duplicate."

When doing this however, there was one problem: the new sandboxing "feature" of OS X does not allow the old auto-save feature of TextEdit to make changes to the document's working directory, so you get annoying pop-up error messages every time TextEdit tries to make the Autosave file. Here how you can fix that.

WARNING: We will be replacing the developer's code signature for TextEdit in this hint. If you have qualms about disabling security features on your computer, stop reading here.

First, open a Terminal window and make a back-up of the application, in case we break something:

cd /Applications

ditto TextEdit.app TextEdit.backup.app


Now, we're going to use codesign to force (-f) the application to use a alternate signing identity (-s). The one we'll use is the dash (-) sign identity. This means the code will use an ad-hoc signing identity, which supposedly means that significant restrictions apply (see the man page for codesign ), but it does seem to allow TextEdit to write to a user's directory so it seems like in this case it's significantly unrestricting the app's permissions. Note that when you do this next step, it will reset the preferences for TextEdit. Also note the second dash after the dash-s, "-s-":

sudo codesign -f -s- TextEdit.app

The normal way to disable the new auto-save is the following:

defaults write com.apple.TextEdit ApplePersistence -bool no

But I couldn't get that to work. The only thing I could think of to do was get rid of the lockfile (not sure this part is needed?) and then copy TextEdit's .plist file to a directory where I could write to it, and then copy it back. Note that in this next part, I am putting a copy of the .plist lockfile and the .plist itself into root's home directory (/var/root) before doing things to them:

sudo mv /Library/Preferences/com.apple.TextEdit.plist.lockfile /var/root

sudo cp /Library/Preferences/com.apple.TextEdit.plist /var/root

sudo cp /Library/Preferences/com.apple.TextEdit.plist ~

cd ~

sudo open com.apple.TextEdit.plist


Change ApplePersistence from YES to NO. Save, and go back to the Terminal Window.

sudo mv com.apple.TextEdit.plist /Library/Preferences/

That's it! Now go enjoy your favorite text editor behaving the way it should be. This trick won't work for any other applications (e.g., Keynote); the "Save As..." menu item doesn't reappear when you disable the ApplePersistence.

[kirkmc adds: I haven't tested this. The warning at the beginning should be sufficient for anyone squeamish about trying something like this.]
    •    
  • Currently 2.54 / 5
  You rated: 1 / 5 (13 votes cast)
 
[9,138 views]  

Re-enable old style auto-save for TextEdit (with a real "Save As..."). | 14 comments | Create New Account
Click here to return to the 'Re-enable old style auto-save for TextEdit (with a real "Save As...").' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: tclementdev on Dec 18, '12 10:09:36AM

What a mess! Just edit the plist file located at ~/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: astack on Dec 18, '12 12:11:32PM

I'm looking at that file, it doesn't seem to have anything at all to do with what this hint is about.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: tclementdev on Dec 18, '12 12:37:29PM

You said "The normal way to disable the new auto-save is the following: <defaults write com.apple.TextEdit ApplePersistence -bool no> But I couldn't get that to work."
Just add the ApplePersistence entry to the file I mentioned. Try the following command (not tested):

defaults write ~/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit ApplePersistence -bool no



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: astack on Dec 18, '12 01:00:02PM

Ahh okay. Doing that removes the need to mess with the application's global preferences file. All else being equal, that is the safer option.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: tclementdev on Dec 18, '12 01:42:38PM

hmm I think I misunderstood what you were trying to do.
Once you have unsandboxed TextEdit, you are actually looking to edit the preferences from the standard home directory:

defaults write ~/Library/Preferences/com.apple.TextEdit ApplePersistence -bool no

It seems the defaults command is smart enough to look inside the containers directory for sandboxed apps. I didn't know.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: ragnu on Dec 18, '12 10:32:48AM

But with TextEdit, you can do a "save as" (in Mountain Lion). If you hold down the option key, "Duplicate" becomes "Save as", and the "save as" dialog has a box you can check if you want the changes to be saved to the original document as well. Leave it unchecked, and you have the old-fashioned "save as" behavior, unless I'm missing something.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: astack on Dec 18, '12 12:15:46PM

Read the hint again. "Duplicate" is not the same as "Save As..."

*Edit* Ah, I see what you're saying, you can actually revert the old document to the last save. But that's still an extra step that I didn't have to before I was forced to use Mountain Lion. Life was so much easier with Snow Leopard.

Edited on Dec 18, '12 12:21:48PM by astack



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: robleach on Dec 18, '12 02:49:12PM

I totally agree. Life was easier with Snow Leopard.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: Lri on Dec 19, '12 03:44:53AM

If you already have backups, just run these two commands:

sudo codesign -f -s - /Applications/TextEdit.app/
defaults write ~/Library/Preferences/com.apple.TextEdit.plist ApplePersistence -bool false

The normal preference file is ~/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist, which is also modified by defaults write -app textedit. But when you replace the code signature, the default preference file becomes ~/Library/Preferences/com.apple.TextEdit.plist.

Another way to get rid of the error dialogs is to disable the old-style auto save:

defaults write -app textedit ApplePersistence -bool false
defaults write -app textedit AutosavingDelay -int 0


[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: ragnu on Dec 19, '12 05:46:27AM

Dear astack:

Once I've done a "save as" in a given application, leaving the box to save changes to the old document unchecked, the box stays unchecked by default in subsequent "save as"s for that application, so the only extra step involved is holding down the option key to get "save as" instead of "duplicate". I can live with that.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: Storm608 on Dec 19, '12 07:24:17AM

Why not just replace TextEdit 1.7 (Lion) or 1.8 (Mtn.Lion) with the Snow Leopard original (1.6)?

In my case, I kept a boot partition of S/L so I could access some of my old PowerPC apps that required Rosetta and I would reboot into the S/L partition.

I had to change permissions in the Applications folder - added Admin (R&W) and added my own (admin) user -read and write. I then deleted every other authorized user except Everyone - read only. The permission list becomes (user) read and write, Admin read and write and Everyone read only. You can't alter the contents of the folder until you make those changes.

I then moved the file TextEdit to the Desktop which changed it's ownership and then deleted the file (emptying the trash). I then just copied the earlier version of TextEdit into the Applications folder.

That seems to have worked fine. It does Auto-save, gives you the true Save-As and also restores the original Fine and Replace window which was much easier to navigate then the miniature add-on bar that appeared with 1.7 Lion.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: baltwo on Dec 19, '12 04:38:53PM

'Tis simpler just to use Snow Leopards's TextEdit vers 1.6 and be done with the sandboxed nonsense and Apple's changes.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: MentalColic on Dec 21, '12 12:09:55PM

Wow, isn't it easier to just hold down the <option> key while in the File menu to activate the built-in "Save-As" instead of Duplicate? All of this editing and copying seems extreme to save a single keystroke.



[ Reply to This | # ]
Re-enable old style auto-save for TextEdit (with a real "Save As...").
Authored by: kickingfog on Sep 13, '13 02:04:29PM

It is nice that the Option Key can be invoked but I'm so used to selecting three keys to do a Save As. I've made way to many unwanted Duplicates that then have to be deleted and also told, No I don't want you! Adding a forth finger for the keyboard shortcut is not easy, I've been doing Command-Shift-S for something like 25 years.

Please have a look at these instructions for fixing this issue without the use of Terminal.

https://discussions.apple.com/message/21502741#21502741

10.8 behaves more like 10.6, it works, and I'm happy again.



[ Reply to This | # ]