2008/6/26 Jan Michael jan.michael@gmail.com:
Since a few days this doesn't work as before, cause I'm running in a closed loop. When textmate starts watching my main document (the thesis is splitted in several files) it successfully compiles the document with pdflatex and displays me the result in my preferred viewer Skim. But after having done this it recompiles the whole file again and then reloads the file in Skim.
It definitely should not do this!
If you can't diagnose the problem yourself (see below), perhaps you could send me a copy of your project so I can try and track it down. If you can cut it down to a minimal example, that would be even better.
Wether there is a bug of "latex_watch.pl" or it observes a file which is updated through the initial and every following compilation and therefore runs in a closed loop.
From your description, it is definitely a bug in latex_watch. You are
probably right about the cause of it, too. I would guess that the compilation process is changing a file, which is triggering a new compilation, and so on. My code is supposed to detect this situation and not go into a loop, but it sounds as though it isn't working correctly with your document.
My question is now. How can I analyze the problem (closed loop). Is there a way to put the latex.tmbundle in debug mode so I can see some log messages? I tried this already by specifing the projects variable "TM_LATEX_WATCH_DEBUH = dialog" but without any success. I didn't found the debug output on my disk.
If you set TM_LATEX_WATCH_DEBUG (I assume your version was a typo!) to anything at all, debugging messages will be printed to the system console. Early versions had an option to display debugging messages in a series of dialog boxes, which it looks as though you were trying to invoke, but that option no longer exists. You can see these messages using /Applications/Utilities/Console.app. They should tell you why the project is being recompiled, so you should be able to tell which file it thinks has changed.
Let me know what you find. Sorry about the problem.
Robin