[TxMt] bibtex in textmate problem and tentative solution
Peeter Sällström Randsalu
peeter at kraai.nu
Wed Feb 13 19:24:04 UTC 2008
Hi!
I had the same problem as described in a post from Sebastian on
2007-11-11 (http://thread.gmane.org/gmane.editors.textmate.general/
23160).
Here is my error output:
Running bibtex on Exjobb (ny).tex
Traceback (most recent call last): File "/Users/peeter/Peeterprogram/
TextMate.app/Contents/SharedSupport/Bundles/Latex.tmbundle/Support/bin/
texMate.py", line 457, in texStatus, isFatal, numErrs, numWarns =
run_bibtex(texfile=fileName) File "/Users/peeter/Peeterprogram/
TextMate.app/Contents/SharedSupport/Bundles/Latex.tmbundle/Support/bin/
texMate.py", line 71, in run_bibtex return stat,fatal,err,warn
UnboundLocalError: local variable 'stat' referenced before assignment
It seems that it had to do with the parentheses in my filename messing
up the regexes.
My solution was to change lines 71 and 72 in Textmate.app/Contents/
SharedSupport/Bundles/Latex.tmbundle/Support/bin/texMate.py as follows:
# auxfiles = [f for f in os.listdir('.') if re.search('.aux
$',f) > 0]
# auxfiles = [f for f in auxfiles if re.match(r'('+ basename +
r'\.aux|bu\d+\.aux)',f)]
auxfiles = [f for f in os.listdir('.') if re.search('.aux$',f)
> 0 and (f.startswith(basename) or re.match(r'bu\d+\.aux', f))]
This works, at least for me.
Or have I messed something else up in the process?
/Peeter
More information about the textmate
mailing list