Git Product home page Git Product logo

save-session's People

Contributors

anthonyraymond avatar apaleslimghost avatar chaddgrimm avatar clhynfield avatar fabb avatar itaylor avatar johnmurga avatar maxxk avatar mnquintana avatar mpeterson2 avatar phord avatar salgnt avatar smiffy6969 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

save-session's Issues

Add Settings

Users should be able to decide whether they want to save reload things.

  • Window size
  • Window location
  • File tree size
  • Project
  • Open files
  • File contents

Only disable save on close when quitting Atom

Currently, if you disable save on close, it will be disabled even if you are just closing the file. This is probably is not ideal, and it should ask you if you want to save it still.

Uncaught SyntaxError: Unexpected end of input

I have not tested this on OSX yet, but on Windows I have been having issues since the last update. With save-session enabled I get the following errors.

files.coffee line 12
Uncaught SyntaxError: Unexpected end of input
(anonymous fuction)

module.exports =

  activate: (buffers) ->
    Fs.exists Config.saveFile(), (exists) =>
      if exists
        Fs.readFile Config.saveFile(), encoding: 'utf8', (err, str) =>
          buffers = JSON.parse(str) ***ERROR HERE***
          if Config.restoreOpenFiles()
            @restore buffers

fs.js line 295
(anonymous function)

fs.js line 95
(anonymous function)

I have tried with 0.140 and 0.139 versions of Atom. Sometimes it will fail to launch the last opened documents. When I launch atom I am immediately met with these errors. I can disable save-session, and the second I enable it these immediately occur.

The undefined\project.json is present and I have tried changing the settings around and it has so far seemed to do it with about every setting combination. Sometimes when launching the errors can occur on different lines. I know files.coffee error can happen on line 20 as well and the fs.js can be seen on line 93 as well.

Another error it can trigger when being enabled is the following:

Uncaught SyntaxError: Unexpected end of input
index.html line 1.

<html style="background: #fff">
<head>
  <title></title>

  <meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self'; style-src 'self' 'unsafe-inline';">

  <script src="index.js"></script>
</head>
<body tabindex="-1">
</body>
</html>

I am trying to force this one to happen with save-session disabled to make sure it is related, but so far I can only get this one to occur with save-session enabled.

Breaks in Atom 166

