unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Error message not recognized in compilation buffer
@ 2019-06-20  7:25 Pascal Quesseveur
  2019-06-21  9:38 ` Richard Copley
  0 siblings, 1 reply; 3+ messages in thread
From: Pascal Quesseveur @ 2019-06-20  7:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

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.


-- 
Pascal Quesseveur
pquessev@gmail.com




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

* Re: Error message not recognized in compilation buffer
  2019-06-20  7:25 Error message not recognized in compilation buffer Pascal Quesseveur
@ 2019-06-21  9:38 ` Richard Copley
  2019-06-21 10:20   ` Pascal Quesseveur
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Copley @ 2019-06-21  9:38 UTC (permalink / raw)
  To: pquessev; +Cc: help-gnu-emacs

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.


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

* Re: Error message not recognized in compilation buffer
  2019-06-21  9:38 ` Richard Copley
@ 2019-06-21 10:20   ` Pascal Quesseveur
  0 siblings, 0 replies; 3+ messages in thread
From: Pascal Quesseveur @ 2019-06-21 10:20 UTC (permalink / raw)
  To: help-gnu-emacs

>"RC" == Richard Copley <rcopley@gmail.com> writes:

  RC> Have you already seen the explanation in the docstring for
  RC> "compilation-error-regexp-alist"? It might also be useful to look
  RC> at the existing regexps (compilation-error-regexp-alist-alist)
  RC> the sample file "etc/compilation.txt" in the Emacs distribution.

  Thank you. Since my post I ended up analyzing the regexps and I
managed to define one that works:

  ("\\([[:alnum:].]+\\)(\\([0-9].\\)) \\(?:Error\\|Warning\\): \\(?:[FEW][0-9]+ \\)"
    1 2 nil nil 1)

  RC> It turns out there's a note in the sample file that the predefined
  RC> regexp for borland is for "Borland C++, C++Builder".

  I didn't knew that.

  RC> An error specification matching your example might look something
  RC> like this:

  RC> ("^\\([a-zA-Z]?:?[^:() \t\n]+\\)(\\([0-9]+\\)) \
  RC> \\(?:Error\\|\\(Warning\\)\\|\\(Hint\\)\\):" 1 2 nil (3 . 4))

  I now undestand how TYPE is working. Thanks a lot.


-- 
Pascal Quesseveur
pquessev@gmail.com




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

end of thread, other threads:[~2019-06-21 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20  7:25 Error message not recognized in compilation buffer Pascal Quesseveur
2019-06-21  9:38 ` Richard Copley
2019-06-21 10:20   ` Pascal Quesseveur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).