How can I have emacs save my desktop periodically, so it will persist even if I do not exit with C-c C-x
in desktop-save-mode
or save manually?
Ordinarily, one would use a timer to repeat a task at given time intervals. However, the manual node on Saving Emacs Sessions states that:
When
desktop-save-mode
is active and the desktop file exists, Emacs auto-saves it everydesktop-auto-save-timeout
seconds, if that is non-nil
and non-zero.
I found this information by looking in the elisp manual on Desktop Save Mode and following the link to the manual node on Saving Emacs Sessions.