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
I am pretty sure I just pinned this down to TM. If I work in TM,
save, then command-tab to a browser, there is significant lag from the
time it will switch to the browser, or, at times, even bring up the
application tab switcher.
If I do not save, the toggle is fast, so it seems to be something to
do with leaving TM, where it is not letting me leave as fast as other
apps do.
I have tried toggling back and forth between other apps, and the
behavior is speedy. Any idea what is going on, and how to solve it?
These are simple files, single files, that have a hundred lines or so
in them, nothing complicated at all.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Is the latest (cutting edge) version of textmate intended to run on a
PPC? After updating it today, textmate gives me a "You cannot open the
application "TextMate" because it is not supported on this
architecture" message on my PowerPC G5 (3.1) when I try to open it.
Kyle Johnson
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
When doing Ctrl-Shift-V to use PyChecker/Pyflakes/Pylint, I get a Python
error.
Reason:
my_revision = __version__.split()[1]
>
on Line 346 assumes the __version__ from Line 26 can be split into at least
2 parts. However, Line 26 reads:
__version__ = "$Revision$"
>
When it should read:
__version__ = "$Revision 11734 $" # Not sure what Revision actually refers
> to, Textmate or script version
I am using the latest available TextMate (r1505), with Python 2.6.2 on
10.5.8. However, this Command is most likely broken in every version of
TextMate released since the error was first introduced, since it is a basic
Python error. The feature was at least working in June 2008 according to
this blog about it:
http://arthurkoziel.com/2008/06/28/pyflakes-installation-and-textmate-integ…
Though I must say... What's the use of the revision, exactly?? It seems
that it has only served to break the script and not much else. :)
I've gotten by for now by editing the Python bundle.
Thanks.
I have a question about UI.dialog and/or some general Ruby usage. I
apologize for asking about Ruby stuff here, but this particular problem
seems tied directly to the use of UI.dialog, although I'm pretty sure the
issue is actually a Ruby one on my part (I've been fine Googling for other
Ruby issues, but this one seems pretty niche).
Here's some stripped down code that works:
TextMate::UI.dialog(:nib => nib, :parameters => {}, :center => true) do
|dialog|
dialog.parameters = {'username' => "moo"}
dialog.wait_for_input do |params|
puts params["username"]
end
end
But then I go to try and actually use something with my params hash, like
putting it into a variable declared earlier:
username = ""
TextMate::UI.dialog(:nib => nib, :parameters => {}, :center => true) do
|dialog|
dialog.parameters = {'username' => "moo"}
dialog.wait_for_input do |params|
username = params["username"]
end
end
puts username
Now I get a task that seems to hang, which when forced to quit will report
the following error in Console:
TextMate[13634] *** -[NSMachPort handlePortMessage:]: dropping incoming DO
message because the connection or ports are invalid
Really don't know what to do with this. Sorry, I'm not good enough at either
TextMate's extra features, nor at Ruby. I'm sure this is just a combination
of both of those deficiencies.
Thanks,
Dru
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
Consider the following code:
<gaga>
<bar at1="" at2="" at3="" at4="" at5=""
at6="" at7="" at8="" at9="" at10=""/>
gaga
</gaga>
Re-indenting this gives you the following, which incorrectly doesn't
decrease the indent level after the "/>":
<gaga>
<bar at1="" at2="" at3="" at4="" at5=""
at6="" at7="" at8="" at9="" at10=""/>
gaga
</gaga>
Moving all the attributes (at1 to at10) on a single line is a way around the
problem, but when there are a lot of arguments, it sometimes just makes
sense to have the attributes over multiple lines. I imagine that this could
be fixed by tuning the decreaseIndentPattern and increaseIndentPattern for
XML. Has anyone already done that?
Alex
-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context: http://www.nabble.com/Re-indenting-XML-with-tag-on-multiple-lines-tp2567268…
Sent from the textmate users mailing list archive at Nabble.com.