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

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

bug#18109: 24.4.50; `compilation-error-regexp-alist-alist': wrong regexp


From: Lars Ingebrigtsen
Subject: bug#18109: 24.4.50; `compilation-error-regexp-alist-alist': wrong regexp for Maven
Date: Wed, 09 Sep 2020 13:16:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Filipp Gunbin <fgunbin@fastmail.fm> writes:

> it does not catch these, which Maven emits sometimes:
>
> [ERROR]
> D:\cygwin\root\my-project\src\main\java\my\project\controllers\MainController.java:[21,1]
> error: cannot find symbol
> [ERROR]   symbol: class Controller
>
> My version catches both.

There wasn't much of a follow-up on this afterwards (six years ago), but
this regexp was rewritten to use rx this year:

    (maven
     ;; Maven is a popular free software build tool for Java.
     ,(rx bol
          ;; It is unclear whether the initial [type] tag is always present.
          (? "["
             (or "ERROR" (group-n 1 "WARNING") (group-n 2 "INFO"))
             "] ")
          (group-n 3                    ; File
                   (not (any "\n ["))
                   (* (or (not (any "\n :"))
                          (: " " (not (any "\n/-")))
                          (: ":" (not (any "\n ["))))))
          ":["
          (group-n 4 (+ digit))         ; Line
          ","
          (group-n 5 (+ digit))         ; Column
          "] ")
     3 4 5 (1 . 2))

Looking at the new version, it does seem more similar to the proposed
patch than it was before the rewrite.

So does this work satisfactorily now (i.e., in Emacs 28)?

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





reply via email to

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