Hi there
I didn't use LaTeX for some time with TM and started to use it again today. I noticed the bibliography completion stopped working. I remember some message by Haris on the list about removing an environment.plist file which was necessary once. So I removed the file but didn't use LaTeX until today. Now when using escape in a cite scope, I get a spinning beach ball and I have to kill the command via Command-. . If I use Alt+Esc I also get the spinning beach ball and after killing the command I get this error message:
/Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb:84:in `parse_bibfile': Interrupt from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 71:in `map' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 71:in `parse_bibfile' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 193:in `cite_scan' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 191:in `call' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 163:in `recursive_scan' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 162:in `each' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 162:in `recursive_scan' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 161:in `each_pair' ... 6 levels... from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 153:in `recursive_scan' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 196:in `cite_scan' from /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb: 23:in `get_citations' from /tmp/temp_textmate.vAzA1V:8 }
Another thing, which stopped working, is the template insertion command. When I write 'temp' and hit tab I get the following error:
sh: line 1: ls: command not found /tmp/temp_textmate.NvRU8j:14: undefined method
So could someone please update me on the current way of making the Bib-completion and template insertion work (variables, plist-files, or similar) and/or maybe add it to the LaTeX help-file? I'm updating my bundles via svn so I should have the most recent commands etc. I'm also using the latest cutting edge build of TM.
Big Thanks in advance! Best. Oliver
On Feb 19, 2007, at 12:12 PM, Oliver Hagmann wrote:
Hi there
I didn't use LaTeX for some time with TM and started to use it again today. I noticed the bibliography completion stopped working. I remember some message by Haris on the list about removing an environment.plist file which was necessary once. So I removed the file but didn't use LaTeX until today.
Make sure to restart the computer since that point.
Now when using escape in a cite scope, I get a spinning beach ball and I have to kill the command via Command-. . If I use Alt+Esc I also get the spinning beach ball and after killing the command I get this error message:
Sounds like it has trouble parsing the bib-file. Can you send me the offending bib file, and also try with a smaller/simpler bib file?
Another thing, which stopped working, is the template insertion command. When I write 'temp' and hit tab I get the following error:
sh: line 1: ls: command not found /tmp/temp_textmate.NvRU8j:14: undefined method
Hm, this is interesting. Seems to indicate some problem with your shell. The command that fails here is one trying to run "ls" from the command line. Try to type "ls" without the quotes in a line in a TM document, and press Ctrl-R to have it execute in shell. Do you get the same error? What if you type "`ls`", i.e. ls surrounded by backticks, and run the "Execute Line As Ruby" command from the ruby bundle? What if you run ls from the terminal?
Big Thanks in advance! Best. Oliver
Haris
PS: Should that command not be in the source/textmate bundle instead? A lot of people have the ruby bundle disabled since they don't use ruby, but we still need that command for diagnostic purposes every now and then.
On 19. Feb 2007, at 21:23, Charilaos Skiadas wrote:
PS: Should that command not be in the source/textmate bundle instead? A lot of people have the ruby bundle disabled since they don't use ruby, but we still need that command for diagnostic purposes every now and then.
Well, ⌃R can also be used for diagnostic purposes :)
Though to skip the bash_init.sh, one will need to use a shebang, for example select the following two lines and press ⌃R (to get the PATH without the bash_init.sh stuff):
#!/bin/sh echo "$PATH"
On Feb 19, 2007, at 3:28 PM, Allan Odgaard wrote:
Well, ⌃R can also be used for diagnostic purposes :)
Right, though to make it tell us how a ruby command would process something, we would need the shebang line etc. I.e. I would need to use:
#!/usr/bin/env ruby `ls`
I guess most users would just copy and paste anyway, so one extra line wouldn't hurt.
To return to the question at hand ;) Oliver, try this also:
#!/bin/sh ls
And select and run via ^R.
Though to skip the bash_init.sh, one will need to use a shebang, for example select the following two lines and press ⌃R (to get the PATH without the bash_init.sh stuff):
#!/bin/sh echo "$PATH"
Haris
On 19.02.2007, at 21:33, Charilaos Skiadas wrote:
To return to the question at hand ;) Oliver, try this also:
#!/bin/sh ls
/tmp/temp_textmate.4bZc1d: line 2: ls: command not found
And select and run via ^R.
Though to skip the bash_init.sh, one will need to use a shebang, for example select the following two lines and press ⌃R (to get the PATH without the bash_init.sh stuff):
#!/bin/sh echo "$PATH"
/usr/local/teTeX/bin/powerpc-apple-darwin-current/
Haris
Oliver
On Feb 19, 2007, at 4:22 PM, Oliver Hagmann wrote:
Though to skip the bash_init.sh, one will need to use a shebang, for example select the following two lines and press ⌃R (to get the PATH without the bash_init.sh stuff):
#!/bin/sh echo "$PATH"
/usr/local/teTeX/bin/powerpc-apple-darwin-current/
This means that your PATH variable is not set up properly. It should be including things like /bin, /sbin, /usr/bin, /usr/sbin at the very least.
Haris
Oliver
Haris
On 19.02.2007, at 22:57, Charilaos Skiadas wrote:
#!/bin/sh echo "$PATH"
/usr/local/teTeX/bin/powerpc-apple-darwin-current/
This means that your PATH variable is not set up properly. It should be including things like /bin, /sbin, /usr/bin, /usr/sbin at the very least.
I have a TM shell variable called PATH in TextMate. When I deactive it, I get from the above command:
/usr/bin:/bin:/usr/sbin:/sbin
and when using temp+TAB now, the template gets inserted. Should I just add them to the PATH variable in TM or is there another solution? I also have the following lines in my .bash_profile, if this is of any use for you:
export PATH="${HOME}/bin:$PATH" export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" export PATH="/opt/local/bin:$PATH" export PATH="/usr/local/teTeX/bin/powerpc-apple-darwin-current:$PATH"
Oliver
On Feb 19, 2007, at 5:07 PM, Oliver Hagmann wrote:
I have a TM shell variable called PATH in TextMate. When I deactive it, I get from the above command:
/usr/bin:/bin:/usr/sbin:/sbin
and when using temp+TAB now, the template gets inserted. Should I just add them to the PATH variable in TM or is there another solution?
I would say try for a bit without the PATH variable in TM, you don't need it probably, and setting it confuses things.
I also have the following lines in my .bash_profile, if this is of any use for you:
export PATH="${HOME}/bin:$PATH" export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: $PATH" export PATH="/opt/local/bin:$PATH" export PATH="/usr/local/teTeX/bin/powerpc-apple-darwin-current:$PATH"
Oliver
Haris
On 19.02.2007, at 21:23, Charilaos Skiadas wrote:
Now when using escape in a cite scope, I get a spinning beach ball and I have to kill the command via Command-. . If I use Alt+Esc I also get the spinning beach ball and after killing the command I get this error message:
Sounds like it has trouble parsing the bib-file. Can you send me the offending bib file, and also try with a smaller/simpler bib file?
I sent you the file off list.
Another thing, which stopped working, is the template insertion command. When I write 'temp' and hit tab I get the following error:
sh: line 1: ls: command not found /tmp/temp_textmate.NvRU8j:14: undefined method
Hm, this is interesting. Seems to indicate some problem with your shell. The command that fails here is one trying to run "ls" from the command line.
This gives me the usual output. I have "alias ls='ls -lahFGp'" in my .bash_profile, so I get a detailed and colored output.
Try to type "ls" without the quotes in a line in a TM document, and press Ctrl-R to have it execute in shell. Do you get the same error?
This works. I get the usual output with each folder and file on one line: Applications Desktop DB Desktop DF Developer Library Network System Users Volumes automount bin cores dev etc mach mach.sym mach_kernel opt private sbin tmp usr var
What if you type "`ls`", i.e. ls surrounded by backticks, and run the "Execute Line As Ruby" command from the ruby bundle?
I get "SyntaxError"
What if you run ls from the terminal?
This is the same as running the command from the command line, isn't it?
Haris
Best. Oliver
On Feb 19, 2007, at 4:20 PM, Oliver Hagmann wrote:
On 19.02.2007, at 21:23, Charilaos Skiadas wrote:
Now when using escape in a cite scope, I get a spinning beach ball and I have to kill the command via Command-. . If I use Alt +Esc I also get the spinning beach ball and after killing the command I get this error message:
Sounds like it has trouble parsing the bib-file. Can you send me the offending bib file, and also try with a smaller/simpler bib file?
I sent you the file off list.
Ok, there were two problems with it. The one is that you were using dots in the cite keys, and my code was not expecting that. So I fixed the code and submitted a commit.
The other is that you have "terms@del.icio.us" in the Annote field at some point. That at sign is throwing the system off. Change it to "terms at del.icio.us" and svn up it should work just fine.
(It's a bit harder to work around that one, and I'm not even sure it's entirely valid, though I don't really know).
Haris
On 19.02.2007, at 22:49, Charilaos Skiadas wrote:
I sent you the file off list.
Ok, there were two problems with it. The one is that you were using dots in the cite keys, and my code was not expecting that. So I fixed the code and submitted a commit.
The other is that you have "terms@del.icio.us" in the Annote field at some point. That at sign is throwing the system off. Change it to "terms at del.icio.us" and svn up it should work just fine.
(It's a bit harder to work around that one, and I'm not even sure it's entirely valid, though I don't really know).
Hooray! It works again now. Thanks for the help.
Cheers Oliver
On Feb 19, 2007, at 13:49, Charilaos Skiadas wrote:
On Feb 19, 2007, at 4:20 PM, Oliver Hagmann wrote:
On 19.02.2007, at 21:23, Charilaos Skiadas wrote:
Now when using escape in a cite scope, I get a spinning beach ball and I have to kill the command via Command-. . If I use Alt +Esc I also get the spinning beach ball and after killing the command I get this error message:
Sounds like it has trouble parsing the bib-file. Can you send me the offending bib file, and also try with a smaller/simpler bib file?
I sent you the file off list.
Ok, there were two problems with it. The one is that you were using dots in the cite keys, and my code was not expecting that. So I fixed the code and submitted a commit.
The other is that you have "terms@del.icio.us" in the Annote field at some point. That at sign is throwing the system off. Change it to "terms at del.icio.us" and svn up it should work just fine.
(It's a bit harder to work around that one, and I'm not even sure it's entirely valid, though I don't really know).
As long as you're within the entry, this should be valid BibTeX (and a quick test indicates that BibDesk parses it without complaint). Of course, this is also valid:
@article ( citekey , author = "Ann Author", title = {Mixing quotes is bad}, date = "17~" # jun, keywords = "BibTeX syntax is b{"a}d" )
so about the best you can do with an ad-hoc parser is fail gracefully when you find something weird ;).
-- Adam