Sublime Forum

Workspaces and project files are completly bugging

#1

Hi,

Since I’ve discovered ST3 a few monthes ago, I’ve never managed to use Projects and Workspaces correctly. It seems that the software tends to confuse things between :

  • Reopening last windows and files.
  • Opening the workspace itself.

So, here are the complete explanations of those two assertions, plus a confirmation of a real annoying bug that happened to me today (loss of all my windows sets) :

  1. These last weeks, I was working on a project, with 3 windows containing many tabs.
  2. I had saved a sublime-project file, and two sublime-workspace files : the reason is a few weeks ago I was working with only one window, and when I decided to add a second one, I first used “New window” function, then discovered the “New Workspace for Project” that I used to create the 3rd window. In the rush, I created a second sublime-workspace file !
  3. When I created the 2nd sublime-workspace file, I tried immediatly to test it by closing the project, and trying to reopen it by clicking on one of the sublime-workspace file : and I discovered that it was completly bugging ! I mean, completly ! None of the test I did brought me any clue to how workspace were working ! It was completly random and messy. Even the sublime-project file wasn’t working properly.
  4. After a while, I just found out that using “File, Exit” in ST3 would close the three windows, and that clicking on the sublime-project shortcut on my desktop would reopen all windows. (at this time I wasn’t knowing that it was just ST3 auto-reopening system at work !) I didn’t figured how nor why this was working that way, but was happy to end the torture !
  5. All of this worked fine for a few weeks. Yesterday, I tried to work on a new project in parallel of the first one, and decided to close my three windows for opening a new blank file : and the problem was that ST3 kept opening the last three windows again and again ! So I found a solution on the web : editing the settings and adding "hot_exit": false, and "remember_open_files": false, ! And it worked : ST3 opened a new blank window in wich I could work.
  6. Today, after closing the 2nd project to work on the first one again, when clicking on my desktop icon I had the dreadful surprise to see a single window opening, with a blank tab, and on the left the few folders of my project.

So, now, I’m really feeling that you made me waste my time. :grimacing:

I want to be crystal clear : I’m not here for being vindictive, I love your software ! But nothing in your system works, wether I use it instinctively, or after hours of scratching my hairs and searching for a solution on the web,or a tutorial to at least understand things I could ignore. There is nothing, nada ! Not a single clear explanation. And this is very strange, because I’m quite used to sessions in softwares like Notepad++ or similars, and I never seen such a messy session feature with such a lack of documentation about it !

My suggestion would be to reconsidere the question of a unique session system fusioning the two files, or at least to solve the incredible amnesia problem of your sublime-workspace files ! Please considere that this is not a raging trolling, but the result of failling all the tests I could done in many directions with your sublime-workspace files, untile exhausted. I’m quite confident that I don’t delude myself here.

Not mentioning that adding workspace to a project is absolutely not clear, as we can open a new window without using “New Workspace for Project” and without knowing if the window has been saved in the workspace. Either way, your sublime-workspace files don’t seem to store real sets of windows configurations, and opening them isn’t different from the auto-reopen feature, from user’s point of view. At least by deactivating it, I thought it would be more clear, but in fact I lost all my workspace !

In one word : you have a real UI design problem. Your work is aweseome, ST3 is crazy fast and powerfull : please accept my apologies if I hurt your feelings, and keep the good work on improving it !

Edit :
I confirm that the sublime-project file just contains folders location (normal behavior), and sublime-workspace files have no trace of any windows or tab memorization. There is only tweaking settings, last opened files, and a few things. So, how your software is supposed to store windows sets if there is no saving of it ? Are we supposed to have workspace files, but to always work on the same project until end and rely on the auto-reopen feature ?? How can we reopen an old project and all its windows and tabs ?

0 Likes

#2

Up, this topic is very important.

0 Likes

#3

I want to be crystal clear

Ehm, you spend a lot of words but it’s far from clear what is not working for you. You mostly seem to be very confused about how some of the features like hot_exit, projects and workspaces work. Your assessments that they don’t work are incorrect, and mostly just illustrate that you don’t understand some basic concepts here. Especially your final paragraph is off by all accounts:

I confirm that the sublime-project file just contains folders location (normal behavior)

Indeed it does

and sublime-workspace files have no trace of any windows or tab memorization.

There is though, the “groups” object holds your opened tabs. If you open a workspace or switch projects, the tabs, opened files, edits, etc. are all restored.

