My laptop overheated today, failed to wake from sleep, and eventually shut down. I lost some work in TeXShop. If it would auto-save this wouldn’t have been a problem. I’m sure this filthy hack has numerous problems, so please feel free to tell me about them in the comments.
$ defaults write TeXShop KeepBackup YES
- (void)mySaveTimer: (NSNotification *)aNotification;
//At the end of init,
[NSTimer scheduledTimerWithTimeInterval:300.0 // 300 seconds = 5 mins
// At the end of the file
- (void)mySaveTimer: (NSNotification *)aNotification
// [GARETH] Just copy/pasted the content of -saveDocument, and replaced "sender" with "self" in this first line,
[super saveDocument: self];
// if CommandCompletion list is being saved, reload it.
if (!fileIsTex && [[self fileName] isEqualToString:
[[NSApp delegate] finishCommandCompletionConfigure];
“Configuring Run Loop Sources – Configuring Timer Sources”