Hi. Love the app, changed my life, can't wait for multibyte character support, etc. :-)
I went to create a new LaTeX document yesterday and began, as I always do, by typing "temp" and tabbing it to drop me into my template selection menu, only instead of that happening, it throws back a single, cryptic error:
/tmp/temp_textmate.1K8O1q:8: undefined method
The characters after "temp_textmate." are always different, for whatever that's worth.
I have no idea how to approach this problem, and a quick search of the archives doesn't turn up much. Are LaTeX templates still working for other people?
--p.
P. Tuttle Starr 808.291.8923 pts@midaregami.net http://www.midaregami.net/log/
On Nov 1, 2006, at 8:22 PM, Paul Starr wrote:
I have no idea how to approach this problem, and a quick search of the archives doesn't turn up much. Are LaTeX templates still working for other people?
They are working for me in build 1311 (which is the latest as far as I can tell).
-dan
On Nov 1, 2006, at 8:22 PM, Paul Starr wrote:
Hi. Love the app, changed my life, can't wait for multibyte character support, etc. :-)
I have no idea how to approach this problem, and a quick search of the archives doesn't turn up much. Are LaTeX templates still working for other people?
I'm very glad to hear people are using the LaTeX template command! So first of all, restart textmate and try again, just to be on the safe side. Then, in the bundle editor, change the command's output to "Insert as Text" instead of "insert as Snippet". This will give us a bit more of the error output, so that we can see where the problem is.
--p.
Haris
On Nov 1, 2006, at 5:03 PM, Charilaos Skiadas wrote:
I'm very glad to hear people are using the LaTeX template command!
Oh yes, it's wonderfully handy.
So first of all, restart textmate and try again, just to be on the safe side. Then, in the bundle editor, change the command's output to "Insert as Text" instead of "insert as Snippet". This will give us a bit more of the error output, so that we can see where the problem is.
It says:
/tmp/temp_textmate.ClFG6H:8: undefined method `+' for nil:NilClass (NoMethodError)
... maybe my ruby is broken, somehow?
--p
On Nov 1, 2006, at 10:11 PM, Paul Starr wrote:
On Nov 1, 2006, at 5:03 PM, Charilaos Skiadas wrote:
I'm very glad to hear people are using the LaTeX template command!
Oh yes, it's wonderfully handy.
So first of all, restart textmate and try again, just to be on the safe side. Then, in the bundle editor, change the command's output to "Insert as Text" instead of "insert as Snippet". This will give us a bit more of the error output, so that we can see where the problem is.
It says:
/tmp/temp_textmate.ClFG6H:8: undefined method `+' for nil:NilClass (NoMethodError)
This is how the script looks like right now:
#!/usr/bin/ruby # This command is meant to be used for quick insertion of your LaTeX template files. They should be placed # in the directory ~/Library/Application Support/LaTeX/Temmlates. A pop-up is provided, letting you pick # the template file you want inserted, and then it gets inserted as a snippet. See # http://macromates.com/textmate/manual/snippets#snippets for what this implies. require ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes.rb' require ENV['TM_SUPPORT_PATH'] + '/lib/dialog.rb' require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb' path = ENV['HOME'] + '/Library/Application Support/LaTeX/Templates/' unless FileTest.directory?(path) then TextMate.exit_show_tool_tip "You need to create the directory # {path} first and\n populate it with your favorite LaTeX template files before using this command." else files = `ls "#{path}"`.split("\n") TextMate.exit_tool_tip "You need to populate the template directory with some template files!" if files.empty? file_choice = Dialog.menu(files) # Need to fix this exit call here. It should not remove the "temp" part. TextMate.exit_discard if file_choice.nil? print(e_sn(File.read(path + files[file_choice]))) end
As you can see, line 8 is the third of those requires, so I can't see how it can fail without the others failing first. Or perhaps it's ENV ['HOME'] that fails? Anyway, make sure the code looks exactly like what I have above.
If you are on IRC, we can probably try to resolve this through the #textmate channel.
... maybe my ruby is broken, somehow?
--p
Haris
On 02.11.2006, at 04:21, Charilaos Skiadas wrote:
/snip
This is how the script looks like right now:
#!/usr/bin/ruby # This command is meant to be used for quick insertion of your LaTeX template files. They should be placed # in the directory ~/Library/Application Support/LaTeX/Temmlates. A pop-up is provided, letting you pick
/snip
There's a typo in "Temmlates"... Oliver