From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36564: 27.0.50; Wrong number of errors in compilation mode-line Date: Tue, 09 Jul 2019 23:25:15 +0300 Organization: LINKOV.NET Message-ID: <871ryzhskw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="267701"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 36564@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 22:39:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkwtP-0017Tx-Pe for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 22:39:16 +0200 Original-Received: from localhost ([::1]:55970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkwtO-0005x8-QN for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 16:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59339) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkwsH-0005H3-Ek for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkwsG-0008LU-B5 for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:38:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53773) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkwsE-0008Jf-8M for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkwsE-0006NK-4v for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 20:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36564 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156270464924464 (code B ref -1); Tue, 09 Jul 2019 20:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jul 2019 20:37:29 +0000 Original-Received: from localhost ([127.0.0.1]:34361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkwrh-0006MV-8T for submit@debbugs.gnu.org; Tue, 09 Jul 2019 16:37:29 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkwrf-0006MO-96 for submit@debbugs.gnu.org; Tue, 09 Jul 2019 16:37:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58863) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkwrc-00050V-Ua for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:37:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkwrX-0007oe-Sa for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:37:22 -0400 Original-Received: from anteater.elm.relay.mailchannels.net ([23.83.212.3]:7511) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkwrR-0007i8-4D for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:37:13 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C3A521A20E9 for ; Tue, 9 Jul 2019 20:37:09 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-96-14-124.trex.outbound.svc.cluster.local [100.96.14.124]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5AB621A2297 for ; Tue, 9 Jul 2019 20:37:09 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Tue, 09 Jul 2019 20:37:09 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Attack-Bored: 0c6d559b614a34a0_1562704629620_4063367151 X-MC-Loop-Signature: 1562704629619:2360681121 X-MC-Ingress-Time: 1562704629619 Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id 40D7883DD5 for ; Tue, 9 Jul 2019 13:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=v5sNC9R3Jq/kpC+vHWz1b/LAVi8=; b=LYGtwVJdl3Fsb46tx 59Ri29DOnwwtpre1sFyL1e7hA07ujiGZJ6jcKrGjAWP8fT7aUeSy1mIpuH02HLqY NJfGVOPPYjYlhpAzFBXk6h17JqAOSkmNy26urvRDZvH36uKyyhZ5NBVxPshqxOY7 p3pk6CqOMiq4+8dKj846xsBcIc= Original-Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPSA id 08A4383DC2 for ; Tue, 9 Jul 2019 13:37:00 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a78 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgeefgdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrdduvdejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledruddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:162552 Archived-At: --=-=-= Content-Type: text/plain Often compilation-mode displays wrong number of errors in the mode-line even when compilation is finished. compilation-mode is based on font-lock, so when the *compilation* buffer is not displayed during compilation, some parts of this buffer that contain error messages are not fontified, and thus these errors are not counted. This patch ensures the correct number of errors is displayed on the mode-line: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=compilation-handle-exit-font-lock-ensure.patch diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1a0d9bdbb7..a28e5f6068 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2179,6 +2182,8 @@ compilation-handle-exit ;; Prevent that message from being recognized as a compilation error. (add-text-properties omax (point) (append '(compilation-handle-exit t) nil)) + ;; Update the number of errors in compilation-mode-line-errors + (font-lock-ensure) (setq mode-line-process (list (let ((out-string (format ":%s [%s]" process-status (cdr status))) --=-=-=--