From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#20445: excessive redisplay / echo area resizing during byte-compilation Date: Wed, 29 Apr 2015 09:56:09 +0100 Message-ID: References: <7cfv7lxnpr.fsf@fencepost.gnu.org> <83sibkuvze.fsf@gnu.org> <55408425.5020409@gmx.at> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430297841 9855 80.91.229.3 (29 Apr 2015 08:57:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2015 08:57:21 +0000 (UTC) Cc: 20445 <20445@debbugs.gnu.org> To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 29 10:57:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YnNnr-0002Oe-Ld for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 10:57:11 +0200 Original-Received: from localhost ([::1]:37807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNnr-0001JN-3r for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 04:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNnm-0001E0-4K for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:57:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnNni-0007qp-Tc for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:57:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNni-0007qY-Qy for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YnNni-0003be-9h for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2015 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20445 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20445-submit@debbugs.gnu.org id=B20445.143029777813804 (code B ref 20445); Wed, 29 Apr 2015 08:57:02 +0000 Original-Received: (at 20445) by debbugs.gnu.org; 29 Apr 2015 08:56:18 +0000 Original-Received: from localhost ([127.0.0.1]:55574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnNmz-0003aY-E2 for submit@debbugs.gnu.org; Wed, 29 Apr 2015 04:56:17 -0400 Original-Received: from mail-la0-f51.google.com ([209.85.215.51]:32959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnNmw-0003aK-Uu for 20445@debbugs.gnu.org; Wed, 29 Apr 2015 04:56:15 -0400 Original-Received: by layy10 with SMTP id y10so15005270lay.0 for <20445@debbugs.gnu.org>; Wed, 29 Apr 2015 01:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=K4pBYEqIvfdL1yNnahkOVhDjAVWRY34Vu03QGfKbOXw=; b=qtbsLUJpJ3EMLDU+3fVuASC2BH11aMuB2EwGXnuaEjvGyUY97jqQD7a3xVrHuF1a/c AAY2ta8RaJR708uEHwXphxv/7VDpEx1g05ANLMHQeo8PDCCu0jURKZUBW12tZrM9JTZD CnaW+J+bQUfTPOcV6Nd0A4DlophG7A6LFcA53IAczQIcBIiKM5xD2+Za/jSOlXTkP9PW 2iV7Q/mlIfT5PZ0BEomCBts4B4ecs9JHhoidUsqwtmZE2c2DlOZou5Pg+I4PhfKLQH6T 37/qMoPCdK3/a+oL41TjnBduHZ3Uh2fprMWqfLXHl06In9+ijmIOtmPF97GySigV02Ff CsYg== X-Received: by 10.152.203.233 with SMTP id kt9mr14204890lac.21.1430297769120; Wed, 29 Apr 2015 01:56:09 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Wed, 29 Apr 2015 01:56:09 -0700 (PDT) In-Reply-To: <55408425.5020409@gmx.at> X-Google-Sender-Auth: n3kof9u97c3YPPh1vt1CS0lllxM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102210 Archived-At: 2015-04-29 8:11 GMT+01:00 martin rudalics : >> This is the problem: in order to "not emit a message" this code emits >> the message and then immediately hides it by emitting "the empty >> message" on top of it. >> >> Since `message' redisplays right away (rather than waiting for the next >> "idle" moment to perform redisplay, as is the case for normal buffer >> changes), this result in a lot of wasted work, and it won't truly do >> what was intended: >> - If your machine/display is slow enough, you will see it >> - If your system "prints" messages by speaking them out loud (e.g. with >> emacspeak) you will hear them. >> >> Why not just do: >> >> (when byte-compile--interactive >> (apply #'message format args)) >> >> ? > > But if there are no errors this would not display a message at all with > Glenn's scenario. IMHO `byte-compile--interactive' puts the cart before > the horse. Rather, displaying messages should be the default and the > caller should be able to suppress them via a `byte-compile--no-message' > variable or something the like. So I'd instead use > > (unless byte-compile--no-message > (apply #'message format args))) I just changed the current version to use `inhibit-messages' (sorry, forgot to reference the bug in it). I implemented `byte-compile--message' the way that made more sense to me, but I'm perfectly fine with your suggestion as well. Whatever we end up doing to it, please use `(let ((inhibit-messages byte-compile--no-message) ...)' instead of `(unless byte-compile--no-message ...)', as that will still log the messages somwhere.