unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs-22.1 compilation-error-regexp
@ 2008-04-30  3:13 Bob McIsaac
  2008-05-05 12:02 ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Bob McIsaac @ 2008-04-30  3:13 UTC (permalink / raw)
  To: bug-gnu-emacs

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
..\src\ctrl\lister.c(109): Warning! W131: No prototype found for 
function 'xif'





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs-22.1 compilation-error-regexp
  2008-04-30  3:13 Emacs-22.1 compilation-error-regexp Bob McIsaac
@ 2008-05-05 12:02 ` Nick Roberts
  2008-05-06  3:12   ` Bob McIsaac
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2008-05-05 12:02 UTC (permalink / raw)
  To: bobmc; +Cc: bug-gnu-emacs

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
 > 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
 > ..\src\ctrl\lister.c(109): Warning! W131: No prototype found for 
 > function 'xif'

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): ....

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** compile.el.~1.468.~	2008-05-03 21:40:59.000000000 +1200
--- compile.el	2008-05-05 23:48:46.000000000 +1200
*************** File = \\(.+\\), Line = \\([0-9]+\\)\\(?
*** 323,328 ****
--- 323,331 ----
      (sun-ada
       "^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3)
  
+     (watcom
+      "\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)): \\(?:Error! E[0-9]+\\|Warning! W[0-9]+\\):" 1 2)
+ 
      (4bsd
       "\\(?:^\\|::  \\|\\S ( \\)\\(/[^ \n\t()]+\\)(\\([0-9]+\\))\
  \\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3))


*** compilation.txt.~1.20.~	2008-02-26 00:21:25.000000000 +1300
--- compilation.txt	2008-05-05 23:49:17.000000000 +1200
*************** keyboard handler.c(537) : warning C4005:
*** 263,268 ****
--- 263,276 ----
  d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
  
  
+ * Open Watcom
+ 
+ symbol: watcom
+ 
+ ..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'
+ ..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
+ 
+ 
  * Oracle pro*c
  
  symbol: oracle




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs-22.1 compilation-error-regexp
  2008-05-05 12:02 ` Nick Roberts
@ 2008-05-06  3:12   ` Bob McIsaac
  2008-05-06  7:58     ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Bob McIsaac @ 2008-05-06  3:12 UTC (permalink / raw)
  To: Nick Roberts; +Cc: bug-gnu-emacs, bobmc

[-- Attachment #1: Type: text/html, Size: 2851 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs-22.1 compilation-error-regexp
  2008-05-06  3:12   ` Bob McIsaac
@ 2008-05-06  7:58     ` Nick Roberts
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2008-05-06  7:58 UTC (permalink / raw)
  To: bobmc; +Cc: bug-gnu-emacs

 > 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-

I didn't realise Yidong had replied.  Unsurprisingly our regexps are different
but I don't know which is best.

My patch was against current CVS.  In the progmodes directory of compile.el,
after making a backup, you can cut and paste the patch for compile.el into
a file called compile.diff, then do:

patch < compile.diff

As you have Emacs 22.1, it might apply with an offset.  If it won't apply at
all then you will have to do it manually: look for the sun-ada entry in
compile.el and add the lines beginning with +, then remove those pluses and
byte compile the file (on the menu-bar).  You will probably have to start Emacs
again to see any effect.

Alternatively you can checkout Emacs from the CVS repository which would mean
that you would pick up bug fixes automatically (and could post the latest bug
reports!).

-- 
Nick                                           http://www.inet.net.nz/~nickrob




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-06  7:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30  3:13 Emacs-22.1 compilation-error-regexp Bob McIsaac
2008-05-05 12:02 ` Nick Roberts
2008-05-06  3:12   ` Bob McIsaac
2008-05-06  7:58     ` Nick Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).