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: Thu, 11 Jul 2019 01:34:27 +0300 Organization: LINKOV.NET Message-ID: <87ef2xmsct.fsf@mail.linkov.net> References: <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="152977"; 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 Thu Jul 11 00:37:30 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 1hlLDO-000dhY-Ha for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 00:37:30 +0200 Original-Received: from localhost ([::1]:37466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlLDN-0007Ya-JL for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 18:37:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44888) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlLCy-0007MD-RW for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 18:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlLCx-0005b3-E9 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 18:37:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56200) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlLCw-0005Zp-A2 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 18:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlLCw-0004E8-7C for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 18:37: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: Wed, 10 Jul 2019 22:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36564 X-GNU-PR-Package: emacs Original-Received: via spool by 36564-submit@debbugs.gnu.org id=B36564.156279817716187 (code B ref 36564); Wed, 10 Jul 2019 22:37:02 +0000 Original-Received: (at 36564) by debbugs.gnu.org; 10 Jul 2019 22:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:36787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlLCC-0004Cz-RF for submit@debbugs.gnu.org; Wed, 10 Jul 2019 18:36:17 -0400 Original-Received: from cadetblue.birch.relay.mailchannels.net ([23.83.209.28]:27818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlLC8-0004Cn-NB for 36564@debbugs.gnu.org; Wed, 10 Jul 2019 18:36:15 -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 640FE140F90 for <36564@debbugs.gnu.org>; Wed, 10 Jul 2019 22:36:06 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a30.g.dreamhost.com (100-96-92-226.trex.outbound.svc.cluster.local [100.96.92.226]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DDDDA140EDE for <36564@debbugs.gnu.org>; Wed, 10 Jul 2019 22:36:05 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a30.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); Wed, 10 Jul 2019 22:36:06 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Glossy-Harbor: 2b77afad1504c893_1562798166166_3212512667 X-MC-Loop-Signature: 1562798166166:3065334759 X-MC-Ingress-Time: 1562798166166 Original-Received: from pdx1-sub0-mail-a30.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTP id 8143582E4C for <36564@debbugs.gnu.org>; Wed, 10 Jul 2019 15:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=ugCit7LpwkzGHx7rgk/GJn4qMYI=; b= t0s329+zgw2Cg/vOj0jncD9rP4nIy6ntIXI7tDXaksU4EgIc87gQ/uKyv7vSXZKg euOhNs/2jQgZD8nlg+wJ7tzx8qggeK/VEDWrNMwNkh8sxqW0IHI53PvQWX/JUzUL M6csw0U+rife3CisnwpFdZhOeq8VGDI0WUXZcRyCy/0= Original-Received: from mail.jurta.org (m91-129-110-101.cust.tele2.ee [91.129.110.101]) (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-a30.g.dreamhost.com (Postfix) with ESMTPSA id 4504982E4A for <36564@debbugs.gnu.org>; Wed, 10 Jul 2019 15:36:00 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a30 In-Reply-To: <871ryzhskw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 09 Jul 2019 23:25:15 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgeejgdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdduuddtrddutddunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddutddruddtuddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopeefieehieegseguvggssghughhsrdhgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd 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:162665 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: Actually maybe better to count errors not at the end of compilation, but during compilation as output goes: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=compilation-font-lock-ensure.2.patch diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1a0d9bdbb7..7b319e9947 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2245,6 +2250,8 @@ compilation-filter (unless comint-inhibit-carriage-motion (comint-carriage-motion (process-mark proc) (point))) (set-marker (process-mark proc) (point)) + ;; Update the number of errors in compilation-mode-line-errors + (font-lock-ensure compilation-filter-start (point)) ;; (set (make-local-variable 'compilation-buffer-modtime) ;; (current-time)) (run-hooks 'compilation-filter-hook)) --=-=-=--