Loading ...
Sorry, an error occurred while loading the content.

Syntax error in $VIMRUNTIME/compiler/xmllint.vim

Expand Messages
  • whiteinge.3080444@bloglines.com
    This is my first message, so hello everyone! Two things: complier/xmllint.vim that ships with v6.3 doesn t work (at all), my fix follows. Lastly, the
    Message 1 of 7 , Aug 26, 2004
    • 0 Attachment
      This is my first message, so hello everyone!

      Two things:

      complier/xmllint.vim
      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).

      Cheers!
      --
      Seth House

      Complete file temporarily mirrored here: <http://eseth.org/filez/storage/xmllint.vim>


      Changes:

      CompilerSet makeprg=xmllint\ --valid\ --noout\ %
      CompilerSet
      errorformat=%E%f:%l:\ error\ :\ %m,
      \%W%f:%l:\ warning\
      :\ %m,
      \%E%f:%l:\ validity\ error\ :\ %m,

      \%W%f:%l:\ validity\ warning\ :\ %m,

      \%E%f:%l:\ parser\ error\ :\ %m,
      \%W%f:%l:\ parser\
      warning\ :\ %m,
      \%-Z%p^,
      \%-A%.%#
    • whiteinge.3080444@bloglines.com
      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
      Message 2 of 7 , Aug 28, 2004
      • 0 Attachment
        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.

        CompilerSet errorformat=%E%f:%l:%m,

        \%-Z%p^,
        \%-A%.%#

        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.

        Cheers!
        --Seth House
      • Doug Kearns
        Seth, ... G day! ... 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. ... It looks
        Message 3 of 7 , Aug 28, 2004
        • 0 Attachment
          Seth,

          On Thu, Aug 26, 2004 at 10:53:51PM +0000, whiteinge.3080444@... wrote:
          > This is my first message, so hello everyone!

          G'day!

          > Two things:
          >
          > complier/xmllint.vim
          > 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.

          > Cheers!
          > --
          > Seth House
          >
          > Complete file temporarily mirrored here: <http://eseth.org/filez/storage/xmllint.vim>

          Thanks.

          > Changes:
          >
          > 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,
          optionally.

          Try http://mugca.its.monash.edu.au/~djkea2/vim/compiler/xmllint.vim

          <snip>

          Regards,
          Doug
        • whiteinge.3080444@bloglines.com
          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 Thanks for the
          Message 4 of 7 , Aug 29, 2004
          • 0 Attachment
            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

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

            If
            an element or attribute isn't delcared in the DTD it kicks out another inconsistent
            error!

            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?

            Thanks, Doug!
            --Seth
          • whiteinge.3080444@bloglines.com
            Doug, 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
            Message 5 of 7 , Oct 1, 2004
            • 0 Attachment
              Doug,
              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.
              http://www.eseth.org/filez/storage/xmllint.vim

              --Seth

              > Do you have a list of the errors you've come across somewhere?
              If so
              > could you forward them on to me.
              > Thanks,
              > Doug
            • Doug Kearns
              ... Have a look at: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim Regards, Doug PS. Sorry it looks like my email from last month bounced...
              Message 6 of 7 , Nov 18, 2004
              • 0 Attachment
                On Fri, Oct 01, 2004 at 08:34:45PM +0000, whiteinge.3080444@... wrote:
                > Doug,
                > 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.
                > http://www.eseth.org/filez/storage/xmllint.vim

                Have a look at:
                http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim

                Regards,
                Doug

                PS. Sorry it looks like my email from last month bounced...
              • whiteinge.3080444@bloglines.com
                Doug, That ll do it. Thanks a lot for the update! The script link on the Vim site may be out of date: http://www.vim.org/vimscriptlinks.php Cheers!- Seth
                Message 7 of 7 , Nov 22, 2004
                • 0 Attachment
                  Doug,
                  That'll do it. Thanks a lot for the update!
                  The script link on the
                  Vim site may be out of date:
                  http://www.vim.org/vimscriptlinks.php
                  Cheers!

                  - Seth


                  --- Doug Kearns <dougkearns@... wrote:
                  >
                  > Have a look
                  at:
                  > http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
                  >

                  > Regards,
                  > Doug
                  >
                  > PS. Sorry it looks like my email from last month
                  bounced...
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.