Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Add setting to disable restoring last session #6605

Closed

Description

@dominicbarnes

It's useful that atom can remember the files/folders you had open last time and then re-open them next time you start atom. I can't seem to figure out how to turn off this behavior though, I generally want to start clean each time I open atom.

Is there a config option to enable/disable this feature? Or could we implement a dialog box when closing atom that asks if you want it to remember what you had open?

Activity

  1. izuzak commented on May 5, 2015

    @izuzak
    Contributor

    Is there a config option to enable/disable this feature?

    As far as I know, there's no such option currently. /cc @maxbrunsfeld

    Or could we implement a dialog box when closing atom that asks if you want it to remember what you had open?

    That's an interesting idea as well. Personally, I think a config option might be less annoying than a dialog which pops up every time you close Atom. Or even a new command, as @andya9 suggested. 🎹

  2. mnquintana commented on May 5, 2015

    @mnquintana
    Contributor

    Related to #6495

    (:+1: for the command suggestion)

    I think a config setting to enable / disable this might not be a bad idea – to be fair, Sublime has a config setting for their equivalent of this feature (hot_exit).

  3. samis commented on May 9, 2015

    @samis

    I also find this behaviour unneeded. It's not a bad thing to have, but I'd prefer it to start clean. Make it a setting, preferably. I shouldn't have to remember to type a specific command or keybbnd. if I want Atom to close the way I desire. 👍

  4. jonathanrdelgado commented on May 15, 2015

    @jonathanrdelgado

    +1 for setting to disable. A temp fix for this is deleting ~/.atom/storage/application.json (for windows at least)

  5. chloerei commented on May 17, 2015

    @chloerei

    +1 I want to disable this feature.

  6. piranna commented on May 20, 2015

    @piranna

    I think this should be disable by default and "restore last session instead of open current folder" being a config opt-in, not an opt-out.

  7. motam commented on May 20, 2015

    @motam

    +1 for the previous behavior.

    When launched from the CLI, "open latest" should be an option.

  8. maxbrunsfeld commented on May 20, 2015

    @maxbrunsfeld
    Contributor

    Some other discussion of this happened here: #6873.

  9. travis-hooper commented on May 28, 2015

    @travis-hooper

    👍

  10. self-assigned this
    on Jun 12, 2015
  11. jamesqo commented on Jun 21, 2015

    @jamesqo

    +1, this should be made an option in the config files.

  12. ffflorian commented on Jun 24, 2015

    @ffflorian

    +1

    Thank you for the hint, @jonathandelgado!

    A short workaround for Linux would be to create a script which deletes the application.json file before starting Atom:

    #!/bin/bash
    rm -f ~/.atom/storage/application.json
    /usr/bin/atom
    exit 0
    

    Copy the above lines into an editor, save it as atom.sh into your home folder (/home/[username]/) and make it executable with the command

    $ chmod +x ~/atom.sh
    

    Finally change the application link in your OS launcher to run the script instead of Atom.

  13. 40 remaining items

  14. neddy commented on Sep 1, 2016

    @neddy

    @tschf Thanks, that works for me. So much better for me...

  15. nathansobo commented on Sep 1, 2016

    @nathansobo
    Contributor

    @maxbrunsfeld Do you think we could add this to the schema so people see it in settings?

  16. Ben3eeE commented on Sep 1, 2016

    @Ben3eeE
    Contributor

    Combine that with rewording theOpen Empty Editor On Start setting. #10623

  17. andreaferretti commented on Sep 13, 2016

    @andreaferretti

    @tschf I added that setting. It works for me when opening Atom without specifying a folder. But when I open Atom in a folder (atom some/dir) I still see the open files from the previous session. Since I almost never open Atom without specifying a folder, the issue remains for me

  18. Lewiscowles1986 commented on Oct 6, 2016

    @Lewiscowles1986

    The issue remains, but @tschf comment stands and worked for me. I had a problem where I opened a webdav file (atom took a very long time to launch, and then kept crashing), so editing config.cson seemed to me at least a very minor price to pay for getting the editor to work again.

  19. JamesVG1 commented on Feb 19, 2017

    @JamesVG1

    I opened bootstrap.css.map. and now every time i open Atom, it opens it automatically and freezes.
    this feature should really be able to turn off!

  20. nathansobo commented on Feb 21, 2017

    @nathansobo
    Contributor

    Use --clear-window-state for the time being.

  21. winstliu commented on Feb 21, 2017

    @winstliu
    Contributor

    Don't forget about the restorePreviousWindowsOnStart option (which is why this issue has been closed).

  22. martinosorb commented on Jun 13, 2017

    @martinosorb

    +1, this annoys me a lot...

  23. winstliu commented on Jun 13, 2017

    @winstliu
    Contributor

    @martinosorb can you please elaborate? What annoys you a lot? If the lack of a setting to disable restoring the last session is what is annoying you, please be aware that the restorePreviousWindowsOnStart option will prevent restoring the last session.

  24. martinosorb commented on Jun 13, 2017

    @martinosorb

    That seems to work only in the case of atom being opened without a path specification, am I wrong?

  25. winstliu commented on Jun 13, 2017

    @winstliu
    Contributor

    @martinosorb Ah, good point. Would you mind opening a new issue for that if one doesn't already exist?

  26. martinosorb commented on Jun 14, 2017

    @martinosorb

    Somebody above was proposing to reopen this one because of that issue.

  27. winstliu commented on Jun 14, 2017

    @winstliu
    Contributor

    I think it's best to open a new issue so as to not confuse the two (no setting to disable restoring state vs. setting not applying when explicitly giving a path argument).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions