* bug#2490: compilation only highlights the "E" of error
@ 2009-02-27 3:29 Glenn Morris
2011-07-10 16:26 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2009-02-27 3:29 UTC (permalink / raw)
To: bug-gnu-emacs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#2490: compilation only highlights the "E" of error
2009-02-27 3:29 bug#2490: compilation only highlights the "E" of error Glenn Morris
@ 2011-07-10 16:26 ` Lars Magne Ingebrigtsen
2011-07-11 21:12 ` Johan Bockgård
0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-10 16:26 UTC (permalink / raw)
To: Glenn Morris; +Cc: 2490
Glenn Morris <rgm@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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#2490: compilation only highlights the "E" of error
2011-07-10 16:26 ` Lars Magne Ingebrigtsen
@ 2011-07-11 21:12 ` Johan Bockgård
2011-07-12 12:29 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Johan Bockgård @ 2011-07-11 21:12 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 2490
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Glenn Morris <rgm@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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#2490: compilation only highlights the "E" of error
2011-07-11 21:12 ` Johan Bockgård
@ 2011-07-12 12:29 ` Lars Magne Ingebrigtsen
2011-07-12 14:42 ` Johan Bockgård
0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-12 12:29 UTC (permalink / raw)
To: 2490
Johan Bockgård <bojohan@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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#2490: compilation only highlights the "E" of error
2011-07-12 12:29 ` Lars Magne Ingebrigtsen
@ 2011-07-12 14:42 ` Johan Bockgård
2011-07-12 14:44 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Johan Bockgård @ 2011-07-12 14:42 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 2490
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Johan Bockgård <bojohan@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))
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-12 14:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 3:29 bug#2490: compilation only highlights the "E" of error Glenn Morris
2011-07-10 16:26 ` Lars Magne Ingebrigtsen
2011-07-11 21:12 ` Johan Bockgård
2011-07-12 12:29 ` Lars Magne Ingebrigtsen
2011-07-12 14:42 ` Johan Bockgård
2011-07-12 14:44 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.