If you upgrade to Atom 166, you get a constant stream of errors from this plugin :(

People have opened several tickets for this so far:

Additionally, it appears a PR is already opened fixing this, although I don't know if it actually does: #44

atom.workspaceView is deprecated.

When I start Atom (0.174.0), I get the following warnings:

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.addListeners (/Users/victorhooi/.atom/packages/save-session/lib/project.coffee:34:9)

Remember file tree state

It would be nice if the file tree was restored to its previous state. For example, if I expand a folder, select a file, and exit Atom, that folder should be expanded and that file should be selected again when I return to Atom.

This should be done separately per project since the file tree is very project specific. Because of this, it would probably be best to store this along with the project specific file buffers. So this issue should probably wait until file buffers are restored separately per project.

  • Fix issue #8
  • Restore tree expansion
  • Restore selected file

'Undefined not a function' on atom.workspace.open

I have an error in package which is probably related to #34.

I think it is caused by buffer.coffee:17 violating atom.workspace.open API

Code example:

console.debug atom
console.debug atom.workspace
console.debug atom.workspace.open
promise = atom.workspace.open(filePath, {split: 'right', activatePane: false, searchAllPanes: true})
console.debug promise
promise.then (model) ->    # TypeError here
  model.onDidInitialize ->
    model.app.setHash "page=#{position.Page}&zoom=FitW,#{position.x},#{position.y}"

Console output:

Atom {state: Object, emitter: Emitter, mode: "editor", deserializers: DeserializerManager, deserializeTimings: Object…}
Workspace {didDestroyPaneItem: function, updateDocumentEdited: function, updateWindowTitle: function, declaredPropertyValues: Object, emitter: Emitter…}
function (path, options) {
          return atom.workspace.constructor.prototype.open = atom.workspace.constructor.prototype.saveSessionOpenFunc;
        } 

Disable save on close option

Not sure if this is possible right now but, it should have an option to disable the save on close dialog seeing as stuff is saved on close anyway.

Fix pane splitting

When trying to split, Atom throws the exception: Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined.

I'm not sure what's going on here yet, but it's broken 😿

Support panes

Save Session should have support for pane splitting. Right now, all files are reopened in the middle pane, but it would be nice if they could open in the pane it was originally in.

This would probably include editing the json a bit by adding the location of the pane to the file (not sure how to get that yet). When the file is opened, options can be specified to tell Atom to open the file in a specified pane.

Remember grammar

Would be great if save-session remembered the grammar you selected for a file (for files which a grammar could not be automatically determined).

Remember cursor position

This should be doable. There should be a listener observing the editors' cursors using this method. Then this method could be used to restore it. Of course this should be an optional setting as well.

I suppose that would just be another part to save in the files' file. Some json for it may look like this?

{
  path: ...,
  cursor {
    x: 10,
   y: 10,
  },
  ...
}

Uncaught TypeError: Cannot read property 'row' of undefined

Uncaught TypeError: Cannot read property 'row' of undefined

Atom Version: 0.161.0
System: Mac OS X 10.9.5
Thrown From: save-session package, v0.11.0

Steps To Reproduce

Last night I had three windows open. I gracefully quit Atom last night, then this morning I opened it up and I get this error.

Stack Trace

At /Users/dmcdonald/.atom/packages/save-session/lib/files.coffee:44

TypeError: Cannot read property 'row' of undefined
  at Object.module.exports.open (/Users/dmcdonald/.atom/packages/save-session/lib/files.coffee:44:24)
  at Object.module.exports.restore (/Users/dmcdonald/.atom/packages/save-session/lib/files.coffee:41:8)
  at /Users/dmcdonald/.atom/packages/save-session/lib/files.coffee:14:14
  at fs.js:295:14
  at Object.oncomplete (fs.js:93:15)
  at Ipc.sendSync (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:39:29)
  at Ipc.sendChannelSync (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:47:28)
  at BrowserWindow.RemoteMemberFunction [as getPosition] (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:110:29)
  at Atom.module.exports.Atom.getWindowDimensions (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/app/src/atom.js:496:29)
  at Object.module.exports.save (/Users/dmcdonald/.atom/packages/save-session/lib/dimensions.coffee:22:19)
  at /Users/dmcdonald/.atom/packages/save-session/lib/dimensions.coffee:44:32
  at handler (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
  at jQuery.event.dispatch (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at elemData.handle (/Users/dmcdonald/Downloads/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)

/cc @atom/core

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.addListeners (/Users/sduy/.atom/packages/save-session/lib/project.coffee:34:9)

save-session is taking to much time to activate and load

Hi there,

I've noticed that ver since I've installed save-session, Atom is slightly slower on load. While investigating the Timecop logs, I noticed that save-session is taking a bit to long to load (around 15-20ms) and a lot to activate (60-75ms).

This should definitely be optimised in order to stop influencing the speed of Atom.

Anything you can do regarding this?

atom

Thanks in advance.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:55:11)
Object.addListeners (/home/paul/.atom/packages/save-session/lib/project.coffee:37:9)

Uncaught Syntax Error: Unexpected token D

I am getting an error when opening Atom. It is "Uncaught SyntaxError: Unexpected token D"

In save-session.coffee it is showing up here on launch.

# Activate files
Fs.exists Config.saveFile(), (exists) =>
  if exists
    Fs.readFile Config.saveFile(), encoding: 'utf8', (err, str) =>
      buffers = JSON.parse(str)
      ******Uncaught SyntaxError: Unexpected token D*******
      Files.activate(buffers)
  else
    Files.activate([])

It is between line 90 and 91. I am unsure if this is related to being on Windows and the other issues I have been running into with that, or if this is something different. I am not having any issues on my OS X box.

Atom.Object.defineProperty.get is deprecated.

When I start up Atom (0.174.0), I get the following deprecation warning:

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.addListeners (/Users/victorhooi/.atom/packages/save-session/lib/project.coffee:37:9)

Restore files per project

Currently, if you open a project and switch projects, you will get all the files you were just working on. This is probably not the most useful way to go about it. It would be nice to have it so that if the user opens a different project, that project should be restored to its previous state.

This may require saving more information. From what I'm thinking now, the saved json could contain an map of objects with the key of its directory path and its values will contain what is currently being stored. It would probably end up looking like this:

{
  'path/to/project': {
    files: [
    ],
  },
  'path/2/projec2t': {
    files: [
    ]
  }
}

With multiple unsaved files that were never save it don't restore the content

I'm using Ubuntu 14.04 LTS here.

I created one new file, wrote some text on it and without saving created another new file with some other content on it.

So I closed Atom, and when I open it only the first file had content. The second one was open but it had nothing inside.

The curious thing is that I tried with 3 newly created and not saved files and just the last one didn't have content when I reopened Atom. And with 4 files the same thing.

There is a pattern here.

Don't open the untitled file

Not sure how possible this is, but the untitled file shouldn't be opened when Atom is launched and files are reloaded.

"Untitled" tab appears

Every time I reopen the session, "Untitled" tab has opened up next to my tabs as well.

Is this preventable in any way?

Thank you.

NM

atom.workspaceView is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.addListeners (/Users/hammackj/.atom/packages/save-session/lib/project.coffee:34:9)

Disabling Skip Save prompt issue

When you disable the skip save prompt and exit Atom, it asks you to disable it, but if you click cancel, it doesn't actually cancel it.

I've commented out all the code for skipping the save prompt, and it didn't fix the issue, but disabling the package fixes it, so I'm not sure what's going on here.

Uncaught TypeError: Cannot read property 'row' of undefined

Uncaught TypeError: Cannot read property 'row' of undefined

Atom Version: 0.158.0
System: Mac OS X 10.9.5
Thrown From: save-session package, v0.11.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /Users/flunette/.atom/packages/save-session/lib/files.coffee:44

TypeError: Cannot read property 'row' of undefined
  at Object.module.exports.open (/Users/flunette/.atom/packages/save-session/lib/files.coffee:44:24)
  at Object.module.exports.restore (/Users/flunette/.atom/packages/save-session/lib/files.coffee:41:8)
  at /Users/flunette/.atom/packages/save-session/lib/files.coffee:14:14
  at fs.js:295:14
  at Object.oncomplete (fs.js:93:15)
  at Ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:39:29)
  at Ipc.sendChannelSync (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:47:28)
  at BrowserWindow.RemoteMemberFunction [as isMaximized] (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:110:29)
  at Atom.module.exports.Atom.getWindowDimensions (/Applications/Atom.app/Contents/Resources/app/src/atom.js:498:33)
  at Object.module.exports.save (/Users/flunette/.atom/packages/save-session/lib/dimensions.coffee:22:19)
  at /Users/flunette/.atom/packages/save-session/lib/dimensions.coffee:44:32
  at handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
  at jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)

