GNU bug report logs - #25354
25.1.90; show number of errors and warnings in *compilation* mode line

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Wed, 4 Jan 2017 11:49:01 UTC

Severity: wishlist

Found in version 25.1.90

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25354 in the body.
You can then email your comments to 25354 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25354; Package emacs. (Wed, 04 Jan 2017 11:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom Tromey <tom <at> tromey.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Jan 2017 11:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.90; show number of errors and warnings in *compilation* mode line
Date: Wed, 04 Jan 2017 04:47:54 -0700
It would be nice if Emacs could show the current number of errors and
warnings in the mode line of the *compilation* buffer.  That way when
running a long compile I wouldn't have to search for the buffer or wait
for next-error to report that there is nothing.



In GNU Emacs 25.1.90.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9)
 of 2016-12-15 built on pokyo
Repository revision: 467768f64ee109fe127619e75fee7f3b5de1fec1
Windowing system distributor 'Fedora Project', version 11.0.11804000
System Description:	Fedora release 24 (Twenty Four)

Configured using:
 'configure --prefix=/home/tromey/Emacs/install
 --with-file-notifications=no'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: C++/l

Minor modes in effect:
  compilation-in-progress: (compilation)
  erc-spelling-mode: t
  erc-truncate-mode: t
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  flyspell-mode: t
  which-function-mode: t
  projectile-global-mode: t
  projectile-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-netsplit-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: tromey-c++-do-auto-fill
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
Mark saved where search started
~/firefox-git/gecko/obj-x86_64-pc-linux-gnu/dist/include/js/GCAPI.h and /home/tromey/firefox-git/gecko/js/public/GCAPI.h are the same file
Making completion list... [2 times]
Quit [2 times]
Mark set
Saving file /home/tromey/firefox-git/gecko/js/public/GCAPI.h...
Wrote /home/tromey/firefox-git/gecko/js/public/GCAPI.h
Quit
Undo!
Mark saved where search started

Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/25.1.90/lisp/play/bubbles

Features:
(pcmpl-unix pcmpl-gnu gnus-draft shadow emacsbug debug ffap conf-mode
css-mode descr-text gud eieio-opt speedbar sb-image ezimage dframe
vc-annotate macros dwarf-mode rust-mode doctor gnus-fun find-dired dxr
tabify man perl-mode sh-script smie executable smerge-mode etags xref
project git-commit-mode find-file js sgml-mode iso-transl mailalias
bbdb-sc supercite regi mail-hist nnir idutils python tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize git-rebase-mode
derived term/xterm xterm org-element org-rmail org-mhe org-irc org-info
org-gnus org-docview doc-view jka-compr image-mode org-bibtex bibtex
org-bbdb org-w3m org org-macro org-footnote org-pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs log-view gnus-html
url-cache mm-url shr-color url-http url url-proxy url-privacy
url-history url-auth url-cookie url-domsuf url-gw url-expand url-methods
url-util url-parse url-vars shr dom browse-url erc-spelling erc-truncate
bbdb-gui bbdb-hooks bbdb-rmail rmailsum rmail vc-mtn vc-hg sort smiley
gnus-cite flow-fill mm-archive gnus-async gnus-bcklg qp gnus-ml
disp-table gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus bbdb-snarf
mail-extr bbdb-com network-stream nsm starttls gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-registry
registry eieio-compat eieio-base gnus-art mm-uu mml2015 mm-view
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo smtpmail
sendmail gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
gnus-ems nnheader dabbrev log-edit message idna rfc822 mml mml-sec epg
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util
copyright misearch multi-isearch add-log bug-reference vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs vc-git diff-mode cc-mode cc-fonts cc-guess
cc-menus cc-cmds shell flyspell ispell diminish appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu edmacro
kmacro projectile grep compile ibuf-ext ibuffer minimap autorevert
filenotify desktop frameset cus-start cus-load erc-notify
erc-desktop-notifications notifications dbus xml erc-services erc-list
erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete
erc-track erc-match erc-netsplit erc-hl-nicks easy-mmode color
erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend
erc-compat format-spec auth-source cl-seq eieio gnus-util mm-util
help-fns mail-prsvr password-cache thingatpt pp status dired-aux dired-x
dired warnings advice vc-dir ewoc vc vc-dispatcher flycheck json map
find-func rx subr-x dash cc-styles cc-align cc-engine cc-vars cc-defs
bbdb cl timezone ange-ftp comint ansi-color ring server savehist
finder-inf bbdb-autoloads dwarf-mode-autoloads eieio-core cl-macs
lisppaste-autoloads pydoc-info-autoloads info-look weblogger-autoloads
info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 5010993 2723694)
 (symbols 48 148758 374)
 (miscs 40 49984 30266)
 (strings 32 1371736 787848)
 (string-bytes 1 59337604)
 (vectors 16 169119)
 (vector-slots 8 4039104 233482)
 (floats 8 1145 2574)
 (intervals 56 362672 4574)
 (buffers 976 783)
 (heap 1024 612470 397071))

