GNU bug report logs - #62560
28.2; compile-mode misidentifies compiler output

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Fri, 31 Mar 2023 05:39:02 UTC

Severity: normal

Found in version 28.2

Full log


Message #11 received at 62560 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Tom Tromey <tom <at> tromey.com>, 62560 <at> debbugs.gnu.org
Subject: Re: bug#62560: 28.2; compile-mode misidentifies compiler output
Date: Fri, 31 Mar 2023 09:01:42 -0600
>>>>> "Eli" == Eli Zaretskii <eliz <at> gnu.org> writes:

Eli> Any idea how to accomplish that, given that GCC emits unformatted and
Eli> unstructured text?

Maybe ignore lines starting with whitespace and then "|"?

Eli> We could complicate the heck out of our regexps,
Eli> but theoretically a compiler could emit an error message that quotes
Eli> text that looks exactly as warning/error message, and what do we do
Eli> then?

Yeah... keep on patching I suppose.

Eli> Are there any developments in compilers to produce structured text,
Eli> like JSON or XML?

In

(info "(gcc) Diagnostic Message Formatting Options")

I see:

'-fdiagnostics-format=FORMAT'
     Select a different format for printing diagnostics.  FORMAT is
     'text' or 'json'.  The default is 'text'.

I guess it could be made to work, though to be really useful I think
Emacs would have to reformat this before inserting in the compilation
buffer; but also it doesn't really solve the problem because while gcc
does this, many other tools run by make do not.

Tom




This bug report was last modified 2 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.