2015-04-12 4:53 GMT+01:00 Stefan Monnier >> Maybe only print to the compilation buffer, or only message when the >> command was called interactively. > > Changing the behavior based on whether the call is interactive > sounds like a good solution. > > > Stefan Ok, I've pushed some general changes that should make the Package Menu a lot more silent when operating in the background. Let me know if any are not appropriate. - The byte-compiler will now avoid messaging if all is going well, unless one of its entry commands was called interactively. - autoloads.el wasn't changed. But, in order to silence it, package.el let-binds `noninteractive' around the call to update-directory-autoloads. However, not everything was easy. In particular - Some messages happened very far from package.el. For instance, when we call customize-save-variable, that calls another function, which calls save-buffer. That will then chain through several other functions, with a few calls to message scattered around. The only sane way I found of silencing these messages was to introduce a global variable: `save-silently'. (Should this be documented anywhere?) The current behavior is to send (message nil) after every message, so that it is still printed to the messages buffer without showing up in the minibuffer. That can be changed, if desired, to prevent the message completely. - When saving buffers, there are some calls to write-region that are completely unsilenceable (because of a limitation of write-region's horribly overloaded VISIT argument). In these cases, I still managed to hide the message by doing (message nil) immediately afterwards, but there's no way to completely prevent them without changing write-region itself. Cheers, Artur