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,
I'm trying to enhance the Matlab bundle. Especially by trying to make
matlab and texmate to interact (shortcut to launch a script etc...).
And I must say I'm pretty bad with shell scripts and regular
expressions.
I've nevertheless managed to do that, and now I'm trying to recreate
matlab "cell mode" : matlab source files are scripts, and it is
possible to divide the script in "cells". When you are in the (awful)
matlab editor, you can run the current cell just with cmd+enter. This
is very useful. The problem is that the cell separator is just a line
like this :
%% Title of the new cell
...That's it, there is no ending marker for a cell : the current cell
ends where the new one starts ! What I've done now is creating a new
"cell" scope delimited by these lines, but as soon as one "%% ...."
line is used to mark the end of a scope, it can't be used to start the
following one.
Here's my descriptor.
contentName = 'meta.cell.matlab';
begin = '%%.*$\n';
end = '%%.*$\n';
captures = { 0 = { name = 'meta.celltitle.matlab'; }; };
patterns = (
# Here I include all the other scope descriptors, because they can
be contained in a cell !
)
For my solution to work, I then have to use two of these "%% ..."
lines, one to end the previous cell scope, and one to start the new
one. This means matlab files need to be modified to work, which is not
so good !
Do you have an idea on how to solve this problem ?
A linked problem (but less important) is that I can't get code folding
to work with cells : a start marker can't be the same as an end marker.
Thank you !
Hello,
When accessing various bundle features I get (LoadErrors).
This is on 10.3.9 using 1.5.7 (1436). On 10.4.9 same version, no errors.
First question, is this version 10.3.9 functional. I could not find anything in
the notes or on the site.
If this is not a 10.3 issue then these are the errors I have been receiving:
This is the Error I get issue php-help:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1:in
`require': No such file to load -- erb (LoadError) from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1
env: ruby -wKU: No such file or directory
I also the this error when issue html tidy:
env: ruby -wKU: No such file or directory
I get both the above from numerous commands.
I searched the thread, and based upon what I can find, I believe my environment
variables are correct.
One guess is an issue with this could be a result of an older Ruby install:
10.3.9 uses Ruby ver. 1.6.8; 10.4.9 uses 1.8.2.
One post referenced a ruby test:
feed these lines to Terminal do you see this output?
=====
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
-e:1: undefined method `url_encode' for main:Object (NoMethodError)
$ /usr/bin/ruby -r cgi -e 'p CGI.escape("a test")'
"a+test"
my results:
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
/usr/bin/ruby: No such file to load -- erb (LoadError)
But the suggestion confused me.
Suggestions?
Thank You,
dmp