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

Swarnendu Biswas
  • 1,378
  • 1
  • 11
  • 24
Hyperfocus
  • 145
  • 5

1 Answers1

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)
Swarnendu Biswas
  • 1,378
  • 1
  • 11
  • 24