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?

1 Answer 1


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 every desktop-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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.