Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv1397
Modified Files:
multicompile.vim
Log Message:
Bug: If compiling latex causes an error and bibtex/makeindex is run
afterwards, the errors dissapear from the clist, causing us to think
there were no errors in the document.
Fix: Always re-parse the .log file after all compilers have been called to
ensure that we will always be able to find problems with the latex
compilation.
Index: multicompile.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/multicompile.vim,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** multicompile.vim 31 Aug 2003 08:25:15 -0000 1.3
--- multicompile.vim 31 Aug 2003 09:04:41 -0000 1.4
***************
*** 31,34 ****
--- 31,35 ----
" first run latex once.
+ echomsg "latex run number : ".(runCount+1)
silent! call Tex_CompileLatex()
***************
*** 38,42 ****
" file and remember to rerun latex.
if runCount == 0 && glob(idxFileName) != '' && idxlinesAfter != idxlinesAfter
! echomsg "running makeindex..."
let temp_mp = &mp | let &mp='makeindex $*.idx'
exec 'silent! make '.mainFileName_root
--- 39,43 ----
" file and remember to rerun latex.
if runCount == 0 && glob(idxFileName) != '' && idxlinesAfter != idxlinesAfter
! echomsg "Running makeindex..."
let temp_mp = &mp | let &mp='makeindex $*.idx'
exec 'silent! make '.mainFileName_root
***************
*** 51,56 ****
let biblinesBefore = Tex_CatFile(bibFileName)
! echomsg "running bibtex..."
let temp_mp = &mp | let &mp='bibtex'
exec 'silent! make '.mainFileName_root
--- 52,58 ----
let biblinesBefore = Tex_CatFile(bibFileName)
+ call Tex_Debug('bibbefore = ['.biblinesBefore.']', 'comp')
! echomsg "Running bibtex..."
let temp_mp = &mp | let &mp='bibtex'
exec 'silent! make '.mainFileName_root
***************
*** 58,66 ****
let biblinesAfter = Tex_CatFile(bibFileName)
" If the .bbl file changed after running bibtex, we need to
" latex again.
if biblinesAfter != biblinesBefore
! echomsg 'need to rerun because bibliography file changed...'
let needToRerun = 1
endif
--- 60,69 ----
let biblinesAfter = Tex_CatFile(bibFileName)
+ call Tex_Debug('bibafter = ['.biblinesAfter.']', 'comp')
" If the .bbl file changed after running bibtex, we need to
" latex again.
if biblinesAfter != biblinesBefore
! echomsg 'Need to rerun because bibliography file changed...'
let needToRerun = 1
endif
***************
*** 69,73 ****
" check if latex asks us to rerun
if Tex_IsPresentInFile('Rerun to get cross-references right', mainFileName_root.'.log')
! echomsg "need to rerun to get cross-references right..."
let needToRerun = 1
endif
--- 72,76 ----
" check if latex asks us to rerun
if Tex_IsPresentInFile('Rerun to get cross-references right', mainFileName_root.'.log')
! echomsg "Need to rerun to get cross-references right..."
let needToRerun = 1
endif
***************
*** 76,86 ****
endwhile
! " finally set up the error window and the preview of the log
! silent! call Tex_SetupErrorWindow()
endfunction " }}}
" Various helper functions used by Tex_CompileMultipleTimes(). These functions
" use python where available (and allowed) otherwise do it in native vim at
! " the cost of some slowdown and some new temporary buffers being opened.
" Tex_GotoTempFile: open a temp file. reuse from next time on {{{
" Description:
--- 79,94 ----
endwhile
! echomsg "Ran latex ".runCount." time(s)"
!
! " After all compiler calls are done, reparse the .log file for
! " errors/warnings to handle the situation where the clist might have been
! " emptied because of bibtex/makeindex being run as the last step.
! exec 'silent! cfile '.mainFileName_root.'.log'
endfunction " }}}
" Various helper functions used by Tex_CompileMultipleTimes(). These functions
" use python where available (and allowed) otherwise do it in native vim at
! " the cost of some slowdown and a new temporary buffer being added to the
! " buffer list.
" Tex_GotoTempFile: open a temp file. reuse from next time on {{{
" Description:
***************
*** 161,165 ****
def catFile(filename):
try:
! file = open(fname)
lines = ''.join(file.readlines())
file.close()
--- 169,173 ----
def catFile(filename):
try:
! file = open(filename)
lines = ''.join(file.readlines())
file.close()
|