... how I stopped worrying and learned to love absolute paths.
Hey all, new (<24hrs) TextMate user, and as a recovering emacs/Alpha user, I am *LOVING* this thing. I have hopes for one use of the Projects that I can't seem to get working, and my investigations make me think that I'm just trying to abuse the poor things more than they're intended to be.
Scenario:
I have a large (stable) code base that I'm working with, and am doing a number of investigations into the code to figure out how the bloody thing works. It occurred to me that I might be able to use Projects as a way of tracking these investigations:
1) Drop top folder of source repository on TextMate. 2) Start digging through code, leaving windows open as tabs. 3) When I'm done, I have a list from left to right of the files I ended up looking at, and the last place I looked in them. 4) Save the project with an appropriate name related to the *topic* "DataFileSearching.tmproj" for example. 5) At later date, when I need to revisit the investigation, I have breadcrumbs of where I went, what I looked at, etc. I also have a timestamp on the Project file of the last time it was worked on. (I considered using Groups in a Project, but that doesn't give me a workset, or a timestamp.)
Now the problem... if I move the Project file, it breaks all the folder references. My first thought was that after step 1, but before I open any files, I just needed to select the top level in the Project, Get Info, and then check Save as Absolute Path. I peeked into the .tmproj file, and yup, a nice absolute path was created for me. Moving the Project file resulted in it still being able to find the root of the source tree. Problem one down.
Now for the second problem... if any files are open, and I save the Project, *those* paths are *NOT* saved as absolute, and instead are relative to where the .tmproj file resides. If I move the file, I lose all my breadcrumbs. Bummer.
So this boils down to: am I missing something, or is this a bug to file?
On Apr 26, 2006, at 6:45 PM, Jason McC. Smith wrote:
- At later date, when I need to revisit the investigation, I have
breadcrumbs of where I went, what I looked at, etc. I also have a timestamp on the Project file of the last time it was worked on.
Brilliant! I never thought of that. That's a great idea.
thomas Aylott—subtleGradient—oblivious@subtleGradient.com
Jason McC. Smith wrote:
I have a large (stable) code base that I'm working with, and am
doing a number of investigations into the code to figure out how the bloody thing works. It occurred to me that I might be able to use Projects as a way of tracking these investigations:
1) Drop top folder of source repository on TextMate. 2) Start digging through code, leaving windows open as tabs. 3) When I'm done, I have a list from left to right of the files I
ended up looking at, and the last place I looked in them. 4) Save the project with an appropriate name related to the *topic* "DataFileSearching.tmproj" for example. 5) At later date, when I need to revisit the investigation, I have breadcrumbs of where I went, what I looked at, etc.
Yeah, I open 3-4 projects of the same source folder, with different sets of files open. It works great!
-Jacob
On 27/4/2006, at 0:45, Jason McC. Smith wrote:
[...] So this boils down to: am I missing something, or is this a bug to file?
It’s a bug, yes -- I had a look at the code, and everything assumes that everything is relative to the project directory (when saving and loading), and the project directory is that which contain the tmproj file.
I’m going to scrap all this code for 2.0, so I probably will not go through the process of “fixing” all of this to work as expected (with absolute paths) in the 1.5.x branch.
Hopefully the problem will not surface too often.
On Apr 27, 2006, at 01:05, Allan Odgaard wrote:
On 27/4/2006, at 0:45, Jason McC. Smith wrote:
[...] So this boils down to: am I missing something, or is this a bug to file?
It’s a bug, yes -- I had a look at the code, and everything assumes that everything is relative to the project directory (when saving and loading), and the project directory is that which contain the tmproj file.
I’m going to scrap all this code for 2.0, so I probably will not go through the process of “fixing” all of this to work as expected (with absolute paths) in the 1.5.x branch.
Hopefully the problem will not surface too often.
Hmm. Well, a simple shell script to extract the root and then mangle the references to match might be possible as a post-processing step after moving the .tmproj file. User initiated, but at least it would keep the references correct.
I just didn't want to start on that effort if there was something I was missing. Thanks for the feedback.