PeepOpen-Issues icon indicating copy to clipboard operation
PeepOpen-Issues copied to clipboard

Broken with saved TextMate projects

Open indirect opened this issue 14 years ago • 10 comments

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? :(

indirect avatar Aug 08 '11 17:08 indirect

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).

  • Is your project in Git? (or has other identifying files as found in Preferences > Advanced > Project Root Pattern)
  • Do you open the project by dragging a directory to TextMate, or by double-clicking on a .tmproj file? (the latter could cause this problem)

topfunky avatar Aug 08 '11 19:08 topfunky

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 ..

indirect avatar Aug 08 '11 21:08 indirect

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

wok avatar Aug 12 '11 09:08 wok

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

mhenrixon avatar Aug 18 '11 12:08 mhenrixon

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. :(

indirect avatar Aug 18 '11 14:08 indirect

It probably has something to do with regex somehow.

Skickat från min iPhone

18 aug 2011 kl. 16:48 skrev [email protected]:

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

mhenrixon avatar Aug 18 '11 15:08 mhenrixon

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).

pnomolos avatar Sep 14 '11 04:09 pnomolos

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

indirect avatar Sep 14 '11 07:09 indirect

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.

pnomolos avatar Sep 14 '11 07:09 pnomolos

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. :)

indirect avatar Sep 14 '11 07:09 indirect