help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing compilation error/warning not possible.


From: Robert Thorpe
Subject: Re: Parsing compilation error/warning not possible.
Date: 20 Dec 2006 10:54:12 -0800
User-agent: G2/1.0

address@hidden wrote:
> address@hidden wrote:
> > Robert Thorpe skrev:
> >
> > > address@hidden wrote:
> > > > Hi.
> > > > I'm using Emacs on WindowsXP.
> > > > I make compilations through emacs with an own written Makefile. The
> > > > compilation result is presented on a new buffer. It should be possible
> > > > to click on the error or warning message to go directly to the
> > > > corresponding line in the file where the error is.
> > > > But I can't make it happen. I have read a little bit about this, and
> > > > what I could find is something about (compilation-error-regexp-alist)
> > > > that should fix this in someway.
> > > > Can anyone tell me how this should be done?
> > >
> > > Generally you do M-x compile
> > > Then enter the command to make the program, eg "make"
> > > Then you can select the errors one at a time by pressing C-x `
> > >
> > > This will only work if your compiler emits messages in a format
> > > understood by Emacs compile-mode.
> >
> > Thanks for your response.
> > The compilation part is OK. The problem is that it is not possible to
> > select the errors in any way. Not by C-x or clicking mouse 2 button or
> > any other way.
> > The question is if my compiler is emitting messages in a format that is
> > understood by emacs compile-mode, as you said.
> > How can I make the compile-mode to understand my compiler messages?
>
> Hi again.
> I wanted to show the syntax for errors and warnings generated by my
> compiler:
> terminal.c:
>   5946:       while ( (*buf_p != ':') && (*buf_p != CR) && (*buf_p != '\0')
> )
> E  42: syntax error, expecting statement
>   5997: }
> W  68: function "GetIntelHex": parameter "stream" not used
> W 183: variable 'content_p' possibly uninitialized
> total errors: 1, warnings: 2
>
> Maybe this can help in case emacs doesn't understand the compilers
> generated errors/warnings.

I don't think it does.  There is a standard in the GNU coding standards
for errors, what you've showed me doesn't follow it.

You can though write your own compilation-parse-errors, or more simply
customize compilation-error-regexp-alist to recognise what you need.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]