From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.comp.gcc.fortran,gmane.emacs.devel Subject: Re: Emacs and GFortran Date: Mon, 30 Oct 2006 16:27:48 +0100 (MET) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1162222228 4612 80.91.229.2 (30 Oct 2006 15:30:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2006 15:30:28 +0000 (UTC) Cc: fortran@gcc.gnu.org, emacs-devel@gnu.org Original-X-From: fortran-return-15294-gcgf-fortran=m.gmane.org@gcc.gnu.org Mon Oct 30 16:30:24 2006 Return-path: Envelope-to: gcgf-fortran@gmane.org Original-Received: from sourceware.org ([209.132.176.174]) by ciao.gmane.org with smtp (Exim 4.43) id 1GeZ3X-0006Wu-TV for gcgf-fortran@gmane.org; Mon, 30 Oct 2006 16:28:08 +0100 Original-Received: (qmail 12513 invoked by alias); 30 Oct 2006 15:28:06 -0000 Original-Received: (qmail 12504 invoked by uid 22791); 30 Oct 2006 15:28:05 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Original-Received: from postino1.roma1.infn.it (HELO postino1.roma1.infn.it) (141.108.26.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 30 Oct 2006 15:27:59 +0000 Original-Received: from ax0rm1.roma1.infn.it (ax0rm1.roma1.infn.it [141.108.26.19]) by postino1.roma1.infn.it (8.12.11/8.12.11) with ESMTP id k9UFRuo4009063; Mon, 30 Oct 2006 16:27:56 +0100 Original-Received: from localhost (graziosi@localhost) by ax0rm1.roma1.infn.it (8.9.3/8.9.3) with ESMTP id QAA19158; Mon, 30 Oct 2006 16:27:48 +0100 (MET) Original-To: Stefan Monnier In-Reply-To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.0.3.2, Antispam-Data: 2006.10.30.63433 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_MEDIA_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Post: List-Help: , Original-Sender: fortran-owner@gcc.gnu.org Xref: news.gmane.org gmane.comp.gcc.fortran:15264 gmane.emacs.devel:61395 Archived-At: I do not know if we are speaking of the same thing. I refer to the possibility to use Emacs like an IDE with GFortran. I will try to be more clear with this example. ------------------------------------- $ cat hello.F program hello implicit none write(*,) 'Hello!' end ------------------------------------- In Emacs: M-x compile g77 hello.F ----------------- *compilation* ---------------- -*- mode: compilation; default-directory: "/tmp/" -*- Compilation started at Mon Oct 30 15:59:21 g77 hello.F hello.F: In program `hello': hello.F:3: <=== write(*,) 'Hello!' ^ Expression at (^) has incorrect data type or rank for its context Compilation exited abnormally with code 1 at Mon Oct 30 15:59:28 ---------------- Now clicking with mouse-1 (on 'hello.F:3' in '<===') jumps to line 3 so we can examine where the compilation fails (Image a multifile application with thousands of line of code). Now using GFortran M-x compile gfortran hello.F ----------------- *compilation* ---------------- -*- mode: compilation; default-directory: "/tmp/" -*- Compilation started at Mon Oct 30 16:10:09 gfortran hello.F In file hello.F:3 write(*,) 'Hello!' 1 Error: Syntax error in WRITE statement at (1) Compilation exited abnormally with code 1 at Mon Oct 30 16:10:12 ------------------ But we cannot jump to the wrong line clicking with mouse, we only know that the error occurs at line 3 which we reach manually. Obviously this happens even if one uses pure F95 code. Angelo. On Mon, 30 Oct 2006, Stefan Monnier wrote: > > I would ask if there is a way to integrate Emacs with GFortran so that in > > case of compiler error one can jump to the line wher the error is born. > > > This works with G77, GCC and G++ but not with GFortran. > > Does that mean that GFortran does not use the standard GNU error format? > That would be unfortunate (and may be better fixed on GFortran's side). > Could you show us some sample error/warning messages? > > > Stefan >