I'm using groups so that I can hove more that on project folder per TextMate instance. TextMate seems unable to deal with this. Many commands that use the project directory environment variable - such as Subversion - fail. And sometimes the value is set to '/' and other times it is set to an actual folder in the group.
Is this a known defect? Is there a workaround?
Thanks.
On 14/5/2006, at 22:21, Timothy Reaves wrote:
[...] Is this a known defect? Is there a workaround?
The project directory is heuristically determined based on the content of your project. So that works best when there is just one top level folder reference [1].
You can set the TM_PROJECT_DIRECTORY manually as part of the project specific environment variables to override the heuristic.
[1] It used to be the folder of the .tmproj file, but many keep this one outside the actual project directory.
On May 15, 2006, at 9:47 AM, Allan Odgaard wrote:
On 14/5/2006, at 22:21, Timothy Reaves wrote:
[...] Is this a known defect? Is there a workaround?
The project directory is heuristically determined based on the content of your project. So that works best when there is just one top level folder reference [1].
You can set the TM_PROJECT_DIRECTORY manually as part of the project specific environment variables to override the heuristic.
Ya, but that wouldn't be correct either. The heuristic that it should be using is the top level file system folder (as added to the project drawer) for either the file being edited, or the selected folder in the drawer.
On 16/5/2006, at 1:21, Timothy Reaves wrote:
Ya, but that wouldn't be correct either. The heuristic that it should be using is the top level file system folder (as added to the project drawer) for either the file being edited, or the selected folder in the drawer.
No, the project folder is unrelated to the current file or the currently selected file/folder in the drawer. There are other variables to give you that -- the project folder is supposed to be the common ancestor of all files in your project.
On May 15, 2006, at 7:27 PM, Allan Odgaard wrote:
On 16/5/2006, at 1:21, Timothy Reaves wrote:
Ya, but that wouldn't be correct either. The heuristic that it should be using is the top level file system folder (as added to the project drawer) for either the file being edited, or the selected folder in the drawer.
No, the project folder is unrelated to the current file or the currently selected file/folder in the drawer. There are other variables to give you that -- the project folder is supposed to be the common ancestor of all files in your project.
I understand this; but what if all the files in your project do not have a common ancestor?
As TextMate provides no meaningful way of doing things like code insight / completion, I have a group that contains my project folder, and a group that contains the source for libraries I use. This arrangement in theory allows me to perhaps do text processing with regular expressions to find class definitions in the libraries. But to do this, the libraries must be part of the project. But they are not part of my code base, and do not belong there. Hence the two groups.
I can not seem to find how to specify project specific environment variables as you referred to in your previous post. And it seems to me that what I suggest is not that unreasonable. Why not have the project folder - or even add a variable called parent_group_folder or some such - that is the top most folder in the group for the file that is current in the editor? As TextMate can only shell to other programs, and play with regular expressions, I'd think this a valuable piece of information to have at hand. I could even pass a list of these - on for each group in the project - to an external application for more developer type activities.
On May 15, 2006, at 9:54 PM, Timothy Reaves wrote:
I can not seem to find how to specify project specific environment variables as you referred to in your previous post.
With a project open, make sure that there are no files selected in the drawer, by clicking on some empty area there (this is trickier than it should be, but anyway). In that case, the "i" appearing in the bottom right of the drawer should be clickable. Click on it, and now you can set project specific variables.
Allan, is there really any way to have that button grayed out when there are files elected? I am guessing you were thinking that it should not be active since it does not pertain to files, but it is clear that all the other buttons there pertain to the project, and they do not get grayed out, so I don't see why the info/variables one should.
Haris
On 16/5/2006, at 6:20, Charilaos Skiadas wrote:
[...] I am guessing you were thinking that it should not be active since it does not pertain to files [...]
This is one of the many things which will change in 2.0. The reason behind most things is that this was the easiest to do at the time.