unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Silencing noise (was: Re: Async package.el)
@ 2015-04-12 15:20 Artur Malabarba
  2015-04-12 20:35 ` Silencing noise Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Artur Malabarba @ 2015-04-12 15:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: raman, emacs-devel, Dmitry Gutov

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1994 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-13 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-12 15:20 Silencing noise (was: Re: Async package.el) Artur Malabarba
2015-04-12 20:35 ` Silencing noise Stefan Monnier
2015-04-13  7:50   ` Alexis
2015-04-13 15:16     ` raman
2015-04-13 15:32       ` Eli Zaretskii
2015-04-13 16:46         ` Stefan Monnier
2015-04-13 15:57       ` Stephen J. Turnbull
2015-04-13 16:37         ` T.V Raman
2015-04-13 16:41           ` Eli Zaretskii
2015-04-13 17:07   ` Achim Gratz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).