[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error message not recognized in compilation buffer
From: |
Richard Copley |
Subject: |
Re: Error message not recognized in compilation buffer |
Date: |
Fri, 21 Jun 2019 10:38:18 +0100 |
On Thu, 20 Jun 2019 at 08:25, Pascal Quesseveur <pquessev@gmail.com> wrote:
I am using ant under emacs on Windows (version 24.3) to compile Pascal
source codes with Delphi compiler. When an error occurs it is not
identified as an error in the compilation buffer. Error message is:
TestEnum.dpr(24) Error: E2029 ',' or ':' expected but '(' found
There is a regexp for borland in compilation-error-regexp-alist-alist
that seems to match the error message but I don't understand how it is
supposed to work.
I would be glad if someone could explain the matching of the
compilation error messages.
Have you already seen the explanation in the docstring for
"compilation-error-regexp-alist"? It might also be useful to look
at the existing regexps (compilation-error-regexp-alist-alist)
the sample file "etc/compilation.txt" in the Emacs distribution.
It turns out there's a note in the sample file that the predefined
regexp for borland is for "Borland C++, C++Builder".
An error specification matching your example might look something
like this:
("^\\([a-zA-Z]?:?[^:() \t\n]+\\)(\\([0-9]+\\)) \
\\(?:Error\\|\\(Warning\\)\\|\\(Hint\\)\\):" 1 2 nil (3 . 4))
Use M-x customize-variable to add it to compilation-error-regexp-alist
making sure to choose 'Error specification', not 'Predefined symbol',
from the Value Menu.