Note that workspaces aren’t multi-window. Perhaps the idea that you could have multiple windows in one workspace is messing with your perception of the entire feature?

Also:

0 Likes

#4

No no no, how can you say that when I have tested (and am testing right now again, since one hour), to save projects/workspace and reopen things in dozen ways ? Do you know any softwares that requires to test things dozens of time ?

That’s not the fault of users if Sublime-Text is completly bugging and not intuitive at all, many users have talked about it on this forum, and you don’t have to patronize me and give your opinion like that without giving any damn proceeding.

So, as you are lazy and I’m not, I’m going to re-explain what I’ve re-tested today, wich definitley proves that ST3 has no real session-saving but a messy parameters synergy.

My texts are not so long, and they are very well bullet-listed and numbered, so anybody can ead it clearly :

CONCEPTION OF THE TEST

.
I decided to slice things in 3 parts for my project : one window with X folders added on the left and some tabs, one other window with different folders, and a third one with again different folders and tabs. So doing, things will be more clear (and saying that I confuse things is a provocation, giving that any other software save entire set of windows correclty, or separated ones, without any kind of bug. Rejecting thing on users is a real joke).

FIRST TEST : SAVING TEST

.
To proceed to this test, I’ve created each window separately, one after the other. Proceeding was, exactly :

  1. Open ST3,
  2. Close anything preceding the test that was re-opened automatically (“Project -> Close Project” if needed),
  3. Add folders to the actual blank project,
  4. Open some tabs,
  5. Save the project in a sublime-project file. Right after having saved the sublime-project file for the first window, I tried to save the workspace too, but noticed that it has already be done ! “Fine”, I said !
  6. Close the window by pressing the red cross (I don’t want to lose time by any other superfluous menus ; if ST3 has a problem with that, it’s not user’s fault. Things work well in zillions of softwares around the globe).

SECOND TEST : REOPENING TEST

.
I click on on of the three sublime-project files, and noticed that it reopened the workspace of the “project” too. (please do not quote and comment that as a ridiculous obviousness : at this point, nothing is obvious with ST3. I don’t know how you do, but we’re not in your head !). I closed the unique window I had opened.

So I decided to focus on sublime-project files, and created 3 shortcuts to made my reopening test.

I first reopened the same project : it worked. Then I closed it again, and opened a second one : oh damn ! It reopened the last project at the same time… Ok, so I started to doubt of the positive evolution of things since my last post a few months ago.

I retried in different ways to close and open things, and each time the last closed window was remembered, and reopened with the different project launched by the shortcut.

I remembered that there was two options acting on the saving/reopening process, so I started a new pattern of testing.

REOPENING TEST WITH VARIATIONS OF “HOT_EXIT” AND “REMEMBER_OPEN_FILES”

.
The first variable is offocial, but the second one is unfindable in the ST3 main setting file. So I simply added both to my user setting file.

.
COMBINATIONS AND OBSERVATIONS #1 :

“hot_exit” : true,
“remember_open_files”: false,

  1. Window (of the project opened during this setting up), is saved and restored (if I relaunch the same project).
  2. "Last window" memory-effect : the same aforementioned project is reopened if I launch an other one ! (wich is annoying, because it forces us to close it. Who wants to open the last project when opening a specific different one ?).

Note : remember_open_files seems to have no effect (intuition : maybe hot_exit makes workspace to be saved in addition to saving “unsaved” data of tabs ; wich is different, I have to recall it !).

.
COMBINATIONS AND OBSERVATIONS #2 :

“hot_exit” : false,
“remember_open_files”: false,

  1. Window of the previous project (used during setting up variables) is not saved and not restored.
  2. No last-window-memory effect ! :relieved: If I launch an other project (still not affected by this loss of memory), the last opened project is not reopened !
  3. Any blank window neither.

Backfire : projects windows are not saved anymore ! Wich means that if I close the window at this point of the test (without changing the variables for preparing the next test), I will lose a second project ! And so on, until all the three will be wiped !

So I quickly change variables before closing the window…

.
COMBINATIONS AND OBSERVATIONS #3 :

“hot_exit” : false,
“remember_open_files”: true,

  1. Window correctly saved and restored.
  2. Last-window-memory effect :confused:

At this time, it seems that we’re in the same situation that in #1.

.
COMBINATIONS AND OBSERVATIONS #4 :

“hot_exit” : true,
“remember_open_files”: true,

Same as #1 and #3 !

So, only setting up the two variables produces the “wipe” effect (I call this like that, because sincerely, the combination of trying to reopen last things WHILE not saving the actual ones is kind of a nuke reaction made for ruining our mental heatlh :weary: ).

Now, I have to try two more things to be sure.

COMBINATIONS AND OBSERVATIONS #5 :

I delete the “remember_open_files” of my user setting file, giving that it is not official, and stick with the only save-related feature wich is “hot_exit” :

“hot_exit” : TRUE,

Same as #1 and #3.

So, hot_exit is not only a question of exiting quickly and saving tabs : it seems to be confusely used as a saving session (workspace, wich means windows and tabs). And don’t say me I haven’t understood the feature ! :expressionless: No other variable is found in the setting system to simply activate/deactivate the “reopen last-closed window”.

I recall that there is three different things :

  • saving a set of windows and tabs (no variable found at this moment)
  • saving unsaved data in closed tabs (wich I assume is the first function ot hot-exit, wich would rest on a saving feature to have sense)
  • reopening the last closed window.

At this moment, ST3 is completly confusing these 3 things in one single variable…

Anyway… user’s are always guilty, hmm ? :expressionless: (sic)

.
COMBINATIONS AND OBSERVATIONS #6 :

“hot_exit” : FALSE,

Wipe all, remember nothing. Like in #2.

Now, it’s clear that my assertion that ST3 mixes three different features in the hot-exit variable is true.
.

OTHER OBSERVATIONS

.
It seems that if we close a project, and reopen the same project, ST3 try to use the “reopen last window” function and opens a new blank window in addition (and focused in foreground) to the… already opened project ! :cold_sweat: It’s kind of redundant…

It definitly shows how the “memory-effect” is annoying and messing things up (particularely when last project window is reopened in situation of “not saving the last closed window”, wich results in wiping it :rage:).

.

CONCLUSION

.
Clap clap clap… Not only users don’t know if they have to click on sublime-project files or sublime-workspace ones, but the entire system resting on the single “hot_exit” variable is unreliable !

I wait for responsible answers from the ST3 staff, and not from kids around who can’t accept that someone doesn’t blindly defend the product, and who patronize people by repeating “you don’t know how to use it”.

Especially when no effort is done to explain how to use it. :kissing_smiling_eyes: Ok ?

0 Likes

#5

I precise, for those who would be tempted to say “it’s too long” and “it proves that you don’t understand anything”, that I won’t believe that they manage to save and reopen things with no additionnal annoying windows, without a link to a VIDEO proving it.

I’m tired of writting for hours to people that treat me as I was sick, when I clearly explain things and make complete tests proving that nothing is working. Now or you’re liars who in fact DON’T understand how to reopen things and simply acclimatize to bugs without searching to solve them, or you’re just fanboys trying to troll.

0 Likes

#6

Uhm, ok. Good luck with that then.

0 Likes

#7

Patronizing and not argumentating seems to be your unique way of expressing yourself. Good luck in life with that, too ! I’m sure people will love you at work !

0 Likes

#8

Just as support to my assertions, an excerpt from an other guy on the net (wich developed the SimpleSession package of ST3 ) :
https://blog.yossarian.net/2015/11/01/Session-Management-In-Sublime-Text

There has, however, been one exception to this: Sublime Text’s abysmal support for sessions (or projects, or workspaces, or whatever you call them). By default, Sublime Text manages sessions with .sublime-project and .sublime-workspace files, which have to be opened manually (Project -> Open Project…) and contain a mess of session context and history that Sublime Text can regenerate automatically anyways.

Are we all nuts ?

0 Likes

#9

Oh, they don’t.

You could try to reduce the typos and redundant details in your text so it’s clearer what is tripping you up though. But, you’re yielding a lot of results with your approach already, so I’ll leave you to it.

… perhaps I should make that video for you tomorrow.

0 Likes

#10

Ok :

  • I can’t save a project with one window, and close it, and reopen a different one containing one window too (I’m precising things to force you to abandon the idea that we mess things with multiple windows), WITHOUT REOPENIN THE FIRST ONE.

  • I don’t want to reopen the last window. Nobody wants. We just want to open sets of unique or multiple windows related to a project, and manage these sets individually like entities, wether other sets of projects windows are opened yet. We don’t want to close a project before opening an other too.

  • I can’t find any variable deactivating the “last window” reopening feature.

  • So, your two previous web links on Projects documentation doesn’t help me, because the first one talks about the JSON mecanics of sublime-project files (and I’m not here to pass a PhD in ST3 development), and the second one just repeat the same useless information that we all already know about the difference between projects and workspace regarding the layout. But nothing is said about what to use, nor the method (double-clicking ? using menus only ? restrictions ? known bugs ? … etc)

  • I can’t deactivate “hot_exit” in purpose of trying to deactivate last-window reopening, without losing the saving function, and thus, all the content of windows (tabs).

And, additionnaly :

  • I can’t precisely know if I must open a set of windows and tabs of a unique project by double-clicking on the sublime-project file, or on the sublime-workspace file.

  • It seems that we don’t have to open sublime-workspace files, because there is no “Open Workspace” menu in the menu bar of ST3. So I presume that opening a project automatically launch the workspace(s) linked with it, while it seems that opening several projects at the same time make ST3 to confuse what windows has to be saved for what project. But hey ! It’s not our fault ! You made it, by forcing people to reopen the last window ! Eh eh eh…. So for now, I double-click on the sublime-project file, throught a shortcut of it on my desktop. I have three of them, for three different projects, containing each one a unique window in purpose or a clear and perfectly understandable test. And you still fail to understand it.

And finally :

  • Testing things with 3 projects each containing a unique window (with a few tabs opened in it), in different situations, results in random reopening of last-window and wiping effects. When it’s not the same project trying to reopen twice, in a new blank window.

.

So how long will you make me dance while you’re shooting with your gun, sir ? Can I have peace ? I’m exhausted.

0 Likes

#11

Ok, I think I’m finally seeing more clearly the dissociative behavior of ST3 saving. And that the last-window reopening feature is really messing things up, like in a room full of mirrors.

So, here’s a kind of tutorial that could help many people.


TUTORIAL AND TROUBLESHOOTING OF ST3 WORKSPACES

.

  • When we create a new sublime-project, a sublime-workspace of the same name is created.
  • It’s purpose is to have at least one window for the project. Plus, it saves us the time to do it manually.
  • So, at this point, we can double-click either on the sublime-project or the sublime-workspace file to reopen this set.
  • Note : at this point, we don’t know that in fact, we should only click on sublime-workspace files !

But :

  • We can create new workspaces. A workspace = 1 window (correct me if I’m wrong).
  • For this, we can use the menu “Project > New Workspace for Project”. It opens a new window with the actual project tree on the left.
    - Note that even if you have several projects opens simultaneously, ST3 recognize the project from wich we’re launching the creation of a new workspace !
  • So we have two windows opened. But carefull ! We still haven’t SAVED this workspace, and closing that window will result in the loss of the new workspace. Wich means that next, when double-clicking on the first sublime-project file it will just launch the first set, as at the begining.
    - Note : anyway, we should double-click on sublime-workspace files, because they are all linked with the sublime-project one ! And because clicking on a sublime-project file doesn’t launch all the sublime-workspace files that can be related ! :wink:
  • So we can use the “Project > Save Workspace as” menu to save the new window.
  • We can name it as we want, but we have to create a new file and not overwriting the previous sublime-workspace of the first step ! Because 1 window = 1 sublime-workspace file ! If not, the first window would be lost. ST3 doesn’t combine workspaces in the same sublime-workspace file !
  • So, we can create a new file, with a name having the same radical word (ex : if the project was “test”, we had test.sublime-project and test.sublime-workspace, now we can create something like test_newset.sublime-workspace !).

I just make a pause for the potential readers to digest this.

  • Now, we have two workspace files, and one project file.
  • To reopen the project quickly… well… there is no way to do it (AFAIK). We have to click on the two sublime-workspace files successively (and to forget the sublime-project file), to reopen the two windows. Maybe a CLI batch could help to launch them in one click, maybe not.

Ok so, now, how did I experienced the workspace bugs in my very first post, at the begning of this thread ?

I think I’m having an epiphany of what happened, and it makes me having cold sweat :cry: :

  • I naively thought that using the “New Workspace for Project” menu was adding automatically the new window… in the already existing sublime-workspace file !
  • So I didn’t saved the freshly created workspace in a new workspace file.

That explains partly why things were “messy” in the step 3 of my very first message. The other part is probably caused by the auto-reopening feature :slight_smile:

  • When I then finally saved a second workspace file, the auto-reopen feature combined with hot_exit and remember_open_files both set to FALSE probably messed up things to the point that even workspaces inherent auto-saving weren’t working !

That’s were the cold sweat is. :cry:

And that’s why ST3 team should do something to clear this thing up. Really.

But why did sometimes the window of the new workspace appeared to be saved, and sometimes not ?

  • Because (and that’s a major problem of ST3), when we close a project, we can’t do it all windows/workspace at once : we have to close each window one by one.
  • And if I closed the first “main” window first, then the second (new) workspace in last, the reopen last-window feature saves it (delusively).
  • Then, during the next reopening of the sublime-project or sublime-workspace file, the last window is reopened BEFORE opening the project, and guess what : it is the second workspace that wasn’ even really saved manually that shows up !

Damn you. Jokers.

See what I mean by saying that the reopening feature is an evil thing… :smiling_imp:

.
Now, to finish this post and bring more light on the events of the last hours :

  • Today, things were not subject to this kind of “workspace saving illusion”… All sublime-workspace files were here, and correctly saved.
  • But the combination of hot_exit and ghostly reopen feature have led things to recreate this illusion by a very similar process :
    • I created separated and almost similar sets of files for each project (one sublime-project file, and one sublime-workspace file, each of the same name for one project), in purpose of simplifying things.
    • I closed and reopened them in random order, under variations of hot_exit variable state.
    • And unfortunately, it made the auto-saving of workspaces (I’m not talking about the auto-saving of the last window !) very unstable.
    • Thus, it gave almost the same result than before, and made things really complexified.

But I’ve just tried to create a new windowd/workspace for one of the three test-projects I’ve created, and despite the problem of auto-reopening of unwanted windows (like one of an other project used simultneously, or the illusion that the 2nd window/workspace of the abovementioned project is magically stick to the master-workspace), everything seem just “normal”.

By normal, I mean :

  • ST3 correctly manage and save each window/workspace in its own sublime-workspace file.
  • We have to open each window one by one, by clicking on each sublime-workspace file (or we can cheat if we have only two windows/workspaces in a project, by using to our benefit the auto-reopening feature).
  • And ST3 breaks balls by reopening the last window above the one we attempt to launch, wich makes things fuzzy and potentially risky.

.
Nothing new, under the sun”. (Ecclesiastes 1:9)


Edit :

Ok, I’ve just found the solution guys ! :cold_sweat:

  • All you have to do is to make ST3 to apply the “Close Project” function directly on the close button of the windows UI.

Explanations :

  • hot_exit “saves the state of tabs” : and for this, it needs to reopen these tabs at next start of ST3. That explains why the reopen last window “effect” isn’t a feature declared as a variable : it’s implicitely implemented in hot_exit.
  • When I deactivated hot_exit, I always closed my windows with the red “X” closing button, during my tests.
  • But the problem is that when hot_exit is deactivated, ST3 needs to properly close projects to save their workspace state by using the menu “Project > Close Project. When hot_exit is on true, ST3 doesn’t have to, and the close button can be used !

I’ve just tested to deactivate hot_exit (to supress the auto-reopening feature that annoyed me), and to use “Close Project” THEN the closing button of the windows, and all went fine. :sob: As soon as I use the “X” button directly again, my workspaces are wiped.

Juste add this feature automatically in the closing button, please. For the sake of our spirits. :gift:

0 Likes

#12
0 Likes

#13

@kingkeith : thanks, but it’s a bit too technical for me. However, I will certainly read it again when I’ll create a batch system.

I’ve made a few tests today again, and here is the discoveries :

  • I’ve bind the “close_workspace” command on “alt+f4”, this avoiding to click 3 times on the menu to close correctly the project.
  • With hot_exit on false, things look pretty acceptable : windows close correctly, reopen correctly, and with no undesirable subsidiary window.

But still, if I make the mystake to click on the close button of the window (the red “X”, on top-right corner), the workspace is nuked : the content of the related sublime-workspace file is wiped ! :expressionless:

So, I decided to set things like this :

  • hot_exit on true, to secure the workspaces.
  • To avoid a blank window staying when closing the projet, close_windows_when_empty on true (this allow to close directly the window !),
  • And to avoid last-window reopening, have to use alt-f4 systematically, and never the cross.

Doing this, if I ever “forget” to use alt-f4 to close a window, I just have the problem of the last window reopening because hot_exit comes into play. It’s way preferable than losing the workspace !

Still, it’s not acceptable that ST3 wipe sublime-workspace files just because we set hot_exit on false. Auto-saving of workspace should be a basic feature, on wich hot_exit add something more.

0 Likes