At the beginning of this week, I accidentally closed my TextEdit, and forgot that I actually still need the txt file that I have just created.
After looking around on Google, and try one by one method (example looking in a directory of Library like this here) that I have found, this one actually works for me.
I am not sure with a .rtf file, but this at least works with .txt file.
Steps (you have to have your Time Machine on or connected):
1. Open TextEdit. It’s inside your “Applications” directory, or you can search on your Spotlight. Type on something in your new document. It can be dummy text, or anything just anything, otherwise, the Time Machine will show you a Finder window.
2. Then on the right-top of your desktop, click on Time Machine icon, click “Enter Time Machine”
3. Look for the documents you still need, and when you are done, click “Restore”. Click image to enlarge.
I hope you can still retrieve unsaved TextEdit files (.txt) with this method.