topfunky / PeepOpen-Issues

Bug reports and feature requests for the PeepOpen application
http://peepcode.com/products/peepopen
41 stars 1 forks source link

Broken with saved TextMate projects #250

Open indirect opened 13 years ago

indirect commented 13 years ago

For some reason, PeepOpen has started using the directory that the .tmproj file is saved into as the project root, rather than the directory that the project refers to. Since I don't store my .tmproj files inside the root directory for each of my projects, this means PeepOpen has stopped working for me. Help? :(

topfunky commented 13 years ago

Andre -

That does sound weird, especially if the behavior changed.

I haven't done any programming to use any information in .tmproj files except for using it to find the project root (if there's no .git, Rakefile, or other files).

indirect commented 13 years ago

My project is in git, has a Rakefile, and has a README file. This issue is only present when opening .tmproj files. I use Project Plus to preserve things like my expansion of the file tree between TextMate sessions, which is most of why I bother with the .tmproj files. I have a wrapper for the mate command that executes open foo.tmproj, which means I can open my main projects from anywhere with mate projectname instead of having to cd to the directory and run mate ..

The issue is not present when opening a directory in TextMate, either via drag-and-drop or mate ..

wok commented 13 years ago

I can confirm this issue. I have also noticed the following:

  1. Open project file open foo.tmproj PeepOpen will show all files in the directory where foo.tmproj is located
  2. Open project again using cd foo && mate ..
    • Textmate now opens another project window
    • PeepOpen will show the correct files for the project
    • When selecting a file, the file will actually open in the first project window, i.e. the one opened via foo.tmproj
mhenrixon commented 13 years ago

THANK YOU!!!! The suggestion to save as a project increased the speed of my peepopen to lightspeed!!!!!!

indirect commented 13 years ago

Now if only I could figure out why peepopen works perfectly with projects on one machine, and has the problems outlined above on my other machine. :(

mhenrixon commented 13 years ago

It probably has something to do with regex somehow.

Skickat från min iPhone

18 aug 2011 kl. 16:48 skrev indirectreply@reply.github.com:

Now if only I could figure out why peepopen works perfectly with projects on one machine, and has the problems outlined above on my other machine. :(

Reply to this email directly or view it on GitHub: https://github.com/topfunky/PeepOpen-Issues/issues/250#issuecomment-1839538

pnomolos commented 13 years ago

For those who want to compile yourself, I've pushed a partially fixed version here: https://github.com/pnomolos/PeepOpen-EditorSupport

If the project file has a single directory as the root, it will use that as the project directory being passed to PeepOpen. Didn't have a ton of time, but I'll get to the case of multiple files/directories in the root (go up one directory from the first file and use that as the root).

indirect commented 13 years ago

It works! This is really great, thanks very much for the fix :)

pnomolos commented 13 years ago

No problem! I intend to fix it further so if you don't have a single directory as the root it figures out (hopefully correctly) the root directory and goes from there.

indirect commented 13 years ago

This fix is great for me, since I only have projects with a single directory as the root. I use a little script called tm that I wrote to wrap mate so I can open saved .tmproj files for each of my projects, so this matches my use case perfectly. :)