GNU bug report logs -
#36564
27.0.50; Wrong number of errors in compilation mode-line
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 9 Jul 2019 20:38:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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:
[compilation-handle-exit-font-lock-ensure.patch (text/x-diff, inline)]
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)))
This bug report was last modified 6 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.