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
Hi folks,
I work on several open-source projects (VTK, ParaView, CMake...) that
follow a somewhat unusual indentation style. Instead of
if (foo)
{
bar();
}
bar();
they require
if (foo)
{
bar;
}
bar()
Getting the first curly indent right was trivial but I can't figure
out how to reduce the indentation _after_ the closing curly. When the
pattern matches decreaseIndentPattern, the current line's indentation
is reduced. What I need is for the following line to be unindented. Is
there any way to do this?
Thanks,
-berk
Is there a way to get the ``Watch Document'' option to be master-file
aware? It seems to me that watching the master file doesn't work,
because it only re-compiles when the master changes, and watching the
included files doesn't work because it's not a whole latex file---I
get the error
Error: No \begin{document} found
I couldn't find the command \begin{document} in your file.
Help is much appreciated, as always.
Evan
--------------------------------------------------
Prediction is difficult, especially the future.
Niels Bohr
Hi list,
I've recently been working on a Relax NG to TM Language Grammar XSLT
stylesheet. I did it mainly to exercise, so I didn’t look far for
anything similar. Because Relax NG is XML and can be easily
generated from DTD or XML Schema using trang, it seemed like a good
choice.
I’d like to read your comments, especially about the generated
grammars style which need much improvement.
How does it work:
1) put a file.rng (in XML syntax) in the Schema directory
2) from the root directory, execute the shell script ./rng2txmt.sh
Schema/file.rng
3) the grammar is generated as "Generated Language Grammars/
file.plist" (along with file.plist.xml)
If this doesn’t work, please read the known issues, it might be a
namespace problem.
What does it try and do:
* look for and mark invalid tags or attributes under or in a given tag
* avoid to create empty repository entries
* give a tag-aware scope for attributes (aim is to generate auto-
completion lists aside)
What I would like it to do:
* have basic namespace support
* have current-tag-aware (not any-ancestor-aware) scope for auto-
completion of tags
e.g, a scope which only match the dots in <a>....<b> <c/>
<b>....<c/>....</a>
Not so long ago, I would have say it's impossible, but now that I’ve
slightly improved my TM grammar-fu,
I’m pretty sure it is achievable and may even be not that hard.
Matching > and /> to open, looking-ahead for <b and <c to close,
perhaps.
* actually generate completion list. This shouldn’t be too hard.
Known issues:
* If I’m right, TM grammars works in a « first matching rule is
chosen » which is incompatible with Relax NG main advantage : non-
determinism. Thus I think some Relax NG schema may never be parsed
correctly. DTD and XML Schema need to be deterministic, however, so
the issue is not that important. I think this is the problem with
the generated relaxng grammar.
* / ! \ Because XML namespace is a mess and I didn’t bother dealing
with it in my stylesheet, one need to remove any mention of the
default namespace in the rng file. Otherwise the stylesheet won’t
generate anything
* It currently doesn’t deal with anyName, exceptions, exclusive
choice or any other RNG construction.
* No auto-indentation of the generated plist. Who cares, anyway, TM
cleans it up for you.
* A whole lot of useless scopes, mainly there for debugging.
* Whitespace in tag management in inconsistent.
* The code is ugly.
By the way, I’ve used some excerpts from default XML grammar. I hope
it does not bother its author. Is he Brian Lalor or Allan Odgaard?
Thanks,
Édouard
I have just discovered TextMate, and am so far very happy with it,
but I think I just hit a glitch...
I am trying to edit a SQL load file that is about 5M, which shouldn't
be a problem. However, some of the lines are very long, as a complete
website contents is in a single line. I have no idea how many
characters are in this line, but I suspect about 2M worth.
Anyway, TextMate hangs while trying to work with this file. I can't
do much at all. Even a simple act of scrolling hangs. TextEdit does a
reasonably good job with the file though...
Actually, I don't think it is hanging, as it eventually responds
(about 30 seconds later), but it is so slow that it is completely
unusable. Is this a known problem? For me, it is weird files like
this that we need an editor like TextMate to be able to easily handle.
Thanks...
Jim Leask
Hi!
I'm just working on some Tex-Document which uses several dialogues
which I want to enclose in "< "> (the result are those <<
>>-enclosures in the document). Would be cool if that could be added
to the language grammar.
Thanks in advance
Niels
Wherever I can I have switched to git. When switching branches (a
common thing with git), git replaces files 'in place'.
That has some side effects with TM:
- when I switch branches (say from the stable to the development
branch) and forget to close the project window first, TM happily
overwrites the project file. Thus I loose all the changes (eg new
classes added etc). Ideally TM should recognize that the project file
changed and reload it.
- Transitory information: TM seems to store transitory information
(window position or some such) in the project file, thus dirtying my
project. I'd prefer that TM would write that kind of info into a
separate file, so I can chose to track it or not.
How about some TM2 teasers?
Thanks
Gerd
Hello, I now use BBedit rarely, the times TM just flat out amazes me,
I am a happy camper. There are times I still fire up the old BB, but
it gets less and less. Maybe I am getting too old to remember all
these damn keyboard shortcuts :)
1) Is there an <a href... snippet, I can not find it
2) How can I shift selected text right and left one space at a time?
3) Most other apps allow me to drag and drop a text clipping to the
apps icon, and it will open it. In TM, I have to open the clipping,
copy, then new file, then paste. Any workarounds on this one? Oddly,
I find I used this feature a lot and I am missing it.
4) I am liking soft tabs a lot, as they seem to allow me to align
things better, and when files move to other places, they stay lined up
regardless of the tab stop setting. I was happily working in 4 spaces
per tab stop, and wanted to move to 5, changing it did nothing. I had
to convert spaces to tabs, then make the change. I am not entirely
sure what I did really. Can someone give me a primer or point me to
docs on how this works?
* I am often opening tab separated files, and will need to open tabs
to 40 spaces or so, because the launch time to something like Excel is
just too aggravating, TM seems to work against me a little for this
type of work, suggestions?
5) Given code such as:
$foo = 'bar';
$this = 'that';
$something = 'else';
What is a simple way to get to:
$foo = 'bar';
$this = 'that';
$something = 'else';
6) I have picked up this TM book and printed it out, it is helping me
a lot. There is a section on being able to select some sql, and have
it run and show me the output. I am not understanding how to make
this work. I usually have a db.inc that will contain my user and pass
and db name, so it will be well outside the scope of the file I am in,
unless TM can follow that include reference. To be able to run
arbitrary sql would be huge for me, is there a better walk through? I
am just not getting this one to work. I have not tried to be honest,
since I do not understand the setup at all.
7) Any of you care to share your top #1 little tricks, the one thing
you use all the time, that just makes you happy every time you invoke
it? I mainly work in php, so leaning on things that would be helpful
in that area would be nice. Second would be bash, and lately, for
some odd reason, I have been spending some time in TCL, but not much,
so I am not sure how many tricks in there would benefit me in the long
run.
Thanks all... Hey, when is the next version coming out... just
kidding :)
--
Scott * If you contact me off list replace talklists@ with scott@ *
I have an html file containing
<img src="dvipsnames.png"/>
The image renders correctly in the browser and also
in TextMate's builtin preview.
However, if I pipe the same file to Textmate.exit_show_html
the image does not show.
How should I specify the path to the picture so that
Textmate.exit_show_html can find it?
Thanks
Piero