Allan,
Many thanks - that does fix the symptoms, but I remain puzzled about the original nature of the problem. For total clarity, if I put the old "projectDirectory" line back, then these are my steps to reproduce the problems:
(0. Close all windows in open TextMate, then quit.) 1. Open TextMate. An empty window appears. Close it. 2. File -> Open Recent -> "docs" (a subdirectory of "Git"). A window with an untitled tab appears, with " — untitled" as the window title. CPU usage goes up to 100% (and stays there). 3. Select a .tex file from the project window. Window title is now "docs — myfile.tex", as intended. CPU usage goes up to 200% (and stays there). So the problem seems to spread beyond untitled files. 4. Press ⌘R. Nothing happens.
With the modified .tm_properties, everything is fine. Is the problem with the .tm_properties file blocking the thread that would be used to run the command?
I was aware of the empty part of the window title for untitled files, but it never seemed to cause a problem before, and since I don't work with untitled files for long I wasn't bothered about fixing it from an aesthetic point of view. Either way, it seemed like a harmless thing (until now!).
All the best, Jon
On 15 February 2013 05:05, Allan Odgaard mailinglist@textmate.org wrote:
On Feb 13, 2013, at 16:50, Jon Clayden jon.clayden@gmail.com wrote:
Just to follow up, it seems that this may be related to my
.tm_properties file. I have
projectDirectory =
"${TM_FILEPATH/(/Users/jon/Development/Git/[^/]+).*/$1/}"
Try instead to set it like this:
projectDirectory =
"${TM_FILEPATH:?${TM_FILEPATH/(/Users/jon/Development/Git/[^/]+).*/$1/}:$projectDirectory}"
When there is no file path (untitled files) you were setting the project directory to an empty string, which would explain the CPU spike (though I’ll add some code to reject the user’s project directory value if it’s not a valid path).
As the bogus project directory you set is only for untitled files, I wouldn’t think it would limit command execution for when a file with a path is the active.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate