Re: Problem with Quickfix and Latex

2006-11-17 Thread Benji Fisher
On Thu, Nov 16, 2006 at 06:33:07PM -0200, Luis A. Florit wrote:
 Pals,
 
 I have a recurrent problem with quickfix and Latex. I use the
 tex.vim compiler by Srinath Avadhanula. I tried both the 2003 version
 contained in the last LatexSuite plugin
 
 http://www.vim.org/scripts/script.php?script_id=475
 
 and version '2006-03-20 09:45:45Z'. Same result.
 
 The problem:  After make, when there is an error, it jumps to an
 unwanted file. This is so because the efm variable is not correctly set.
 
 For example, after deleting a '$' in a file 'file.tex' and doing
 make, I read this in the quickfix window:
 
 ##
 || ) (./file.aux)
 /usr/share/texmf/tex/generic/xypic/xy.sty| error| Missing $
 inserted. $ \lambda =1$) and identifying the upper $2\times 2$ matrix in
 ##
 
 Then, a new buffer is loaded with the file xy.sty, and vim tries
 to go to the line  in that line (then it goes to the last).
 
 It seems that the problem is that the string
 '/usr/share/texmf/tex/generic/xypic/xy.sty' was not deleted by efm.
[snip]

 I never looked at the 'errorformat' option until a few weeks ago,
when I tried (with less than perfect success) to come up with a good
setting for plain TeX.  So I think I am not the most qualified person to
deal with this.  I hope someone else will take a stab at it.

--Benji Fisher


Problem with Quickfix and Latex

2006-11-16 Thread Luis A. Florit
Pals,

I have a recurrent problem with quickfix and Latex. I use the
tex.vim compiler by Srinath Avadhanula. I tried both the 2003 version
contained in the last LatexSuite plugin

http://www.vim.org/scripts/script.php?script_id=475

and version '2006-03-20 09:45:45Z'. Same result.

The problem:  After make, when there is an error, it jumps to an
unwanted file. This is so because the efm variable is not correctly set.

For example, after deleting a '$' in a file 'file.tex' and doing
make, I read this in the quickfix window:

##
|| ) (./file.aux)
/usr/share/texmf/tex/generic/xypic/xy.sty| error| Missing $
inserted. $ \lambda =1$) and identifying the upper $2\times 2$ matrix in
##

Then, a new buffer is loaded with the file xy.sty, and vim tries
to go to the line  in that line (then it goes to the last).

It seems that the problem is that the string
'/usr/share/texmf/tex/generic/xypic/xy.sty' was not deleted by efm.

The only line in file 'file.log' contains a reference to xy.sty
is in this block:


...
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\minCDarrowwidth=\dimen119
)
(/usr/share/texmf/tex/generic/xypic/xy.sty
(/usr/share/texmf/tex/generic/xypic/xy.tex Bootstrapíng: catcodes,
docmode,
(/usr/share/texmf/tex/generic/xypic/xyrecat.tex)
(/usr/share/texmf/tex/generic/xypic/xyidioms.tex)
...


This is the value of the efm variable:

#
set efm=

if !g:Tex_ShowallLines
call s:IgnoreWarnings()
endif

setlocal efm+=%E!\ LaTeX\ %trror:\ %m
setlocal efm+=%E!\ %m

setlocal efm+=%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#
setlocal efm+=%+W%.%#\ at\ lines\ %l--%*\\d
setlocal efm+=%+WLaTeX\ %.%#Warning:\ %m

exec 'setlocal efm+=%'.pm.Çl.%l\ %m'
exec 'setlocal efm+=%'.pm.Çl.%l\ '
exec 'setlocal efm+=%'.pm.Ç\ \ %m'
exec 'setlocal efm+=%'.pm.Ç%.%#-%.%#'
exec 'setlocal efm+=%'.pm.Ç%.%#[]%.%#'
exec 'setlocal efm+=%'.pm.Ç[]%.%#'
exec 'setlocal efm+=%'.pm.Ç%.%#%[{}\\]%.%#'
exec 'setlocal efm+=%'.pm.Ç%.%#%m'
exec 'setlocal efm+=%'.pm.Ç\ \ %m'
exec 'setlocal efm+=%'.pm.'GSee\ the\ LaTeX%m'
exec 'setlocal efm+=%'.pm.'GType\ \ H\ return%m'
exec 'setlocal efm+=%'.pm.'G\ ...%.%#'
exec 'setlocal efm+=%'.pm.'G%.%#\ (C)\ %.%#'
exec 'setlocal efm+=%'.pm.'G(see\ the\ transcript%.%#)'
exec 'setlocal efm+=%'.pm.'G\\s%#'
exec 'setlocal efm+=%'.pm.Ó(%*[^()])%r'
exec 'setlocal efm+=%'.pm.'P(%f%r'
exec 'setlocal efm+=%'.pm.'P\ %\\=(%f%r'
exec 'setlocal efm+=%'.pm.'P%*[^()](%f%r'
exec 'setlocal efm+=%'.pm.'P(%f%*[^()]'
exec 'setlocal efm+=%'.pm.'P[%\\d%[^()]%#(%f%r'
if g:Tex_IgnoreUnmatched  !g:Tex_ShowallLines
setlocal efm+=%-P%*[^()]
endif
exec 'setlocal efm+=%'.pm.'Q)%r'
exec 'setlocal efm+=%'.pm.'Q%*[^()])%r'
exec 'setlocal efm+=%'.pm.'Q[%\\d%*[^()])%r'
if g:Tex_IgnoreUnmatched  !g:Tex_ShowallLines
setlocal efm+=%-Q%*[^()]
endif
if g:Tex_IgnoreUnmatched  !g:Tex_ShowallLines
setlocal efm+=%-G%.%#
endif
#

How can I solve this?

Thanks a lot,

Luis.