vellerefond / project-ring

Project management for the Atom editor.
GNU General Public License v2.0
15 stars 8 forks source link

Close Previous Project Files #4

Closed petey closed 9 years ago

petey commented 9 years ago

This project manager seems to have a lot of promise. I'm looking forward to seeing how it develops. That said, the setting "Close Previous Project Files" does not seem to do anything when checked (or unchecked). I switch between projects a lot and having files left behind makes things confusing.

Additionally, I was hoping for the files I had open before I switched projects to open again when I go back to that project. It isn't clear to me if this is an expected feature, but I could not get it to work with the settings provided.

vellerefond commented 9 years ago

Everything you have written about the desired behavior is exactly what should be happening having set "Close Previous Project Files" and keeping the rest at their defaults... :-) I will investigate but first a quick question, please, (albeit obvious) just to get me to the right path. You open up Atom (no project loaded etc etc), you set "Close Previous Project Files", then you open a folder and you add a project and finally, you open/close files, unlink, set the project path to another folder, all over again adding a project and switching between them and in the end it doesn't work as expected (closing the previous files while restoring the current project's ones), right?

petey commented 9 years ago

Here's how I'm using project-ring (from scratch):

1) Startup Atom (no files or projects loaded) 2) Open a folder (we'll call this project 1) 3) Add it to the ring 4) Open a different folder (we'll call this project 2) 5) Add it to the ring 6) Use Alt-\ to switch projects (this works fine) 7) Open some files in project 1 8) Switch to project 2

I could continue to open files and switch projects and they persist their open status regardless of the project I'm in.

I've tried this exact same process where I unlink between adding project 1, and opening the folder for project 2 with the same results.

Further, when I have files open, and close Atom, when I reopen Atom it loads the correct project, but only opens an empty 'untitled' editor, not the files that were open. This may be a separate issue.

vellerefond commented 9 years ago

OK, I was finally able to reproduce it so I will get right on it.

vellerefond commented 9 years ago

Release v0.17.0 (commit 22c328301b538aa3bff55f473f3ba1b608700b3e) fixes two things. A logic bug for projects without open files and covers an API change in Atom which didn't allow the open files to be saved to the project state, Please, reopen this if you still have problems.