Tom




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25354; Package emacs. (Sun, 05 Mar 2017 17:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 25354 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: 25354 <at> debbugs.gnu.org
Subject: patch for this bug
Date: Sun, 05 Mar 2017 10:50:18 -0700
[Message part 1 (text/plain, inline)]
This implements the feature requested here: it counts errors, warnings,
and informational messages as they are parsed, and then updates the mode
line with this information.

Let me know what you think.

Tom

[P (text/x-patch, inline)]
commit 0b9197ba7d79fef88781b097086e188c356e22a0
Author: Tom Tromey <tom <at> tromey.com>
Date:   Sun Mar 5 10:48:41 2017 -0700

    Show number of errors in compilation-mode mode-line
    
    Bug#25354
    * lisp/progmodes/compile.el (compilation-num-errors-found): Provide
    default value.
    (compilation-num-warnings-found, compilation-num-infos-found): New
    defvars.
    (compilation-mode-line-errors): New defconst.
    (compilation-face): Remove.
    (compilation-type, compilation--note-type): New functions.
    (compilation-parse-errors): Call compilation--note-type.
    (compilation-start): Include compilation-mode-line-errors in
    mode-line-process.
    (compilation-setup): Initialize compilation-num-* variables to 0.
    (compilation-handle-exit): Include compilation-mode-line-errors in
    mode-line-process.

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d35388e..6520ea4 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -127,7 +127,21 @@ compilation-error
 (defvar compilation-arguments nil
   "Arguments that were given to `compilation-start'.")
 
-(defvar compilation-num-errors-found)
+(defvar compilation-num-errors-found 0)
+(defvar compilation-num-warnings-found 0)
+(defvar compilation-num-infos-found 0)
+
+(defconst compilation-mode-line-errors
+  '(" [" (:propertize (:eval (int-to-string compilation-num-errors-found))
+                      face compilation-error
+                      help-echo "Number of errors so far")
+    " " (:propertize (:eval (int-to-string compilation-num-warnings-found))
+                     face compilation-warning
+                     help-echo "Number of warnings so far")
+    " " (:propertize (:eval (int-to-string compilation-num-infos-found))
+                     face compilation-info
+                     help-echo "Number of informational messages so far")
+    "]"))
 
 ;; If you make any changes to `compilation-error-regexp-alist-alist',
 ;; be sure to run the ERT test in test/lisp/progmodes/compile-tests.el.
@@ -884,10 +898,10 @@ compilation-skip-visited
   :group 'compilation
   :version "22.1")
 
-(defun compilation-face (type)
-  (or (and (car type) (match-end (car type)) compilation-warning-face)
-      (and (cdr type) (match-end (cdr type)) compilation-info-face)
-      compilation-error-face))
+(defun compilation-type (type)
+  (or (and (car type) (match-end (car type)) 1)
+      (and (cdr type) (match-end (cdr type)) 0)
+      2))
 
 ;;   LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE nil nil)
 
@@ -1332,6 +1346,14 @@ compilation--parse-region
 
     (compilation-parse-errors start end)))
 
+(defun compilation--note-type (type)
+  "Note that a new message with severity TYPE was seen.
+This updates the appropriate variable used by the mode-line."
+  (cl-case type
+    (0 (cl-incf compilation-num-infos-found))
+    (1 (cl-incf compilation-num-warnings-found))
+    (2 (cl-incf compilation-num-errors-found))))
+
 (defun compilation-parse-errors (start end &rest rules)
   "Parse errors between START and END.
 The errors recognized are the ones specified in RULES which default
@@ -1395,14 +1417,17 @@ compilation-parse-errors
                              file line end-line col end-col (or type 2) fmt))
 
             (when (integerp file)
+              (setq type (if (consp type)
+                             (compilation-type type)
+                           (or type 2)))
+              (compilation--note-type type)
+
               (compilation--put-prop
                file 'font-lock-face
-               (if (consp type)
-                   (compilation-face type)
-                 (symbol-value (aref [compilation-info-face
-                                      compilation-warning-face
-                                      compilation-error-face]
-                                     (or type 2))))))
+               (symbol-value (aref [compilation-info-face
+                                    compilation-warning-face
+                                    compilation-error-face]
+                                   type))))
 
             (compilation--put-prop
              line 'font-lock-face compilation-line-face)
@@ -1766,7 +1791,8 @@ compilation-start
 						       outbuf command))))
               ;; Make the buffer's mode line show process state.
               (setq mode-line-process
-                    '(:propertize ":%s" face compilation-mode-line-run))
+                    '((:propertize ":%s" face compilation-mode-line-run)
+                      compilation-mode-line-errors))
 
               ;; Set the process as killable without query by default.
               ;; This allows us to start a new compilation without
@@ -1795,7 +1821,8 @@ compilation-start
 	  (message "Executing `%s'..." command)
 	  ;; Fake mode line display as if `start-process' were run.
 	  (setq mode-line-process
-		'(:propertize ":run" face compilation-mode-line-run))
+		'((:propertize ":run" face compilation-mode-line-run)
+                  compilation-mode-line-errors))
 	  (force-mode-line-update)
 	  (sit-for 0)			; Force redisplay
 	  (save-excursion
@@ -2104,6 +2131,9 @@ compilation-setup
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
+  (setq-local compilation-num-errors-found 0)
+  (setq-local compilation-num-warnings-found 0)
+  (setq-local compilation-num-infos-found 0)
   (set (make-local-variable 'overlay-arrow-string) "")
   (setq next-error-overlay-arrow-position nil)
   (add-hook 'kill-buffer-hook
@@ -2193,16 +2223,18 @@ compilation-handle-exit
     (add-text-properties omax (point)
 			 (append '(compilation-handle-exit t) nil))
     (setq mode-line-process
-	  (let ((out-string (format ":%s [%s]" process-status (cdr status)))
-		(msg (format "%s %s" mode-name
-			     (replace-regexp-in-string "\n?$" ""
-                                                       (car status)))))
-	    (message "%s" msg)
-	    (propertize out-string
-			'help-echo msg
-			'face (if (> exit-status 0)
-				  'compilation-mode-line-fail
-				'compilation-mode-line-exit))))
+          (list
+           (let ((out-string (format ":%s [%s]" process-status (cdr status)))
+                 (msg (format "%s %s" mode-name
+                              (replace-regexp-in-string "\n?$" ""
+                                                        (car status)))))
+             (message "%s" msg)
+             (propertize out-string
+                         'help-echo msg
+                         'face (if (> exit-status 0)
+                                   'compilation-mode-line-fail
+                                 'compilation-mode-line-exit)))
+           compilation-mode-line-errors))
     ;; Force mode line redisplay soon.
     (force-mode-line-update)
     (if (and opoint (< opoint omax))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25354; Package emacs. (Sun, 05 Mar 2017 20:02:02 GMT) Full text and rfc822 format available.

Message #11 received at 25354 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tom Tromey <tom <at> tromey.com>
Cc: 25354 <at> debbugs.gnu.org
Subject: Re: bug#25354: patch for this bug
Date: Sun, 05 Mar 2017 22:00:51 +0200
> From: Tom Tromey <tom <at> tromey.com>
> Date: Sun, 05 Mar 2017 10:50:18 -0700
> 
> This implements the feature requested here: it counts errors, warnings,
> and informational messages as they are parsed, and then updates the mode
> line with this information.
> 
> Let me know what you think.

Thanks.  This should be mentioned in NEWS, and the user manual needs
an update.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25354; Package emacs. (Sun, 06 Aug 2017 04:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 25354 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25354 <at> debbugs.gnu.org, Tom Tromey <tom <at> tromey.com>
Subject: Re: bug#25354: patch for this bug
Date: Sat, 05 Aug 2017 22:25:14 -0600
>>>>> "Eli" == Eli Zaretskii <eliz <at> gnu.org> writes:

Eli> Thanks.  This should be mentioned in NEWS, and the user manual needs
Eli> an update.

How about this?

Tom

commit 4cf134bf68e374df32876b411dd0c31c6bcde85e
Author: Tom Tromey <tom <at> tromey.com>
Date:   Sun Mar 5 10:48:41 2017 -0700

    Show number of errors in compilation-mode mode-line
    
    Bug#25354
    * lisp/progmodes/compile.el (compilation-num-errors-found): Provide
    default value.
    (compilation-num-warnings-found, compilation-num-infos-found): New
    defvars.
    (compilation-mode-line-errors): New defconst.
    (compilation-face): Remove.
    (compilation-type, compilation--note-type): New functions.
    (compilation-parse-errors): Call compilation--note-type.
    (compilation-start): Include compilation-mode-line-errors in
    mode-line-process.
    (compilation-setup): Initialize compilation-num-* variables to 0.
    (compilation-handle-exit): Include compilation-mode-line-errors in
    mode-line-process.
    * doc/emacs/building.texi (Compilation): Document new feature.

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index f7eb8fe..cc79eae 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -90,6 +90,10 @@ Compilation
 remains fixed while compilation output is added at the end of the
 buffer.
 
+  While compilation proceeds, the mode line is updated to show the
+number of errors, warnings, and informational messages that have been
+seen so far.
+
 @cindex compilation buffer, keeping point at end
 @vindex compilation-scroll-output
   If you change the variable @code{compilation-scroll-output} to a
diff --git a/etc/NEWS b/etc/NEWS
index b72793d..9d092db 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -732,6 +732,11 @@ where to place point after C-c M-r and C-c M-s.
 *** Messages from CMake are now recognized.
 
 +++
+*** The number of errors, warnings, and informational messages is now
+displayed in the mode line.  These are updated as compilation
+proceeds.
+
++++
 *** A new option 'dired-always-read-filesystem' default to nil.
 If non-nil, buffers visiting files are reverted before search them;
 for instance, in 'dired-mark-files-containing-regexp' a non-nil value
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 31ec5a6..f0935cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -127,7 +127,21 @@ compilation-error
 (defvar compilation-arguments nil
   "Arguments that were given to `compilation-start'.")
 
