all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34479: Incorrect classification of messages in compilation-mode buffer
@ 2019-02-14 16:00 Daniel Lopez
  2019-02-14 16:05 ` Daniel Lopez
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Lopez @ 2019-02-14 16:00 UTC (permalink / raw)
  To: 34479

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Reproduce:

- Open the attached test program compilation_test.c in Emacs
- M-x compile
- Enter compile command "gcc -c compilation_test.c"

In the resulting *compilation* buffer, there should be a mixture of 
"error", "warning" and "note" messages. Trouble is they're all parsed as 
errors - hence they're all coloured in red, and querying any one's type 
by moving point onto it and evaluating "(compilation--message->type 
(get-text-property (point) 'compilation-message))" always returns 2, 
though warnings should return 1 and notes should return 0. Commands that 
jump between previous/next error also behave correspondingly wrongly.

Fix:

The attached fix_compilation_message_type.patch, applied to Git master, 
fixes it for me.

It seems like the old code was accidentally using the same variable for 
the TYPE field of the current rule from compilation-error-regexp-alist, 
and in an inner loop, the actual type that the current message from the 
compilation buffer was resolved to be, so the resolved type of the first 
message tends to get carried down into the following ones.

Daniel

[-- Attachment #2: compilation_test.c --]
[-- Type: text/x-csrc, Size: 165 bytes --]


int main(int argc, char ** argv)
{
    int v = something;

    int w = something_else;

    int x = 4/0;

    #define MM w[10]
    int y = MM;

    return "abc";
}

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-01 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 16:00 bug#34479: Incorrect classification of messages in compilation-mode buffer Daniel Lopez
2019-02-14 16:05 ` Daniel Lopez
2019-02-15  8:02   ` Eli Zaretskii
2019-02-25 13:26     ` Tobias Bading
2019-02-25 16:03       ` Daniel Lopez
2019-03-01 10:07       ` Eli Zaretskii

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.