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?

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 for "you probably don't want to do that." auto-save, as @Drew suggests, provides the functionality you probably want. – Dan May 10 '16 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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