bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34479: Incorrect classification of messages in compilation-mode buff


From: Daniel Lopez
Subject: bug#34479: Incorrect classification of messages in compilation-mode buffer
Date: Thu, 14 Feb 2019 16:00:08 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

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: compilation_test.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]