1

How can I setup Emacs >= 24.4 so that it saves at least the current file I'm working on automatically, say, each 5 seconds, so that I don't have to press C-x C-s each time to save my changes?

1

1 Answer 1

4

You probably do not want it to save every N sec but to do that only after Emacs has been idle for N sec.

To do that, customize user option auto-save-timeout to the number of seconds, and turn on auto-save-mode.

See the Emacs manual (C-h r), node Auto Save and its children, especially node Auto Save Control.

See also the Elisp manual, node Auto-Saving, which details the user options and functions used for auto-saving.

1
  • +1 for "you probably don't want to do that." auto-save, as @Drew suggests, provides the functionality you probably want.
    – Dan
    Commented May 10, 2016 at 10:47

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.