/cc @atom/core

Uncaught Error: Could not resolve 'autocomplete-paths' to a package path

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.165.0
System: Mac OS X 10.10.1
Thrown From: save-session package, v0.11.2

Stack Trace

Uncaught Error: Could not resolve 'autocomplete-paths' to a package path

At /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:347

Error: Could not resolve 'autocomplete-paths' to a package path
  at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:347:15)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:409:21)
  at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:295:19
  at /Applications/Atom.app/Contents/Resources/app/src/config.js:582:13
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Config.module.exports.Config.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app/src/config.js:690:29)
  at Config.module.exports.Config.setRawValue (/Applications/Atom.app/Contents/Resources/app/src/config.js:564:19)
  at Config.module.exports.Config.set (/Applications/Atom.app/Contents/Resources/app/src/config.js:190:14)
  at Object.module.exports.config (/Users/MiincGu/.atom/packages/save-session/lib/config.coffee:94:19)
  at Object.module.exports.project (/Users/MiincGu/.atom/packages/save-session/lib/config.coffee:47:6)
  at Object.module.exports.save (/Users/MiincGu/.atom/packages/save-session/lib/project.coffee:15:12)
  at /Users/MiincGu/.atom/packages/save-session/lib/project.coffee:32:8
  at handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
  at jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)

