Atom keeps on opening non-existing file on startup


#1
  1. Open Atom.
  2. Atom has one file/tab open. Tab says it is a file which doesn’t exist (anymore).
  3. Close the tab.
  4. Exit.
  5. Open Atom.
  6. The exact same non-existing file (in a non-existing folder) is STILL automatically opened. The contents are empty, but still.

Question: how can I make Atom NOT open the damn non-existing file on startup. In this case it should open with no tabs open, or on empty tab open.

Using Atom 1.7.4 on Windows 10/64.


#2

I think this question refers to this:

Also, in the Core section under Settings, the option Open Empty Editor On Start should prevent last items from being opened when Atom starts. Anyway, there is probably an issue opened for this:

If nothing works, that’s the right moment for an hack!


#3

Yes, but I want Atom to open all previously open documents. But in this case I have closed all of them so at least I’d like Atom to remember that. So:

  1. If I have closed all tabs before quiting, Atom should open next time with empty document or no tabs at all.
  2. Otherwise open all documents that were open when Atom was closed the last time.

And in all cases: why does it keep on opening a non-existing file?

(Before bug report I just would like to know if this is a known issue or a feature I don’t understand.)


#4

I have known it for a long time and it bugs me, but I’ve been too lazy to issue the bug report. Please do so

Edit: Be sure to limit the bug to just missing files.


#5

Sometimes the state of Atom gets wedged. You can clear the state by launching Atom with the --clear-window-state parameter from the command line.


#6

For those finding this post like me. I mistakenly opened a pdf (or a binary file or a super large log file) which crashes/locks atom no matter how long you wait. So you force close. Open atom again and it tries to open the pdf and hangs again…arrrrh

So…from the command line if you do as @leedohm says
atom --clear-window-state
you can get out of this situation.

This does seem a bit like a bug. Is there anyway to get atom to recover from (stop loading) a “bad” file so that one could close that tab and continue on? Maybe instead of just a “force close” how about a third option “offending close tab”.

At the very least if one does a “force quit” can atom write a forcequit flag (in atom user settings) it checks on startup and if set automatically opens atom with --clear-window-state ??