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
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@ *
Hello,
How can I get 10.5.6 to use TextMate as the default application to
open text files instead of using TextEdit?
For example, if I do the following, I'd like the new file to open in
TextMate:
grep 'test' *.c > newfile
open newfile
Currently, this opens in TextEdit (ugh).
For files with an extension, I can get the system to use TextMate for
all files with that extension.
But I'd like something that works automatically for files without
extensions (like "newfile" in the example).
Also while it works to use "get info" to set the "open with"
application for an existing file,
when I do "Change All..." to use TextMate, I get the following error:
An error occurred while changing the application that
open "newfile" because not enough information is
available.
I'm using Version 1.5.8 (1498).
Thanks,
Bill Paxton
Hello, long-time Emacs user / new TextMate user here. I wanted to drop
by and say "hi", say how much I am loving TextMate so far (I thought
nothing would drag me away from Emacs), and discuss a couple of
features that I miss.
Firstly, I was on the whole a very happy user of Emacs, and an article
I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP
web development was even mentioned in the O'Reilly Emacs book. I'd
tried TextMate a couple of years ago and not liked it, but I tried it
again a few weeks ago and was blown away.
However there are two things that I miss. I have done a Google search
on the mailing list archives and couldn't see much discussion of
either of these, but please appreciate that the mailing list archive
is very large and I'm new here so I apologies in advance if I'm just
raking over things that have been discussed to death.
1. Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this
area. I should be able to put the cursor between say "})" and have the
two closing parentheses highlighted in different colours and have
their corresponding opening parenthese highlighted in matching colours.
2. The ability to parse DTDs and Schemas for automagic knowledge of
markup languages
This is much more of a tall order, but it is something that PSGML mode
and nXML mode provide in Emacs, and to some extent it is similar to
what AUC-TeX provides for LaTeX editing in Emacs. With PSGML mode and
nXML mode I can open any type of SGML or XML document and as long as
Emacs can find the DTD or the Schema it automatically understands the
language in question: it knows what elements are part of the language,
where they can be inserted, what attributes those elements can have
and even what attribute values they can have. That means that you
don't need to write a MathML mode, an SVG mode, etc. In TextMate I
needed to hand edit an SVG file but there is no SVG bundle, just an
XML one. It was the first time in weeks I had to use Emacs. Similarly
work is progressing rapidly now on HTML 5. Support will have to be
laboriously added to TextMate for this in the absence of something
which simply understood the DTD or Schema. AUC-TeX on Emacs worked in
a similar way, in that it was capable of parsing the LaTeX packages
you were using and automatically extracting the commands and
environments they used and adding them to menus.
As I understand it, the features of TextMate 2.0 are somewhat shrouded
in mystery, but I understand that the underlying engine for language
grammars is being re-written. Does anyone know if the kind of feature
I discussed is likely to be possible in TextMate 2? Maybe it is
already possible in TextMate 1, but no one else has seen a need for it?
Anyway, so far the pros of TextMate are outweighing the cons. There
were a large number of niggles with Emacs that were driving me up the
wall, and so far it has been a joy to switch to TextMate. Better paren
matching seems like something that just needs to be there. A more
intelligent way for dealing with markup languages is highly desirable
from my point of view, and could in the long-term end up being a deal-
breaker. I'd be interested to hear what others think.
Best, Darren