Subject: Re: bug#56249: 29.0.50; Compilation buffer parsing "ERROR:" incorrectly

From: Mattias Engdegård <[email-masked]>
Date: Wed, 29 Jun 2022 17:43:27 +0200

29 juni 2022 kl. 14.28 skrev Lars Ingebrigtsen <[email-masked]>:

>> What about asking the authors to follow the GNU message format
>> instead? Failing that, a new pattern could be used. It would be much
>> simpler than `gnu`.
> 
> Sure, the latter makes sense.

Thank you, I have now made the `gnu` rule more robust again. It no longer accidentally matches the example given.

Rudolf, I suggest you customise your Emacs by adding something like

  ("^ *ERROR:\\(?1:[^\n:]+\\):\\(?2:[[:digit:]]+\\): " 1 2)

or, equivalently,

   `(,(rx
       bol (* " ") "ERROR:"
       (group-n 1                       ; file
         (+ (not (in ":\n"))))
       ":"
       (group-n 2 (+ digit))            ; line
       ": ")
     1 2)

to `compilation-regexp-alist`. We (that is, I) have no idea what is emitting the message and how stable the format is, so adding it to the standard compilation rule list is a fool's errand. We wouldn't even know what to call it.

If you have deeper knowledge of the tool and how it works then you might want to help us clarify it or even get the message updated to the standard GNU format. Some tools are able to use that format even if they do not emit it by default.