Hugh, Vim will use the first matching pattern in your efm, so put the more specific patterns at the beginning, the more general patterns at the end. So try putting the new lines at the front of the efm:
\%E%f:%l:\ multiple\ definitions\ of\ %m, \%Z%*\\s:%f:%l:\ first\ defined\ here, \\"%f\"%*\\D%l:\ %m, \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once, \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.), \%f:%l:\ %m, \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', David -----Original Message----- From: Hugh Sasse [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 2:49 AM To: vim developers list Subject: Debugging errorformat strings This was originally posted to vim@vim.org but I've not had a reply. Maybe it's better posted here, anyway. This is the concise form of the message. Longer versions are in the archives, but I'll explain more if needed. ---------- Forwarded message ---------- Date: Mon, 27 Nov 2006 10:39:16 +0000 (WET) From: Hugh Sasse <[EMAIL PROTECTED]> To: Vim Help list <vim@vim.org> Subject: Shortened: debugging errorformat strings. I have been trying to improve the quickfix facilities obtainable from gcc and I have modified it thusly: --- /usr/local/share/vim/vim70/compiler/gcc.vim 2006-07-19 18:11:22.117752000 +0100 +++ /home/hgs/.vim/compiler/gcc.vim 2006-11-22 18:33:39.269332000 +0000 @@ -16,6 +16,8 @@ \\"%f\"%*\\D%l:\ %m, \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once, \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.), + \%E%f:%l:\ multiple\ definitions\ of\ %m, + \%Z%*\\s:%f:%l:\ first\ defined\ here, \%f:%l:\ %m, \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', But when I get results like: /home/hgs/fsv/rawimage.c:97: multiple definition of `image_check_is_png' image.o:/home/hgs/fsv/image.c:97: first defined here vim tries to pickup a file called image.o:/home/hgs/fsv/image.c for the second line (:cn) which clearly doesn't exist. I have tried the following forms of this second line in order to modify what is detected before the %f :- \%Z%*\\s:%f:%l:\ first\ defined\ here, \%Z%.%#:%f:%l:\ first\ defined\ here, \%Z%*[^:]:%f:%l:\ first\ defined\ here, \%Z%m:%f:%l:\ first\ defined\ here, \%Z%*f:%f:%l:\ first\ defined\ here, The latter of which complains about 2 %f symbols in the line, despite the first having a * in it. How do I NOT pickup the object file before the ":%f:\ first\ defined\ here"? Hugh