2

I'm using the super-save package which saves the buffer when an Emacs frame loses focus and it's spamming the minibuffer with 'file written' messages, which gets distracting.

I want to suppress this message in the minibuffer, so it doesn't appear anymore. I've tried to come up with solutions from this answer but I couldn't get it working. The answers also seem to be quite old, which makes me wonder about a more modern solution.

It would be nice if someone could point me in the right direction, specifically for the Doom Emacs distribution using Emacs 27.

Doom saving buffer

1 Answer 1

2

I use the following to hide "Wrote ..." messages. I use regular GNU Emacs though.

(defun sb/inhibit-message-call-orig-fun (orig-fun &rest args)
  "Hide messages appearing in ORIG-FUN, forward ARGS."
  (let ((inhibit-message t))
    (apply orig-fun args)))
(advice-add 'write-region :around #'sb/inhibit-message-call-orig-fun)

I use super-save but I do not see the above messages in my minibuffer. You can give the above snippet a try. If the above does not work, you can try adding the following to the above snippet.

(advice-add 'save-buffer :around #'sb/inhibit-message-call-orig-fun)
1
  • Thank you very much, both snippets combined worked.
    – Hyperfocus
    Commented Dec 29, 2020 at 16:10

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.