-(defvar compilation-num-errors-found)
+(defvar compilation-num-errors-found 0)
+(defvar compilation-num-warnings-found 0)
+(defvar compilation-num-infos-found 0)
+
+(defconst compilation-mode-line-errors
+  '(" [" (:propertize (:eval (int-to-string compilation-num-errors-found))
+                      face compilation-error
+                      help-echo "Number of errors so far")
+    " " (:propertize (:eval (int-to-string compilation-num-warnings-found))
+                     face compilation-warning
+                     help-echo "Number of warnings so far")
+    " " (:propertize (:eval (int-to-string compilation-num-infos-found))
+                     face compilation-info
+                     help-echo "Number of informational messages so far")
+    "]"))
 
 ;; If you make any changes to `compilation-error-regexp-alist-alist',
 ;; be sure to run the ERT test in test/lisp/progmodes/compile-tests.el.
@@ -886,10 +900,10 @@ compilation-skip-visited
   :group 'compilation
   :version "22.1")
 
-(defun compilation-face (type)
-  (or (and (car type) (match-end (car type)) compilation-warning-face)
-      (and (cdr type) (match-end (cdr type)) compilation-info-face)
-      compilation-error-face))
+(defun compilation-type (type)
+  (or (and (car type) (match-end (car type)) 1)
+      (and (cdr type) (match-end (cdr type)) 0)
+      2))
 
 ;;   LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE nil nil)
 
@@ -1334,6 +1348,14 @@ compilation--parse-region
 
     (compilation-parse-errors start end)))
 
+(defun compilation--note-type (type)
+  "Note that a new message with severity TYPE was seen.
+This updates the appropriate variable used by the mode-line."
+  (cl-case type
+    (0 (cl-incf compilation-num-infos-found))
+    (1 (cl-incf compilation-num-warnings-found))
+    (2 (cl-incf compilation-num-errors-found))))
+
 (defun compilation-parse-errors (start end &rest rules)
   "Parse errors between START and END.
 The errors recognized are the ones specified in RULES which default
@@ -1397,14 +1419,17 @@ compilation-parse-errors
                              file line end-line col end-col (or type 2) fmt))
 
             (when (integerp file)
+              (setq type (if (consp type)
+                             (compilation-type type)
+                           (or type 2)))
+              (compilation--note-type type)
+
               (compilation--put-prop
                file 'font-lock-face
-               (if (consp type)
-                   (compilation-face type)
-                 (symbol-value (aref [compilation-info-face
-                                      compilation-warning-face
-                                      compilation-error-face]
-                                     (or type 2))))))
+               (symbol-value (aref [compilation-info-face
+                                    compilation-warning-face
+                                    compilation-error-face]
+                                   type))))
 
             (compilation--put-prop
              line 'font-lock-face compilation-line-face)
@@ -1768,7 +1793,8 @@ compilation-start
 						       outbuf command))))
               ;; Make the buffer's mode line show process state.
               (setq mode-line-process
-                    '(:propertize ":%s" face compilation-mode-line-run))
+                    '((:propertize ":%s" face compilation-mode-line-run)
+                      compilation-mode-line-errors))
 
               ;; Set the process as killable without query by default.
               ;; This allows us to start a new compilation without
@@ -1797,7 +1823,8 @@ compilation-start
 	  (message "Executing `%s'..." command)
 	  ;; Fake mode line display as if `start-process' were run.
 	  (setq mode-line-process
-		'(:propertize ":run" face compilation-mode-line-run))
+		'((:propertize ":run" face compilation-mode-line-run)
+                  compilation-mode-line-errors))
 	  (force-mode-line-update)
 	  (sit-for 0)			; Force redisplay
 	  (save-excursion
@@ -2106,6 +2133,9 @@ compilation-setup
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
+  (setq-local compilation-num-errors-found 0)
+  (setq-local compilation-num-warnings-found 0)
+  (setq-local compilation-num-infos-found 0)
   (set (make-local-variable 'overlay-arrow-string) "")
   (setq next-error-overlay-arrow-position nil)
   (add-hook 'kill-buffer-hook
@@ -2195,16 +2225,18 @@ compilation-handle-exit
     (add-text-properties omax (point)
 			 (append '(compilation-handle-exit t) nil))
     (setq mode-line-process
-	  (let ((out-string (format ":%s [%s]" process-status (cdr status)))
-		(msg (format "%s %s" mode-name
-			     (replace-regexp-in-string "\n?$" ""
-                                                       (car status)))))
-	    (message "%s" msg)
-	    (propertize out-string
-			'help-echo msg
-			'face (if (> exit-status 0)
-				  'compilation-mode-line-fail
-				'compilation-mode-line-exit))))
+          (list
+           (let ((out-string (format ":%s [%s]" process-status (cdr status)))
+                 (msg (format "%s %s" mode-name
+                              (replace-regexp-in-string "\n?$" ""
+                                                        (car status)))))
+             (message "%s" msg)
+             (propertize out-string
+                         'help-echo msg
+                         'face (if (> exit-status 0)
+                                   'compilation-mode-line-fail
+                                 'compilation-mode-line-exit)))
+           compilation-mode-line-errors))
     ;; Force mode line redisplay soon.
     (force-mode-line-update)
     (if (and opoint (< opoint omax))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25354; Package emacs. (Mon, 07 Aug 2017 16:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 25354 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tom Tromey <tom <at> tromey.com>
Cc: 25354 <at> debbugs.gnu.org
Subject: Re: bug#25354: patch for this bug
Date: Mon, 07 Aug 2017 19:29:29 +0300
> From: Tom Tromey <tom <at> tromey.com>
> Cc: Tom Tromey <tom <at> tromey.com>,  25354 <at> debbugs.gnu.org
> Date: Sat, 05 Aug 2017 22:25:14 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> Eli> Thanks.  This should be mentioned in NEWS, and the user manual needs
> Eli> an update.
> 
> How about this?

Fine with me, thanks.




Reply sent to Tom Tromey <tom <at> tromey.com>:
You have taken responsibility. (Sun, 27 Aug 2017 19:17:02 GMT) Full text and rfc822 format available.

Notification sent to Tom Tromey <tom <at> tromey.com>:
bug acknowledged by developer. (Sun, 27 Aug 2017 19:17:02 GMT) Full text and rfc822 format available.

Message #22 received at 25354-done <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: 25354-done <at> debbugs.gnu.org
Subject: doneu
Date: Sun, 27 Aug 2017 12:59:22 -0600
The fix was committed a while ago.

Tom




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 25 Sep 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.