Hi list,

I've recently noticed the following unexpected behaviour. I have tested this with vim-latex-1.5-20090804-r1058 and vim 7.1.138 and vim 7.2.22.

When opening a file e.g. with :e or gf, the cwd changes to the
directory of that file.
While in most scenarios you won't notice, in mine it does have an
impact. I have a big document organised in lots of smaller files, that
reside in a subdirectory together with images etc:
  main.tex
  intro/intro.tex
  chap1/chap1.tex
  .../...
Since I'd like images to be generated automatically (plus a number of
other niceties), I compile with a combination of make and rubber. This
fails after opening one file in a subdir, as make can't find a Makefile
in the subdirectory. With vim-latex 20060325-4.1 this worked flawlessly.

I've tracked the problem down to an apparent bug in the .latexmain
searching & sourcing code in texproject.vim. I propose the attached
trivial patch against vim-latex-1.5-20090804-r1058, which fixes the issue for me.


Cheers,
Alex

PS: My apologies to the maintainers for receiving this twice. I didn't think of the mailing list before contacting them directly.
--- ftplugin/latex-suite/texproject.vim	2009-08-12 02:05:56 +0200
+++ ftplugin/latex-suite/texproject.vim	2009-08-12 02:06:22 +0200
@@ -42,7 +42,7 @@
  		exec 'source 'fnameescape(.Tex_GetMainFileName().'.latexmain')
  	endif
  	
-	cd s:origdir
+	exe 'cd '.s:origdir
  endfunction " }}}

  augroup LatexSuite
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to