Syntax error in $VIMRUNTIME/compiler/xmllint.vim
- This is my first message, so hello everyone!
that ships with v6.3 doesn't work (at all), my fix follows.
Lastly, the maintainer's
copy <http://mugca.its.monash.edu.au/~djkea2/vim/compiler/xmllint.vim> linked
to from the Vim site is horibly out of date (2002 Jul 15).
Complete file temporarily mirrored here: <http://eseth.org/filez/storage/xmllint.vim>
CompilerSet makeprg=xmllint\ --valid\ --noout\ %
errorformat=%E%f:%l:\ error\ :\ %m,
\%E%f:%l:\ validity\ error\ :\ %m,
\%W%f:%l:\ validity\ warning\ :\ %m,
\%E%f:%l:\ parser\ error\ :\ %m,
warning\ :\ %m,
- Apologies for replying to my own post!
I have discovered an error in my
original fix, and took the opportunity to check the output of a different
few (relatively recent) versions of xmllint.
I would suggest that the error
format be set to the following. It's output is ever so slightly more verbose,
and will not distinguish between warnings and errors but, I believe, is the
most portable (certainly between versions 20611, 20609 and the version Doug
used originally). There are annoying inconsistencies in the output in general
and also between versions, and this errorformat match _should_ get all of
them. I'm new to using :make and don't know what impact errors vs. warnings
have, if any.
Also, it is worth noting that
in older versions of xmllint (which exactly, I don't know - 20609 and earlier,
perhaps) it is an impossibility to determine the column of an error on long
lines because the context line is truncated.
Again, I have a temporary
local mirror of the modifiled file at <http://eseth.org/filez/storage/xmllint.vim>
which includes some sample error messages from two verions of xmllint.
On Thu, Aug 26, 2004 at 10:53:51PM +0000, whiteinge.3080444@... wrote:
> This is my first message, so hello everyone!
> Two things:
> that ships with v6.3 doesn't work (at all), my fix follows.
Define "doesn't work (at all)". It looks like it doesn't parse the error
messages from 2.6.x, however, it works with 2.5.x.
> Lastly, the maintainer's
> copy <http://mugca.its.monash.edu.au/~djkea2/vim/compiler/xmllint.vim> linked
> to from the Vim site is horibly out of date (2002 Jul 15).
It looks like I haven't updated it, and the others, to use the new
CompilerSet command - thanks for the reminder. This won't stop it
working though and, other than that, it is the current version.
> Seth House
> Complete file temporarily mirrored here: <http://eseth.org/filez/storage/xmllint.vim>
> CompilerSet makeprg=xmllint\ --valid\ --noout\ %
The '%' is intentionally absent. It allows for more flexible use of the
plugin, such as passing xmllint something other than the current
buffer or multiple files.
It looks as though libxml2 2.6.x has added a space before _some_ of the
colons in their error messages, as you would... A quick look through the
source reveals that this is somewhat random. So, in order that we
maintain backward compatibility with 2.5.x let's just allow the space,
- Hey Doug.
Thanks for the reply! Sorry "at all" wasn't very helpful, also
I didn't think to call it via :make %, and assumed it was a typo :-P
for the update, it does the trick! Unfortunately there's one other error that
I've come across that isn't being matched. As I was testing my own errorformat
strings, I was compiling a list of error messages so you can see an example
on my copy <http://eseth.org/filez/storage/xmllint.vim> at line 33.
an element or attribute isn't delcared in the DTD it kicks out another inconsistent
This one kind of gave me a headache, my only success was by inserting
a fourth pair of error/warning matches specifically for this one error. I'm
not very skilled with regex yet and ultimately chose a lazy errorformat string
to combat all these differences as you can see.
Although an inelegant
fix, could you tell me if errors vs warnings have any bearing in QuickFix?
The help files don't seem to mention. Maybe you'll be able to work a little
pattern-matching magic that I couldn't. If not, do you think my lazy method
holds any merit?
This list is by no means comprehensive! It's just what I've seen personally.
Look at the comments at the bottom of the following file, I've included `xmllint
--version` info too.
Particularly eye-ball line 33, as that message differs
from most others in a most annoying way.
> Do you have a list of the errors you've come across somewhere?If so
> could you forward them on to me.
- On Fri, Oct 01, 2004 at 08:34:45PM +0000, whiteinge.3080444@... wrote:
> Doug,Have a look at:
> This list is by no means comprehensive! It's just what I've seen personally.
> Look at the comments at the bottom of the following file, I've included `xmllint
> --version` info too.
> Particularly eye-ball line 33, as that message differs
> from most others in a most annoying way.
PS. Sorry it looks like my email from last month bounced...
That'll do it. Thanks a lot for the update!
The script link on the
Vim site may be out of date:
--- Doug Kearns <dougkearns@... wrote:
> Have a look
> PS. Sorry it looks like my email from last month