I recently had a Sublime Text user try out Emacs for a while, and he was interested in getting the same auto-save behavior in Emacs.
Basically, he wanted all buffers to be saved whenever the frame lost focus (really saved, not just backed-up). This includes when switching windows to a completely different application.
I could not find any event that was triggered when switching to a different application. Is there such an event or is there another way to achieve the same behavior?
Note a time based solution was not satisfactory, and neither was the default auto backup behavior. He specifically wanted the buffers to be saved (as in
save-buffer) for all files.