This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Emacs and GFortran
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