Commands

     -0:01.1 project-manager:toggle (input.hidden-input)
     -0:00.0 core:confirm (input.hidden-input)

Config

{
  "save-session": {
    "project": "/Users/MiincGu/Dropbox/DEV/Private/ToolKit"
  }
}

Installed Packages

# User
autocomplete-gocode, v0.5.0
autocomplete-plus, v1.1.0
autocomplete-snippets, v0.3.2
color, v0.5.0
compass, v0.7.5
emmet, v2.3.0
project-manager, v1.14.1
save-session, v0.11.2
seti-syntax, v0.2.1
seti-ui, v0.5.1

# Dev
No dev packages

/cc @atom/core

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.155.0
System: Mac OS X 10.10.1
Thrown From: save-session package, v0.11.0

Steps To Reproduce

  1. Attempt to close a file in Atom.
  2. His yes in the do you want to save changes prompt. This error then came up.

Stack Trace

At /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/pane.js:490

TypeError: undefined is not a function
  at Object.module.exports.Pane.promptToSaveItem [as defaultSavePrompt] (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/pane.js:490:23)
  at Pane.promptToSaveItem (/Users/victorhooi/.atom/packages/save-session/lib/save-prompt.coffee:21:15)
  at Pane.module.exports.Pane.destroyItem (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/pane.js:442:18)
  at Pane.module.exports.Pane.destroyActiveItem (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/pane.js:422:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/workspace.js:604:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/workspace.js:643:21)
  at atom-workspace.atom.commands.add.core:close (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/workspace-element.js:284:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

/cc @atom/core

Allow snapshotting of sessions in case something goes wrong?

I just had an issue where a saved file in Atom went to zero bytes (i.e. empty)

This is on OSX 10.10.1 - I had run out of disk space.

I assume Atom tried to save it, but something went wrong I guess. Anyhow, when I started back up, the file was empty.

I tried going into ~/.atom/packages/save-session/projects/Users/<rest_of_path>, however, there was only the most recent time I'd opened up that directory.

It would be awesome if there was some kind of automatic snapshotting facility available in save-session - for example, we take a snapshot every hour using git or something, and we can always roll back at least to the nearest hour.

Or maybe some kind of circular log, if you didn't want to worry about rotating out old sessions.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:55:11)
Object.addListeners (/home/paul/.atom/packages/save-session/lib/project.coffee:34:9)

Save open files when a file is closed

Currently, the open files are not saved when a file is closed. So if you close a file and don't make anymore edits, when you open a window next, that file will be reopened.

I experimented with pane.onDidRemoveItem(), but this was called when Atom was closed. This made Save Session think that you closed all of your files, and it should update the open files. Then, when you ran Atom again, no files would be restored.

I'm not sure what to do about this one yet.

Upgrading save-session package wipes old saved session?

I've just upgraded save-session to the latest version (0.11.3), in order to fix the bug in #45

However, when I start it back up, my last saved session is gone.

I wanted to check, is this by design?

If so, there should be a warning somewhere to users that upgrading the save-session package will blow away their saved session.

Uncaught SyntaxError: Unexpected end of input

Uncaught SyntaxError: Unexpected end of input

Atom Version: 0.161.0
System: linux 3.11.0-12-generic
Thrown From: save-session package, v0.11.1

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At file:///usr/share/atom/resources/app/static/index.html?loadSettings=%7B%22pathToOpen%22%3A%22%2Fhome%2Fi32ropie%2FGrupo_IS%2FAgendaDentista%2Fsrc%22%2C%22bootstrapScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%220.161.0%22%2C%22shellLoadTime%22%3A1341%2C%22initialPath%22%3A%22%2Fhome%2Fi32ropie%2FGrupo_IS%2FAgendaDentista%2Fsrc%22%7D:0

SyntaxError: Unexpected end of input
  at Object.parse (native)
  at /home/i32ropie/.atom/packages/save-session/lib/files.coffee:12:26
  at fs.js:295:14
  at Object.oncomplete (fs.js:93:15)

/cc @atom/core

Doesn't seem to be working on Windows

I using Atom 0.136.0 on Windows. I've installed this package with apm install save-session and the package is indeed listed as installed when I apm list. I even see the settings. But it is definitely not saving my sessions. Every time I open Atom I get a blank new file and the welcome message.

Is it possible that I'm missing some installation step, or is this a bug?

indexOf undefined on startup

I get this on startup:

Failed to activate package named 'save-session' TypeError: Cannot read property 'indexOf' of undefined
  at Object.module.exports.transformProjectPath (/Users/Aram/.atom/packages/save-session/lib/config.coffee:79:19)
  at Object.module.exports.saveFile (/Users/Aram/.atom/packages/save-session/lib/config.coffee:72:15)
  at Object.module.exports.activate (/Users/Aram/.atom/packages/save-session/lib/save-session.coffee:87:22)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:199:27)
  at /Applications/Atom.app/Contents/Resources/app/src/package.js:185:28
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:131:15)
  at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:179:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:404:21)
  at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:393:14)
  at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:379:19)
  at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:516:21)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:12:8)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:23:4)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:34:25)

