From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob McIsaac Newsgroups: gmane.emacs.bugs Subject: Re: Emacs-22.1 compilation-error-regexp Date: Mon, 05 May 2008 23:12:32 -0400 Organization: Home Message-ID: <481FCCA0.9000404@rogers.com> References: <4817E3EB.6090601@rogers.com> <18462.63335.493309.993331@kahikatea.snap.net.nz> Reply-To: bobmc@bobmc.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1210044551 6844 80.91.229.12 (6 May 2008 03:29:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2008 03:29:11 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, bobmc@bobmc.net To: Nick Roberts Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 06 05:29:46 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JtDrx-0007nl-TF for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 May 2008 05:29:46 +0200 Original-Received: from localhost ([127.0.0.1]:34127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtDrA-0007Y4-Bm for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 May 2008 23:28:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtDbg-0006PS-J5 for bug-gnu-emacs@gnu.org; Mon, 05 May 2008 23:12:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtDbb-0006LT-3g for bug-gnu-emacs@gnu.org; Mon, 05 May 2008 23:12:43 -0400 Original-Received: from [199.232.76.173] (port=57026 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtDba-0006LO-UL for bug-gnu-emacs@gnu.org; Mon, 05 May 2008 23:12:39 -0400 Original-Received: from smtp110.rog.mail.re2.yahoo.com ([206.190.37.0]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JtDbb-0004A1-70 for bug-gnu-emacs@gnu.org; Mon, 05 May 2008 23:12:39 -0400 Original-Received: (qmail 18793 invoked from network); 6 May 2008 03:12:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:Reply-To:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fXGzb8F2sCB8ndgh2887nxtfXOdSPdtAteZWEKbYZqf3HWSky1Lmc44kJVPS1DovtRaV3b/wDLn7aOK59cyeLl8QVuax458Uo3uMpZS6pI7Lzqu1C0Ka0HN2gw7z9JuFBHL7IutUiGqZpw8zSSJVRDBIyCHRBCs5Ir296PJGoUA= ; Original-Received: from unknown (HELO ?99.237.102.133?) (bobmc_net@rogers.com@99.237.102.133 with plain) by smtp110.rog.mail.re2.yahoo.com with SMTP; 6 May 2008 03:12:33 -0000 X-YMail-OSG: qrffpPgVM1nwMyGY1_e2eQ4UzLD3qmSfTl0jZ6RIVg0u8VSIsFH4kpf3Vz7VcvkDDw-- X-Yahoo-Newman-Property: ymail-3 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: <18462.63335.493309.993331@kahikatea.snap.net.nz> X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-Mailman-Approved-At: Mon, 05 May 2008 23:27:39 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17925 Archived-At: Nick Roberts wrote:
Bob McIsaac writes:
 > The compilation-error-regexp works for gcc output but not for
 > Openwatcom. However, it worked fine for emacs-21. It seems the regexp


This isn't really my area but it's such a concise bug report it deserves a
reply.  I've checked the changes below into the trunk.  Can you please confirm
that they work for you?  In particular, when the filename is absolute, e.g.,

c:\src\ctrl\lister.c(109): ....

  
Hi:

Two thumbs up for the quality of help provided by free software people. I already received a .emacs patch that works. I can also test your (Nick's) solution but I need some hint as to how.  Here is the
.emacs one.
-bob-

==================================
Chong Yidong wrote:
The compilation-error-regexp works for gcc output but not for
Openwatcom. However, it worked fine for emacs-21. It seems the regexp no
longer accepts parentheses around the line number.

----- gcc example is ok ----
-*- mode: compilation; default-directory: "c:/altm/acp-7-3/build/" -*-
../src/vi/vi_main.c:53: `xint' undeclared (first use in this function)
../src/vi/vi_main.c:53: (Each undeclared identifier is reported only once

------- Open Watcom Make Version 1.7 -- not ok because of line number ======
..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'
..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
    

I don't have Openwatcom installed, so I can't test the fix directly.
Could you help me with testing?

Please add the following code to your .emacs, then try compiling.  Does
compilation now work for both gcc and openwatcom?  If possible, please
test with any other back-end to M-x compile that you have available, to
ensure that nothing else broke.

Thanks.


(require 'compile)
(push '(openwatcom
	"^\\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-/\n]\\)*?\\)(\\([0-9]+\\)): ?\
\\(?:\\(Warning! ?W[0-9]+:\\)\\|\\(Error! ?E[0-9]+:\\)\\|\\(.\\)\\)"
	1 2 nil (3 . 5))
      compilation-error-regexp-alist-alist)
(push 'openwatcom compilation-error-regexp-alist)
  

  
Hi:
I am pleased to report that your patch works with gcc, openwatcom, grep, and Doxygen!

Thanks for the timely solution.

-Bob-