Emacs and GFortran
Nick Roberts
nickrob@snap.net.nz
Mon Oct 30 22:35:00 GMT 2006
Angelo Graziosi writes:
>
> Tobias Burnus wrote:
>
> > By the way, g95 has the same problem.
>
> Adding
>
>
> (eval-after-load "compile"
> '(setq compilation-error-regexp-alist
> (cons '("^In file \\(.+\\):\\([0-9]+\\)" 1 2)
> compilation-error-regexp-alist)))
>
>
> in .emacs solves it.
The original error message you posted had column number information in the
error output too:
gfortran hello.F
In file hello.F:3
write(*,) 'Hello!'
1
Error: Syntax error in WRITE statement at (1)
it would be nice to be able to use this too. I think gcc outputs kind of
information as something like:
hello.c:3:13: error: blah, blah, blah...
Emacs can then place the cursor in the relevant column when visiting an error
(and Vim probably does something similar too).
Regardless of whose issue it is, it would seem a good idea to co-ordinate
between projects (gfortan/gcc/emacs/vim...).
--
Nick http://www.inet.net.nz/~nickrob
More information about the Fortran
mailing list