Not restoring open files

the tree and other simple data is restored fine, but the open files aren't.

im on ubuntu 14.04, atom v0.137.0

Nothing is saved if atom is quit without first closing the window

It seems like the only way to trigger a save of the session is to close the window. If atom is quit (by a restart, unexpectedly, or just with cmd-q, the session is not saved. All of these should be able to restore the session (i.e. save the session when files are opened, etc, not when the window is closed).

Uncaught SyntaxError: Unexpected end of input

Getting this when I load up Atom:
file:///C:/Users/mesos_000/AppData/Local/atom/app-0.174.0/resources/app/static/index.html?loadSettings=%7B%22bootstrapScript%22%3A%22c%3A%5C%5CUsers%5C%5Cmesos_000%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-0.174.0%5C%5Cresources%5C%5Capp%5C%5Csrc%5C%5Cwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22c%3A%5C%5CUsers%5C%5Cmesos_000%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-0.174.0%5C%5Cresources%5C%5Capp%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%220.174.0%22%2C%22shellLoadTime%22%3A52625%7D:0
Hide Stack Trace
SyntaxError: Unexpected end of input
at Object.parse (native)
at c:\Users\mesos_000.atom\packages\save-session\lib\files.coffee:12:26
at fs.js:295:14
at Object.oncomplete (fs.js:93:15)

I've also noticed this started happening when my Atom auto-downgraded from 0.175.0 to 0.174.0.

Remember scroll position of each file

It would be great if this package remembered the scroll position of each file, it could spare so much time on each run! :)

Is this possible? Is this planned?

Doesn't seem to be working

Atom 0.127.0. The 'new file on startup' seems to still be active and not disabled. If I start a new instance w/o a project active I get the new file. If I close the new file and open three new tabs and put text in each tab, then quit and restart, I get two tabs with content, the third is blank. If I quit and restart I'm down to one tab with content and two blank. I disabled all other plugins and I'm still this behavior.

Move buffers out of settings

If you open your config file, Save Session will try to save that, which will cause your config file to basically duplicate itself repetitively.

Remember/Restore multiple projects

I had two 'projects' open at the same time - windows each with an array of tabs. When I quit and relaunched Atom, only the frontmost window was restored.

