For a few days now, completion with esc has not been working. What could be the cause? Conflict with other modules? or what?
It does not work with ref{} or cite{}.
Any suggestions appreciated.
Christopher Brewster
***************************************************** Natural Language Processing Group, Department of Computer Science, University of Sheffield
Do you have a custom LaTeX language grammar? What does Ctrl-shift-P say when you are within the brackets?
Dan
On 19 Oct 2006, at 22:00, Daniel Käsmayr wrote:
Do you have a custom LaTeX language grammar? What does Ctrl-shift-P say when you are within the brackets?
\cite{}
text.tex.latex meta.citation.latex punctuation.definition.arguments.latex
\ref{}
text.tex.latex meta.reference.label.latex punctuation.definition.arguments.begin.latex
Is this what they should be?
Christopher
Dan
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Oct 19, 2006, at 5:11 PM, Christopher Brewster wrote:
\cite{}
text.tex.latex meta.citation.latex punctuation.definition.arguments.latex
\ref{}
text.tex.latex meta.reference.label.latex punctuation.definition.arguments.begin.latex
Is this what they should be?
That looks right. Is this a saved file? Try it with both saved files as well as untitled documents. Is it part of a project, via TM_LATEX_MASTER? Are you setting TM_LATEX_BIB? (You don't have to, just checking your settings) How are you testing that it is not working? Does the other completion command work, the one via opt-esc? Make sure that you are up to date, I recently fixed a problem someone else had that sounds possibly similar, though his was with the Command Completion command.
Christopher
Haris
On 19 Oct 2006, at 23:13, Charilaos Skiadas wrote:
Is this what they should be?
That looks right. Is this a saved file? Try it with both saved files as well as untitled documents.
The problem is specific to that project I am afraid. There is no problem with other latex files in other folders.
Is it part of a project, via TM_LATEX_MASTER?
yes it is
Are you setting TM_LATEX_BIB? (You don't have to, just checking your settings)
Checking this I realised for Bibtex the path had changed. So the \cite {} case is solved. But the \ref{} case is still not working (in this project).
How are you testing that it is not working?
for \ref{} put cursor in braces and press esc
Does the other completion command work, the one via opt-esc?
This does nothing.
Make sure that you are up to date, I recently fixed a problem someone else had that sounds possibly similar, though his was with the Command Completion command.
I am up to date.
Thanks,
Christopher
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Oct 20, 2006, at 6:35 AM, Christopher Brewster wrote:
The problem is specific to that project I am afraid. There is no problem with other latex files in other folders.
Ah, that's a rather important piece of information you omitted in your previous email.
Is it part of a project, via TM_LATEX_MASTER?
yes it is
Make sure that the path in TM_LATEX_MASTER is an absolute path, not a relative one. I.e. it should be like /User/yourname/...... Then opt-esc should start working.
How are you testing that it is not working?
for \ref{} put cursor in braces and press esc
Well, unless you start the word, then esc doesn't have anything to complete. The completion command is never called in that case. So esc needs the first letter. opt-esc works just fine without a letter, but esc can't.
Does the other completion command work, the one via opt-esc?
This does nothing.
This should work with an absolute path for TM_LATEX_MASTER.
Thanks,
Christopher
Haris
Reading this thread, I noticed that I cannot make the opt-esc commands to work... How can I have some debugging output : it silently fails…
Addentum : the label completion works. Only the bibliography completion does not work. I suspect a scope problem : with the caret inside a \cite{}, opt-esc brings the list of labels, because the label completion command has a scope of text.latex…
Addentum 2 : just reinstalled the LaTeX bundle. the default scope is now text.tex.latex instead of text.latex ??!! That might cause problems with custom commands…
On Oct 20, 2006, at 12:24 PM, guerom00 wrote:
Addentum 2 : just reinstalled the LaTeX bundle. the default scope is now text.tex.latex instead of text.latex ??!!
Yes, there were a number of very good technical reasons to do so, chief among them being that latex should indeed inherit from tex. This way, you can use text.tex to target all tex flavors, like LaTeX, ConTeXt etc.
The release notes mention the change btw. (Yes I know, not everyone reads the release notes ;) )
That might cause problems with custom commands…
Yes I'm afraid so, you'll have to change the scopes of your custom commands from text.latex to text.tex.latex, or text.tex if you think your command is not restricted to latex exclusively. Rest assured, that this is not something likely to happen again. We knew it would inconvenience some users, but it was something that needed to be done. It should have been done all along when these scopes were first created. There were a couple of other slight scope changes that could cause problems, namely the scope for citations is now meta.citation.latex. So I would suggest checking all custom commands to make sure their scope selectors are what they should be, based on where those commands are supposed to be triggered.
Haris
Charilaos Skiadas <skiadas@...> writes:
On Oct 20, 2006, at 12:24 PM, guerom00 wrote:
Addentum 2 : just reinstalled the LaTeX bundle. the default scope is now text.tex.latex instead of text.latex ??!!
Yes, there were a number of very good technical reasons to do so, chief among them being that latex should indeed inherit from tex. This way, you can use text.tex to target all tex flavors, like LaTeX, ConTeXt etc.
Thanks for your answer. That basically broke all of my custom commands, but it's OK :-), was easy to fix.
After double checking everything, even updated the $TM_SUPPORT_PATH directory, I'm still left with the Bibliography completion command which silently fails…
On Oct 20, 2006, at 1:44 PM, guerom00 wrote:
Charilaos Skiadas <skiadas@...> writes:
On Oct 20, 2006, at 12:24 PM, guerom00 wrote:
Addentum 2 : just reinstalled the LaTeX bundle. the default scope is now text.tex.latex instead of text.latex ??!!
Yes, there were a number of very good technical reasons to do so, chief among them being that latex should indeed inherit from tex. This way, you can use text.tex to target all tex flavors, like LaTeX, ConTeXt etc.
Thanks for your answer. That basically broke all of my custom commands, but it's OK :-), was easy to fix.
After double checking everything, even updated the $TM_SUPPORT_PATH directory, I'm still left with the Bibliography completion command which silently fails…
Do you have TM_LATEX_BIB set? If so what is its value? Does the command work when run directly from the menu? If not, does this problem persist if you create a brand new project, and create a tex file and a bib file in it, the tex file containing a \bibliography{bibfile} command (and the file being saved) and the bib file containing some sample entries?
Haris
Charilaos Skiadas <skiadas@...> writes:
Do you have TM_LATEX_BIB set? If so what is its value? Does the command work when run directly from the menu? If not, does this problem persist if you create a brand new project, and create a tex file and a bib file in it, the tex file containing a \bibliography{bibfile} command (and the file being saved) and the bib file containing some sample entries?
Haris
Thank you very much for your answer. I see the problem now. I don't have any .bib file. I just use the \begin{thebibliography}…\end{thebibliography} environment in my .tex file :-) That's my mehod of choice when writing scientific papers with relatively small biliography.
Any chance to modify your bibliography completion command to work with the “thebibliography” environment ? ;)
On Oct 20, 2006, at 5:35 PM, guerom00 wrote:
Any chance to modify your bibliography completion command to work with the “thebibliography” environment ? ;)
I just committed a fix. It only scans the current file I'm afraid, but it should work. You'll have to update the global support directory.
Haris
Charilaos Skiadas <skiadas@...> writes:
I just committed a fix. It only scans the current file I'm afraid, but it should work. You'll have to update the global support directory.
That works great. Thanks !
One very little thing though : when the caret is inside empty braces of a \cite{}, it does not work. I have to type in at least one character, whatever it is, and then, the completion works… Looking at your command, it has to do with the definition of $phrase.
Thanks again.
On Oct 20, 2006, at 7:29 PM, guerom00 wrote:
One very little thing though : when the caret is inside empty braces of a \cite{}, it does not work. I have to type in at least one character, whatever it is, and then, the completion works… Looking at your command, it has to do with the definition of $phrase.
Try now.
Thanks again.
Haris
On 20 Oct 2006, at 15:53, Charilaos Skiadas wrote:
Does the other completion command work, the one via opt-esc?
This does nothing.
This should work with an absolute path for TM_LATEX_MASTER.
Using TextMate--> Show Variables command, I discovered that the TM_LATEX_MASTER is pointing to the wrong directory. I have tried updating this but this does not change (in the sense that when I run 'show variables' it remains the same). I tried quitting from Textmate and re-starting and still the same problem. I tried re-booting and still the file shown in the preferences--> shell variables pane is different from that shown by 'Show variables' I tried to uncheck the check box - still the same problem. Could this be the cause of my \ref{} problem?
Any ideas?
Christopher
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Oct 20, 2006, at 2:33 PM, Christopher Brewster wrote:
On 20 Oct 2006, at 15:53, Charilaos Skiadas wrote:
Does the other completion command work, the one via opt-esc?
This does nothing.
This should work with an absolute path for TM_LATEX_MASTER.
Using TextMate--> Show Variables command, I discovered that the TM_LATEX_MASTER is pointing to the wrong directory. I have tried updating this but this does not change (in the sense that when I run 'show variables' it remains the same). I tried quitting from Textmate and re-starting and still the same problem. I tried re-booting and still the file shown in the preferences--> shell variables pane is different from that shown by 'Show variables' I tried to uncheck the check box - still the same problem. Could this be the cause of my \ref{} problem?
Any ideas?
So, there are two places where TM_LATEX_MASTER can be defined. There is the shell variables in the preferences area. That's usually not the best thing for this variable since in general we want a different variable for each project. So to begin with, you should certainly unset it there, unless you really know why you've set it in the first place.
What you want to look at now is in your project. (http:// macromates.com/textmate/manual/ environment_variables#project_dependent_variables) At the bottom of the project drawer there is a little "info" button. It is usually disabled, and to enable it you have to make sure there is no file selected in the drawer (i.e. click on some empty space in the drawer). This enables the button, and when you click on it it brings up a window much like the "shell variables" window in the preferences. Except that the variables here are only set when working with this particular project, and different projects can have different variables associated with them. My guess is that this is where TM_LATEX_MASTER is set to its incorrect value.
Christopher
Haris