how to get an errorformat with full line %m

21 views
Skip to first unread message

Marc Chantreux

unread,
Mar 30, 2021, 6:38:38 AM3/30/21
to Vim Users
hello people,

my ftplugin/perl.vim comes with a 'fixed' (works better for me
but i don't know if it can break something to other people).

So first question: is it worth submitting a patch?

version of the compiler/perl.vim from the standard distribution:

set errorformat=
\%-G%.%#had\ compilation\ errors.,
\%-G%.%#syntax\ OK,
\%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
\%+C%.%#,
\%m\ at\ %f\ line\ %l.,

In the version shipped with vim don't work with this error message:

Odd number of elements in anonymous hash at lib/Node.pm line 46, <DATA> line 1.

because the found filename is "lib/Node.pm line 46, <DATA> " (the
pattern is too greedy) so i just changed the order of matching.

Now the second question (the topic of the mail):

When developping, i also use the Devel::SimpleTrace module to activate
stacktraces in error messages so the previous message becomes:

Odd number of elements in anonymous hash
at Node::new(lib/Node.pm line 46, <DATA>:1)
at Pig::_parse_line(lib/Pig.pm:47)
at Pig::parse(lib/Pig.pm:58)
at main::(./ultrasimple.pl:7)

and i would like to make this stack available from my cwindow. alas: the
first line is the whole error message so if i use

\%+A%m,
\%+C\tat\ %o(%f:%l)

then \%+A%m will match any line so breaks the whole thing. I have no
idea how to fix the thing. any help or pointer to an efm with the
similar problem is welcome.

regards,
marc
Reply all
Reply to author
Forward
0 new messages