I want my documents to be auto-saved, but I don't want to be interrupted with the message "Auto-saving...done" every few minutes.

Is there a way to just disable this message, but not the auto-saving functionality?

I have tried the following without success: https://stackoverflow.com/questions/22511847/how-to-disable-auto-save-message

  • 11
    Although the function do-auto-save admits an argument t to omit the message, in keyboard.c it is called with that argument hardcoded as nil. I suggest you open a bug report so that argument can be customized. – angus May 20 '15 at 19:10

You can ensure do-auto-save is called with the correct argument to suppress the message by advising the function:

(defun my-auto-save-wrapper (save-fn &rest args)
  (apply save-fn '(t)))

(advice-add 'do-auto-save :around #'my-auto-save-wrapper)
  • This does not work (at least on Emacs 24.4.1). As mentioned by @angus, do-auto-save is not taking into account the arguments it receives. – scaramouche May 30 '15 at 0:04
  • @scaramouche: odd as I tested it on the HEAD of the emacs-24 branch and it worked fine. Although I was calling with M-x do-auto-save. – stsquad May 30 '15 at 18:10

because do-auto-save is called by c code here, so advice is not possible here.

we can use an idle timer. following code is tested.

(setq auto-save-list-file-prefix nil)
(setq auto-save-visited-file-name t)
(setq auto-save-timeout 0)
(setq auto-save-interval 0)

(defun my-auto-save-silent ()
  (do-auto-save t))

(run-with-idle-timer 1 t #'my-auto-save-silent)

also, cf. http://tinyurl.com/ydeyn4ks

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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