From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: raman <tv.raman.tv@gmail.com>, emacs-devel <emacs-devel@gnu.org>,
Dmitry Gutov <dgutov@yandex.ru>
Subject: Silencing noise (was: Re: Async package.el)
Date: Sun, 12 Apr 2015 16:20:42 +0100 [thread overview]
Message-ID: <CAAdUY-+nhNvmRZOeQmagmRoO+jr44h767FYtbj=X=EX_GB_a2Q@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2015-04-12 15:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-12 15:20 Artur Malabarba [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAdUY-+nhNvmRZOeQmagmRoO+jr44h767FYtbj=X=EX_GB_a2Q@mail.gmail.com' \
--to=bruce.connor.am@gmail.com \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tv.raman.tv@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.