Behavior of and newWindow=false


I’m looking for a description on how is theoretically supposed to work.
Currently, if you pass an array of paths and newWindow=true into, it will add each path as a project path in a new window. If the path happens to be a file, its folder will be added as a project path and the file specified will be opened up on the editor.

Calling with the same paths but with newWindow=false, however, doesn’t seem to prevent atom from opening these paths in a new window. The description in the API docs says “true to always open a new window instead of reusing existing windows depending on the paths to open”. I assume that this means there are cases where the newWindow flag is ignored altogether depending on the paths you pass in, but is there a description of how this is supposed to work?

I am calling it like so:

var options = {};
options.pathsToOpen = ["Path1", "Path2"];
options.newWindow = false;

In addition, I would like to load up a list of project paths and a list of open files in the editor independently from each other when using For example, I’d like to open up a file in the new Window that is not added to the project folder tree. This doesn’t seem possible currently, but I figured I would ask anyway.


Hi, I also had this problem for Advanced new package. I’ve asked about this here.
As solution I’ve used Atom workspace open instead.


I probably should have searched through the Issues on the project first, so thanks for linking that.
I am currently using the other methods of opening files for the current Window, and was just experimenting when I stumbled across this issues and was curious.