Uncaught Error: Can't save buffer with no file path
roccotr opened this issue · comments
[Enter steps to reproduce below:]
- ...
- ...
Atom Version: 1.7.3
System: Mac OS X 10.11.4
Thrown From: tokamak package, v0.2.7
Stack Trace
Uncaught Error: Can't save buffer with no file path
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1089
Error: Can't save buffer with no file path
at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1089:15)
at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1083:19)
at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:660:26)
at /Users/sommoyogurt/.atom/packages/tokamak/lib/utils.coffee:96:68
at Array.map (native)
at Function.module.exports.Utils.savePaneItems (/Users/sommoyogurt/.atom/packages/tokamak/lib/utils.coffee:96:35)
at atom-workspace.subscriptions.add.atom.commands.add.tokamak:run (/Users/sommoyogurt/.atom/packages/tokamak/lib/tokamak.coffee:103:15)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at module.exports._executeCallback (/Users/sommoyogurt/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:71:23)
at space-pen-button.<anonymous> (/Users/sommoyogurt/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:30:7)
at space-pen-button.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-button.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
Commands
-0:01.3.0 tokamak:run (atom-text-editor.editor)
Config
{
"core": {
"customFileTypes": {
"source.ini": [
".buckconfig",
".flowconfig"
],
"source.json": [
".arcconfig",
"BUCK.autodeps"
],
"source.python": [
"BUCK"
]
},
"disabledPackages": [
"atom-jsx-transform",
"linter-jscs",
"jscs-fixer",
"linter-scss-lint",
"nuclide",
"jshint"
]
},
"tokamak": {
"cargoBinPath": "/usr/local/Cellar/multirust/0.8.0/bin/cargo",
"multirustBinPath": "/usr/local/Cellar/multirust/0.8.0/bin/multirust",
"racerBinPath": "/Users/sommoyogurt/.multirust/toolchains/stable/cargo/bin/racer",
"rustSrcPath": "/Users/sommoyogurt/workspace/source/rustc-1.8.0/src",
"rustcBinPath": "/usr/local/Cellar/multirust/0.8.0/bin/rustc"
}
}
Installed Packages
# User
angularjs, v0.3.4
atom-jade, v0.3.0
atom-jshint, v2.0.0
autoclose-html, v0.23.0
autocomplete-elixir, v1.5.13
autocomplete-python, v1.7.2
build, v0.61.0
build-cargo, v0.14.0
file-icon-supplement, v0.8.3
file-icons, v1.7.8
git-diff-details, v1.3.0
git-plus, vundefined
javascript-snippets, v1.2.1
language-babel, v2.18.5
language-cmake, v0.1.4
language-ejs, v0.2.0
language-elixir, v0.12.3
language-javascript-jsx, v0.3.7
language-rust, v0.4.6
linter, v1.11.4
linter-cpplint, v1.0.1
linter-eslint, v7.2.1
linter-ruby, v1.2.2
linter-rust, v0.4.5
merge-conflicts, v1.4.2
minimap, v4.23.2
node-debugger, v1.4.7
project-manager, v2.9.7
python-indent, v0.4.3
python-tools, v0.6.7
racer, v0.20.0
react, v0.15.0
react-snippets, v0.4.2
rust-api-docs-helper, v0.5.1
terminal-plus, v0.14.5
tokamak, v0.2.7
tokamak-terminal, v0.1.1
tool-bar, v0.4.0
tree-view-open-files, v0.3.0
# Dev
No dev packages
This appears to happen only if I have a buffer open that has never been saved to a file. I don't speak CoffeeScript
, but it looks like commands like rebuild
try to unconditionally save all open buffers, rather than first checking whether or not they represent a file on disk.
Unless there's some subtlety I'm missing here, this appears to simply be a forgotten edge case.
This also happens if you have any settings panels open.
@slashgrin This one #38 is going to be fixed.