GNU bug report logs - #2490
compilation only highlights the "E" of error

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Fri, 27 Feb 2009 03:40:04 UTC

Severity: minor

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

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 2490 in the body.
You can then email your comments to 2490 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2490; Package emacs. (Fri, 27 Feb 2009 03:40:04 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: compilation only highlights the "E" of error
Date: Thu, 26 Feb 2009 22:29:46 -0500
Severity: minor

emacs -Q foo.el, where foo.el contains everything between start and end:

;; start
(setq foo 1)

(
;; end


M-x byte-compile-file RET foo.el RET

The "*Compile-Log*" buffer contains:

 foo.el:1:7:Warning: assignment to free variable `foo'
 foo.el:3:1:Error: End of file during parsing

On the warning line, everything up to and including the "g" in "Warning"
is underlined and has mouse-face.

On the error line, the underline/mouse-face stops at the "E" in error.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2490; Package emacs. (Sun, 10 Jul 2011 16:27:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 2490 <at> debbugs.gnu.org
Subject: Re: compilation only highlights the "E" of error
Date: Sun, 10 Jul 2011 18:26:01 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> emacs -Q foo.el, where foo.el contains everything between start and end:
>
> ;; start
> (setq foo 1)
>
> (
> ;; end
>
> M-x byte-compile-file RET foo.el RET
>
> The "*Compile-Log*" buffer contains:
>
>  foo.el:1:7:Warning: assignment to free variable `foo'
>  foo.el:3:1:Error: End of file during parsing
>
> On the warning line, everything up to and including the "g" in "Warning"
> is underlined and has mouse-face.
>
> On the error line, the underline/mouse-face stops at the "E" in error.

I'm able to reproduce this in Emacs 24, but I'm not able to make any
sense of how compilation mode parses and fontifies the buffer...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2490; Package emacs. (Mon, 11 Jul 2011 21:13:02 GMT) Full text and rfc822 format available.

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

From: Johan Bockgård <bojohan <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 2490 <at> debbugs.gnu.org
Subject: Re: bug#2490: compilation only highlights the "E" of error
Date: Mon, 11 Jul 2011 23:12:40 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Glenn Morris <rgm <at> gnu.org> writes:
>
>> emacs -Q foo.el, where foo.el contains everything between start and end:
>>
>> ;; start
>> (setq foo 1)
>>
>> (
>> ;; end
>>
>> M-x byte-compile-file RET foo.el RET
>>
>> The "*Compile-Log*" buffer contains:
>>
>>  foo.el:1:7:Warning: assignment to free variable `foo'
>>  foo.el:3:1:Error: End of file during parsing
>>
>> On the warning line, everything up to and including the "g" in "Warning"
>> is underlined and has mouse-face.
>>
>> On the error line, the underline/mouse-face stops at the "E" in error.
>
> I'm able to reproduce this in Emacs 24, but I'm not able to make any
> sense of how compilation mode parses and fontifies the buffer...

font-lock-keywords -> compilation--ensure-parse ->
compilation--parse-region -> compilation-parse-errors ->
compilation-error-regexp-alist-alist


The lines in *Compile-Log* are matched by the `gnu' entry in
compilation-error-regexp-alist-alist (try `compilation-debug'):


     "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\|[ \t]+\\(?:in \\|from \\)\\)?\
\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\): ?\
\\([0-9]+\\)\\(?:[.:]\\([0-9]+\\)\\)?\
\\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
                                   ^^^^^^^^^^
 *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\|[Nn]ote\\)\\|\
\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
            ^^^^^^^^
               E(rror)




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 12 Jul 2011 12:30:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 2490 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 12 Jul 2011 12:30:04 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2490; Package emacs. (Tue, 12 Jul 2011 12:34:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: 2490 <at> debbugs.gnu.org
Cc: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#2490: compilation only highlights the "E" of error
Date: Tue, 12 Jul 2011 14:29:15 +0200
Johan Bockgård <bojohan <at> gnu.org> writes:

> font-lock-keywords -> compilation--ensure-parse ->
> compilation--parse-region -> compilation-parse-errors ->
> compilation-error-regexp-alist-alist
>
> The lines in *Compile-Log* are matched by the `gnu' entry in
> compilation-error-regexp-alist-alist (try `compilation-debug'):

Thanks for finding this.  I've now installed a patch that seems to fix
the bug.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2490; Package emacs. (Tue, 12 Jul 2011 14:44:01 GMT) Full text and rfc822 format available.

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

From: Johan Bockgård <bojohan <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 2490 <at> debbugs.gnu.org
Subject: Re: bug#2490: compilation only highlights the "E" of error
Date: Tue, 12 Jul 2011 16:42:58 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Johan Bockgård <bojohan <at> gnu.org> writes:
>
>> font-lock-keywords -> compilation--ensure-parse ->
>> compilation--parse-region -> compilation-parse-errors ->
>> compilation-error-regexp-alist-alist
>>
>> The lines in *Compile-Log* are matched by the `gnu' entry in
>> compilation-error-regexp-alist-alist (try `compilation-debug'):
>
> Thanks for finding this.  I've now installed a patch that seems to fix
> the bug.

The compiler output is classified as error/warning/info based on which
part of the expression that matched (see compilation-error-regexp-alist).
Your change marks "...:Error" as a warning:

--- a/lisp/progmodes/compile.el	2011-07-05 15:31:22 +0000
+++ b/lisp/progmodes/compile.el	2011-07-12 12:28:35 +0000
@@ -251,7 +251,7 @@
 \\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\): ?\
 \\([0-9]+\\)\\(?:[.:]\\([0-9]+\\)\\)?\
 \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
-\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
+\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\|[Ee]rror\\)\\|\
  *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\|[Nn]ote\\)\\|\
 \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
      1 (2 . 4) (3 . 5) (6 . 7))
                         ^^^^^

6th subexpression matches => warning
7th subexpression matches => info
otherwise => error


I installed this patch instead:

=== modified file 'lisp/progmodes/compile.el'
--- lisp/progmodes/compile.el	2011-07-05 15:31:22 +0000
+++ lisp/progmodes/compile.el	2011-07-12 14:14:25 +0000
@@ -253,7 +253,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?
 \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
  *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\|[Nn]ote\\)\\|\
-\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
+ *[Ee]rror\\|\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
      1 (2 . 4) (3 . 5) (6 . 7))




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2490; Package emacs. (Tue, 12 Jul 2011 14:46:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: 2490 <at> debbugs.gnu.org
Subject: Re: bug#2490: compilation only highlights the "E" of error
Date: Tue, 12 Jul 2011 16:44:57 +0200
Johan Bockgård <bojohan <at> gnu.org> writes:

> I installed this patch instead:

Ah, right.  Thanks.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Aug 2011 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 263 days ago.

Previous Next


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