Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Autosave to temporary file #11
Comments
probablycorey
added
the
enhancement
label
Jul 10, 2014
itaylor
commented
Aug 7, 2014
|
+1 In Sublime Text, I can make changes to a file, not save them and quit Sublime. Sublime has saved my changes into a temp file somewhere. When I reopen Sublime, my file is reopened with the changes I'd made to it, but the original file is still unsaved on disk. This makes it so that you never have to worry about your computer crashing/battery dying with unsaved changes... all buffers are preserved until I throw them away, and the real file is never modified until I say I'm ready (by hitting save). |
itaylor
commented
Aug 7, 2014
|
There's another discussion going that I think overlaps with this feature. |
rahul286
commented
Aug 20, 2014
|
+1 @itaylor you described exactly what I came here looking for. Coming back from Sublime, I quite Atom without bothering new files and data in them. I realize I lost my work. Old habit is to blame...! |
jeffmcneill
commented
Oct 15, 2014
|
+1 really need to not lose data when the app or the computer shuts down without notice! |
screendriver
commented
Oct 28, 2014
|
+1 |
jachinte
commented
Feb 26, 2015
|
+1 |
lambdafu
commented
Mar 3, 2015
|
I gave atom.io a try the other day and lost all pending edits after a system crash. Autosaving to temporary files is a must have feature, so I am back to good ol' emacs. |
Poetro
commented
Mar 9, 2015
|
+1 |
sambao21
commented
Mar 20, 2015
|
|
mosauter
commented
Apr 12, 2015
|
+1 |
lcb931023
commented
Aug 7, 2015
|
|
teheavy
commented
Sep 11, 2015
|
+1 |
Meligy
commented
Sep 12, 2015
|
+1 .. Some 3rd party tried to do it in save-session but it does need an insider to make it integrate properly, for example, it doesn't detect the different between tab close (no save required), and entire app close (save should hppen), as in save-session#121 |
s7v7nislands
commented
Sep 14, 2015
|
+1 |
asbjornu
commented
Nov 18, 2015
|
This is the number one gripe I have with Atom and the feature I miss most from Sublime Text. |
zenna
commented
Nov 24, 2015
|
+1 |
stilliard
commented
Dec 4, 2015
|
+1 this would be awesome. |
wbecker
commented
Jan 14, 2016
|
Notable changes in 1.4.0 says that "Untitled documents in a project are now serialized and restored." Does this fix / relate to this issue? |
asbjornu
commented
Jan 14, 2016
|
@wbecker It covers my needs perfectly, at least. Thanks for pointing it out! |
Meligy
commented
Jan 14, 2016
|
Does "in a project" mean anything specific? |
|
@Meligy Any time you open Atom you are implicitly in a project. A project is implicitly defined based on the list of root folders. So if you do |
forestsheep
commented
Jan 25, 2016
|
+65535 |
Meligy
commented
Jan 25, 2016
|
Well, it's not working for me. It seems to work when I have a folder open in sidebar, but if I remove last folder from project, restart, and try to lave a file open and restart again, it's gone. I have tried that with latest Atom beta (1.5 beta) on latest Mac, and with Atom release (1.4) on Windows 10. Same behaviour. I think maybe it only saves unsaved changes to already (previously) saved files, but the file was never saved (never existed on disk or had a location path), it doesn't restore it. And the option to save temporary version to disk before saving files doesn't seem to change this. |
|
@Meligy you're right, we're still working on preserving the state of untitled buffers. You can find links to all the current stuff about them here atom/atom#9968. |
denieler
commented
Aug 21, 2016
|
We are supporting your idea with save-workspace package. Where we are saving whole workspace with project. Please look at out project and we will be appreciate if you'll get us valuable suggestions and, sure, welcome to contribute! |
jessejiang0214
commented
May 1, 2017
|
Need this feature, I thought it like Sublime Text, it works fine at begin. But after few days working, I lost all files in Atom |
jeffmcneill
commented
May 2, 2017
|
Pretty sure https://github.com/atom/autosave does the trick these days. If you open atom in a given directory, then changes to that set of tabs should be saved, along with unsaved tabs as well. That said, a system crash would still wipe out the unsaved tabs, so best to "name and save" each tab, including any temporary ones. I also like https://atom.io/packages/file-watcher for rare file conflicts. |
phord
commented
Jun 2, 2017
|
@jeffmcneill Since version 1.4, Atom keeps "untitled" windows just fine even when there's a crash. It does this even if autosave is disabled. Autosave is used to save the contents to the original file instead of to a hidden Atom-state-cache. |
asbjornu
commented
Jun 8, 2017
|
@phord: Does that work with or without any projects? |
phord
commented
Jun 8, 2017
|
@asbjornu It works with projects. It does not work without a project. Also, I didn't realize this issue was about the autosave plugin when I replied; I thought I was replying to an issue on atom/atom. Here's something funny: If you open atom without a project, open an unnamed file, type something into it, and then exit Atom, you get this dialog: 'untitled' has changes, do you want to save them? Here's what the buttons do: [*] If you choose "Save" but then don't actually save the file (because you canceled the Save dialog), Atom exits immediately. As far as I can tell, there is no difference between the "Cancel" and "Don't Save" buttons. For that matter, "Save + Cancel" also is the same. In all cases, when you reopen Atom without a project, you will have an 'untitled' file open again with no contents. |
g3blv
commented
Aug 6, 2017
|
It is not quite clear to me if unsaved filed are (auto) saved or not saved as temporary files. |

brandondrew commentedJun 2, 2014
It would be extremely useful if this gave the option to save to a temporary file rather than the regular file, since overwriting the on-disk version of a file is not always desired, but preserving a copy of all changes made in memory is always useful.