So I tend to have multiple projects open at the same time. So I am very excited to get this functionality back that I miss from Sublime Text!!! (I, in fact, continue to run Sublime just to have the Untitled File support. Perhaps no longer, now that I've found this!).

Here's how I was able to reproduce the issue -

cd folder1
atom .
cd ../folder2
atom .

Then quit, and re-launch Atom. Only the folder2 'project' will be reopened.

Open files not restored

Hello, when I quit Atom with several fils edited/opened in my project, if I reopen atom files are not restored (tree view is correctly reloaded).
Thanks for your support,
Fabien

PS: in addition your package seems to be guzzler in CPU...

Uncaught Error: ENOENT, open 'undefined//Users/alopex/.atom/project.json'

From @SimyungYang on January 6, 2015 0:47

[Enter steps to reproduce below:]

  1. start an atom editor with save-session plugin on
  2. save action might cause this error

Atom Version: 0.166.0
System: Mac OS X 10.10.1
Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT, open 'undefined//Users/alopex/.atom/project.json'

At fs.js:75

Error: ENOENT, open 'undefined//Users/alopex/.atom/project.json'
  at Error (native)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "npm-install",
      "save-session"
    ],
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "editor": {
    "fontSize": 14,
    "invisibles": {}
  }
}

Installed Packages

# User
color-picker, v1.2.6
linter, v0.9.1
minimap, v3.5.0
save-session, v0.11.2
npm-install, v2.0.0

# Dev
No dev packages

Copied from original issue: atom/atom#4854

Add option for never showing startup file

I'm not sure how to phrase it for a setting yet, but some people probably don't want the new file to show when you start Atom with no files to restore. It would be nice to disable it entirely for those people.

Uncaught Error: ENOENT, open 'undefined//Users/vijay/dev/ruby/oss/XXX/project.json'

[Enter steps to reproduce below:]

  1. Quit and reopen atom when a project was previously open.
  2. My settings will try to reopen files that were previously open while quitting.
  3. But, there is no file called 'project.json' in that folder.
  4. Also noticed that the preference setting for ''dataSaveFolder' (which was set to '/Users/vijay/.atom/packages/save-session/projects') keeps getting removed from the '.atom/config.cson' file and this could be the reason for the beginning value of 'undefined' when this plugin is trying to figure out the location of the 'project.json' file.
  5. btw, this was working fine in atom v 0.165

Atom Version: 0.166.0
System: Mac OS X 10.10.1
Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT, open 'undefined//Users/vijay/dev/ruby/oss/XXX/project.json'

At fs.js:75

Error: ENOENT, open 'undefined//Users/vijay/dev/ruby/oss/XXX/project.json'
  at Error (native)

Commands

  2x -30:00.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-light-syntax.theme-atom-light-ui)

Config

{
  "core": {
    "excludeVcsIgnoredPaths": false,
    "followSymlinks": true,
    "disabledPackages": [
      "language-c",
      "archive-view",
      "welcome",
      "jshint",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-gfm",
      "language-go",
      "language-make",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "language-toml",
      "package-generator"
    ],
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "editor": {
    "fontSize": 13,
    "showIndentGuide": true,
    "preferredLineLength": 120,
    "softWrap": true,
    "softWrapAtPreferredLineLength": true,
    "invisibles": {}
  }
}

Installed Packages

# User
auto-update-packages, v0.2.2
autocomplete-plus-async, v0.22.0
change-case, v0.4.0
coffee-compile, v0.8.4
file-type-icons, v0.5.3
git-tab-status, v1.3.0
highlight-line, v0.9.2
highlight-selected, v0.7.0
language-rspec, v0.2.1
linter, v0.9.1
linter-csslint, v0.0.11
linter-jshint, v0.1.0
linter-less, v0.3.1
linter-rubocop, v0.2.1
linter-scss-lint, v0.0.11
minimap, v3.5.0
minimap-git-diff, v3.1.0
omnisharp-atom, v0.1.6
recent-files, v0.3.0
recent-projects, v0.2.6
ruby-block-converter, v2.5.0
save-session, v0.11.2
syntax-settings, v0.7.1
tab-history, v0.4.0
tree-ignore, v0.1.1

# Dev
No dev packages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.