lcd wrote:

>     Copied to vim_dev, now with 100% more content. :)
> 
>     /lcd
> 
> ----- Forwarded message from LCD 47 <[email protected]> -----
> 
> From: LCD 47 <[email protected]>
> Date: Thu, 20 Feb 2014 15:06:53 +0200
> To: [email protected]
> Subject: Re: errorformat/cexpr bug?
> 
> On 19 February 2014, Aaron Bohannon <[email protected]> wrote:
> > Over the years, I have wasted many hours of my life on trying to write
> > errorformat patterns -- and many times having to give up in defeat.
> > Now, finally, I've managed to trace down a behavior that could explain
> > all those hours of frustration.
> >
> > The meaning of the errorformat option is so arcane, though, that
> > I cannot know for sure whether this is actually a bug in the
> > implementation or simply the intended behavior.  If it's intentional,
> > can someone *please* explain to me why it works like this?
> > 
> > :echo string(&efm)
> > 
> >     '%+CXXX,%+EERROR,%+IINFO,%-GYYY'
> > 
> > :cgetexpr ['INFO', 'ERROR', 'XXX']
> > :echomsg string(getqflist()[0].text) string(getqflist()[1].text)
> > 
> >     'INFO' 'ERROR^@XXX'
> > 
> > :cgetexpr ['INFO', 'YYY', 'ERROR', 'XXX']
> > :echomsg string(getqflist()[0].text) string(getqflist()[1].text)
> > 
> >    'INFO' 'ERROR'
> 
>     Yeah, this one looks like a bug.  What seems o be going on here is
> that 'YYY' matches '%-GYYY', which sets the multiignore flag, which
> doesn't get reset until 'XXX' is seen.  Which basically means 'XXX' is
> matched as '%-CXXX', thus ignored.
> 
> > :cgetexpr ['INFO', 'YYY', 'ZZZ', 'ERROR', 'XXX']
> > :echomsg string(getqflist()[0].text) string(getqflist()[1].text) 
> > string(getqflist()[2].text)
> > 
> >    'INFO' 'ZZZ' 'ERROR^@XXX'
> 
>     In this case multiignore gets set at 'YYY', but then gets reset
> when 'ZZZ' is seen.  Thus the subsequent 'XXX' is correctly matched as
> '%+CXXX'.
> 
>     The patch below seems to fix the problem for this particular case,
> but the context is pretty involved.  F.i. what about O/P/Q?  It would be
> a good idea to have more pairs of eyes look at it.

It would also be good to have tests.  test 10 already does some, but not
much.

-- 
CUSTOMER:     You're not fooling anyone y'know.  Look, isn't there something
              you can do?
DEAD PERSON:  I feel happy... I feel happy.
    [whop]
CUSTOMER:     Ah, thanks very much.
MORTICIAN:    Not at all.  See you on Thursday.
CUSTOMER:     Right.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui