Extremely irritating disfunctionality on Windows


#1

Every time this bites me in Atom 1.7.4 (and all the versions before it) it is infuriating, and I cannot believe that the Atom community has let https://github.com/atom/atom/issues/9643 go on for long.

Let’s say that I use Atom for weeks, patiently adding project directories to the tree view. I get Git indications and everything in the tree view. Wonderful

But then one every so often I forget that Atom has this horrendous bug #9643, and I right-click in Windows File Explorer and select “Open with Atom”, like I always do with every other well-behaving program on Windows. Yes, the document opens in Atom. But it completely screws me over because it discards all the various project folders I’ve painstakenly added. The next time I open Atom, I have to start from scratch—all my projects are gone.

But it’s worse than that, because if I close the file that I opened using “Open with Atom”, when I next open Atom not only are all my projects gone, the tree view is gone as well and Ctrl+\ does not bring it back! This is another persisting bug on Windows. To get the tree view back, I have to bring up the About screen (or some other trick to show some document that really isn’t a document), and then while the tree view is showing I stealthily add a project.

I can only suppose, from the long history of non-interest on this bug, that the development team does not use Windows and does not care that much about Windows users.


#2

I don’t think it’s a bug. It’s just the way Atom works that happens to violate the expectations of a sizable number of users. It can be changed (not fixed, since nothing’s broken, but a new way of doing things can be implemented). The code is right here, under loadState. It could be made so that loadState is always called regardless of what command you’re sending to Atom, but that wasn’t the way it was designed.

What do you expect to have happen when you have multiple windows open and you close them? Should all the paths be saved and reopen the next time you open Atom? Should any random file you open be saved so that you have to manually prune the Tree View? That’s what Notepad++ does, and I find myself periodically having to close a lot of things because I just wanted to look at them for a second and then forgot about them. Because of that, I like that Atom only remembers the most recent window state, not every file I’ve opened over the past four months.


#3

You are confusing two things:

  • The project directories I have in the tree view.
  • The documents I have loaded.

I don’t give a bedoodle about whether Atom remembers the documents I have loaded or not.

If I add a project to the tree view, I don’t want Atom to forget this projects in the tree view. End of story. How is this difficult?


#4

I’m not confused. I looked at the Atom repo, saw that it was loading the previous state from .atom/storage/application.json, looked at that file and saw that it contained the paths of the tree view. So then I tested it, and yes, whenever Atom starts without a target, it populates the tree view from application.json. Atom is constantly overwriting application.json, so whenever you open a directory by itself, Atom does not reference that file and what was previously in it gets deleted. If you wanted the contents to be loaded every time Atom starts, that would be doable, but then the tree view would accumulate every directory that gets opened and you’d have to prune it. This behavior might be counter to what the devs want for the editor, in which case a package would be required to save and reload the tree view data.

And you expect anybody to help you when you insult their intelligence? I was trying to figure out exactly what behavior you expect from Atom, and that could have turned into a PR to discuss whether Atom’s methodology when opening files should change or if that’s better suited for a plugin. But since you are being immediately hostile and unwilling to answer the questions, there is no reason to help you. If you feel like “fixing” it, I’ve shown you where in the code the logic in question resides and I’ve explained how the editor works. You should be able to take it from here, since you care so much about it. :slight_smile: