Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help needed for extending compilation-error-regexp-alist

5 views
Skip to first unread message

Chera Bekker

unread,
Sep 26, 2012, 4:14:53 AM9/26/12
to help-gn...@gnu.org
Dear Emacs guru's,

I work with Emacs 21.4 and the Absoft Fortran 11.0 compiler. This
compiler produces error messages like

argh=
^
cf90-113 af90fe64: ERROR CLS_SVALPROBABILITIES, File =
src/cls_Svalprobabilities.f, Line = 36, Column = 9
IMPLICIT NONE is specified in the local scope, therefore an explicit
type must be specified for data object "ARGH".

Emacs 2.14 compile mode does not understand this format. I have tried
adding a new rule to compilation-error-regexp-alist by

(add-to-list 'compilation-error-regexp-alist '("File = \\([^
,\n]*\\), Line = \\([0-9]+\\)," 1 2))

But compile still doesn't find these errors.

Can anyone help me with this?

Thank you in advance.

Regards

Chera Bekker

Stefan Monnier

unread,
Sep 26, 2012, 8:42:31 PM9/26/12
to
> Emacs 2.14 compile mode does not understand this format. I have tried
> adding a new rule to compilation-error-regexp-alist by

> (add-to-list 'compilation-error-regexp-alist '("File = \\([^
> ,\n]*\\), Line = \\([0-9]+\\)," 1 2))

> But compile still doesn't find these errors.

I works in my tests. Are you sure the above line succeeds? If you run
it before compile.el is loaded, it will simply signal an error because
compilation-error-regexp-alist won't exist yet.


Stefan

Stefan Monnier

unread,
Sep 27, 2012, 9:29:11 AM9/27/12
to
>> Emacs 2.14 compile mode does not understand this format. I have tried

BTW, compile.el in Emacs<22 (I assume 2.14 was meant to be 21.4) is
quite different from the version in use now and anchors all its regexps
at the beginning of a line.
So I recommend you upgrade, or otherwise I recommend you use something like

"^cf90.*?File = \\([^ ,\n]*\\), Line = \\([0-9]+\\),"

instead (the "^" is redundant in 21.4 but its absence could lead to
performance problems in 22 and up).


Stefan
0 new messages