You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Hello,
I am using Atom 1.14.3 in Mint-17 64-bit and the following scenario causes Atom to close without prompting to save the modified file.
Core setting is:
"Restore previous windows on start" -- UNCHECKED
"Open Empty editor on start" -- CHECKED
Scenario 1 - With just one Untitled tab (as expected)
Launch Atom editor from Menu
In the Untitled tab (document), type something to make it into a modified but DO NOT save the document
Close Atom and it will prompt you to save or to discard the Untitled document.
Scenario 2 - With one Untitled document + One unmodified file (The bug scenario)
Launch Atom editor from Menu
Open a document but do not modify it
If TreeView is shown, toggle it off
In the Untitled document, type something to modify it but do not save it. It does not matter how many "Untitled" documents are opened.
Press Ctrl-Q or hit the X to close Atom. Atom does not prompt the user to save the Untitled document and simply discarding it and exit. OOPS! This is difference from Scenario 1.
I have been using an unmodified version of Atom other than to choose the themes from standard ones.
In the future, please completely fill out the issue template, or your issue will be closed without further action. For example, now I need to ask if you've experienced the same behavior in safe mode (atom --safe), and what the output of atom --version is, both of which are covered in the issue template.
It does seem like we should always be prompting to save changes if "Restore previous windows on start" is disabled. /cc @iolsen
My apology for not following the protocol. It is my first time. If I may I have discovered more scenario that may help:
If you have a number of Untitled document, it will prompt the user on closing.
If you have a number of opened document and modified, Atom does not prompt on exit.
The atom --version produces the following data:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
There is no difference in behaviour with starting atom --safe or just atom
Thanks
Rover
Reacted by Winston Liu and Andrea Liliana Griffiths
Hello,
I have Atom 1.14.3 installed in 3 Linux Mint 17.3 in 3 virtual machine (VMWare) and each Linux is:
Linux Mint 17.3 Cinnamon 64-bit
Cinnamon Version 2.8.8
Linux kernel: 3.19.0-32-generic
In each VM I use your .deb file atom-amd64_1.14.3.deb (I renamed it to append the Atom version so that I can compare different versions) and its MD5 is
5706073ce1299fee4456904cba044e1a atom-amd64_1.14.3.deb
After reading your reply, I went back to make sure I have not missed anything and I used one of my VM to carry out the following steps:
1) Uninstall Atom using the .deb using GDebi package installer that comes with Mint.
2) rm -rf ~/.config/Atom
3) rm -rf ~/.atom
4) Run the installation using the .deb file
5) Launch Atom to change the setting to uncheck "Restore previous windows on Start"
6) Quit Atom and to confirm re-establishment of ~/.config/Atom and ~/.atom directories
7) Launch Atom with --version and here are the information:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
8) Then use the Atom to repeat the tests I mentioned. The same behaviour is repeated.
If necessary, I can recreate a new VM to test Atom.
Rover
On 23/02/17 02:58 AM, Andy Hinkle wrote:
Unable to reproduce both scenarios with stated store settings.
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#13861 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYvTc3C082JxNmUw9V02h7SaU31Xsak4ks5rfGlQgaJpZM4MICuX>.
I created a virgin VM of Mint-17.3 (64-bit) using the distro's DVD ISO image (linuxmint-17-cinnamon-dvd-64bit.iso MD5=1c3fef2117fad9c9bc905abdeb474ac1)
Then I updated the OS from Canonical (I can go back to try without update). Now the Operating system is as follows:
3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014
Cinnamon: 2.2.16
Atom version:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
This vm has an older version of Linux kernel than my other VM's but I do not believe an editor would be so sensitive to kernel version.
I ran through the scenarios - one untitled modified document + 1 open document (not modified), etc and manage to repeat the problems - it did not prompt me if I want to save the untitled document.
Atom is the only editor that exhibits this problem. I tested the scenario with Sublime 3 (with hot exit set to false), Kate and GEdit and they all well behave.
I notice there is a CLI option --log-file. Is that useful to collect information to nail this problem? I am having trouble using this option. I tried --log-file=test.log but the file is not generated.
Rover
PS Tried to download your Win64 installer to test it in my Win7 VM but your Windows download site keeps timing out. So have to wait for another day.
I download the latest UBuntu 16.04.2 LTS Desktop 64-bit to create a brand new VM. Then installed Atom 1.14.3 and it fails the test in that VM. The only thing I have installed is the VMWare Tools.
Atom version:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
Ubuntu 16.04.2 LTS version
4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017
Thank @RoverJOne for the repro steps. If you reopen the folder you had before you should have your unsaved data. Can you try opening the folder from terminal (with no atom processes running) atom . from the directory you had open.
I'm trying to understand this issue better. I believe we have a bug with opening any folder from the context menu from a empty editor. Also maybe we should have a option for Prompt for Save on Close, for those who like to always have it prompt for save, would be nice.
@ungb I believe the crux of the issue lies in the "Restore previous windows on start" option being unchecked. Therefore, project state is never restored, so we should prompt to save all changes before closing, because if we don't they're unrecoverable.
@50Wliu if you reopen the project, it works from when I try to repro, but not from the context menu. see #13873 which is probably the cause of multiple other bugs.
From my understanding, Restore previous windows on start just opens the last project you had open when you open atom, it doesn't have anything to do with saving and not saving project sessions, but maybe if we do have this unchecked we want to prompt for save, but if you reopen that project from terminal with atom . with no Atom process running (bug #13873) this should work.
Hello,
I don't quite follow the instructions but here is my interpretation of your instructions:
1) Run atom
2) Open a file leaving the Untitled there. So atom has 2 documents.
3) In the Untitled document, type something there but do not save it.
4) Hit Ctrl-Q or File > Quit to exit atom
5) Here is your suggestion:
run atom .
from terminal from the directory that I launch atom in step 2.
6) atom opens with no file, not even an Untitled document. The difference now is that it opens the tree view instead which is something I dearly love to see an option to stop it appearing.
So sorry, it does not help.
Rover
On 24/02/17 05:02 AM, Bryant Ung wrote:
If you reopen the folder you had before you should have your unsaved data. Can you try opening the folder from terminal (with no atom processes running) atom . from the directory you had open.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#13861 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYvTcxRLhxjqdnZUZ-cQOlMQUDx1T7B1ks5rfdfGgaJpZM4MICuX>.
Sorry, Can you clarify? Which are you seeing on ubuntu? That you are able to see what I see in my comment (#13861 (comment)), or the same thing you see in mint linux(comment #13861 (comment))?
I can repeat the problem - not prompting to save - in Ubuntu and in Mint.
I can reproduce the use of atom . as reported by you if I have the following conditions:
1) when atom is closed with an unsaved Untitled + one file whose directory is where I was used to launch atom.
2) then when I launch atom . it will restore the files list including the Untitled.
However, the following steps cause your scheme not to work:
1) navigate to a folder called ~/Test/folder-start (or whatever is called)
2) launch atom from folder-start
3) You should have an Untitled document.
4) Open a file not from folder-start or its sub-folder. Let say ~/Documents/test/test1.txt
5) type something into Untitled document
6) Press Ctrl-Q to exit. atom should not prompt you:-(
7) from folder-start, launch atom .
8) atom should start with no document but only the tree view showing the ~/Document/test the folder in step 4). So under these circumstances atom . is no help.
Can you confirm this?
If the folder in step 4 is same as your launch folder, then I can repeat your observation and using atom . will restore the unsaved document.
But I don't think that is the solution. It seems the code always cache the document a la pre-1.14.3 version and then it . simply ignores the "Restore previous windows On Start" and restore from cache.
Now here is another scenario - not using Untitled document - to demonstrate atom . does not work:
1) navigate to a folder called folder-start which has a file you want to edit. Let's called this ~/Test/folder-start/test1.txt
2) launch atom and remove all Untitled document
3) open a file in some distance directory say ~/Documents/test-atom/test02.txt
4) open test1.txt
5) type something in test1.txt but don't save
6) Now you have test1.txt (*) and test02.txt in atom. Press Ctrl-Q to exit atom
7) without changing directory from that in step 1), launch atom with .
8) what do you get now? In my tests I do not see the restore files list as in 6). I got some files that once were there when I edited "Untitled" + Some file. I still have to work out how those files got there. The changes I left in test1.txt is now not recoverable.
So the atom . does not restore the most recent cached list.
IMHO atom . is not a fix of the problem. How could a user capable to remember where to launch the . to restore the sets of missing files? You need psyhic power. It is so easy to simply type Ctrl-Q.
The correct fix IMHO is to prompt the user to save unmodified files just like all other editors when you have that option turned off so that the user could save. Even for editor that can restore sessions, they always take the safe route to save first and restore later if required. Many developers use a number of tools. So it is not inconceivable for them to edit the file with atom, close it, and open that file with another tool. If closing it does not prompt them to save, they may then be misled into using a modified file when in fact not.
Rover
On 24/02/17 09:58 AM, Bryant Ung wrote:
Sorry, Which are you seeing on ubuntu? That you are able to see what I see in my comment (#13861 (comment)<#13861 (comment)>), or also the same thing you see in mint linux(comment #13861 (comment)<#13861 (comment)>)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#13861 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYvTc4brVB4awaIIyE4lMsGtWBw48fKjks5rfh05gaJpZM4MICuX>.
Thanks for your prompt responses and feedback @RoverJOne! Sorry for the confusion, I wasn't trying to say that atom . was the fix to the issue, I was just trying to verify the behavior you are seeing and where the underlying data-loss issues is occurring.
It seems like, you would like the editor to prompt you for unsaved changes if you have the option Restore previous windows on start unchecked, which I think is valid.
I believe that having a separate option for Always Prompt to Save would be good to have as it seems that some people would rather always save their files on close than relying on the saved session regardless of if the previous windows will be loaded on start.
Also, based on your scenarios looks like there might be other data-loss bugs. I'll spend some time investigate the scenarios you provided in comment #13861 (comment)
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
winstliu commentedon Feb 22, 2017
In the future, please completely fill out the issue template, or your issue will be closed without further action. For example, now I need to ask if you've experienced the same behavior in safe mode (
atom --safe), and what the output ofatom --versionis, both of which are covered in the issue template.It does seem like we should always be prompting to save changes if "Restore previous windows on start" is disabled. /cc @iolsen
RoverJOne commentedon Feb 22, 2017
Hi iolsen,
My apology for not following the protocol. It is my first time. If I may I have discovered more scenario that may help:
If you have a number of Untitled document, it will prompt the user on closing.
If you have a number of opened document and modified, Atom does not prompt on exit.
The atom --version produces the following data:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
There is no difference in behaviour with starting atom --safe or just atom
Thanks
Rover
RoverJOne commentedon Feb 23, 2017
RoverJOne commentedon Feb 23, 2017
Hello,
I created a virgin VM of Mint-17.3 (64-bit) using the distro's DVD ISO image (linuxmint-17-cinnamon-dvd-64bit.iso MD5=1c3fef2117fad9c9bc905abdeb474ac1)
Then I updated the OS from Canonical (I can go back to try without update). Now the Operating system is as follows:
3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014
Cinnamon: 2.2.16
Atom version:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
This vm has an older version of Linux kernel than my other VM's but I do not believe an editor would be so sensitive to kernel version.
I ran through the scenarios - one untitled modified document + 1 open document (not modified), etc and manage to repeat the problems - it did not prompt me if I want to save the untitled document.
Atom is the only editor that exhibits this problem. I tested the scenario with Sublime 3 (with hot exit set to false), Kate and GEdit and they all well behave.
I notice there is a CLI option --log-file. Is that useful to collect information to nail this problem? I am having trouble using this option. I tried --log-file=test.log but the file is not generated.
Rover
PS Tried to download your Win64 installer to test it in my Win7 VM but your Windows download site keeps timing out. So have to wait for another day.
RoverJOne commentedon Feb 23, 2017
Hello,
I download the latest UBuntu 16.04.2 LTS Desktop 64-bit to create a brand new VM. Then installed Atom 1.14.3 and it fails the test in that VM. The only thing I have installed is the VMWare Tools.
Atom version:
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
Ubuntu 16.04.2 LTS version
4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017
Thanks.
Rover
winstliu commentedon Feb 23, 2017
Confirmed. Thanks for the detailed steps.
ungb commentedon Feb 23, 2017
Thank @RoverJOne for the repro steps. If you reopen the folder you had before you should have your unsaved data. Can you try opening the folder from terminal (with no atom processes running)
atom .from the directory you had open.I'm trying to understand this issue better. I believe we have a bug with opening any folder from the context menu from a empty editor. Also maybe we should have a option for
Prompt for Save on Close, for those who like to always have it prompt for save, would be nice.winstliu commentedon Feb 23, 2017
@ungb I believe the crux of the issue lies in the "Restore previous windows on start" option being unchecked. Therefore, project state is never restored, so we should prompt to save all changes before closing, because if we don't they're unrecoverable.
ungb commentedon Feb 23, 2017
@50Wliu if you reopen the project, it works from when I try to repro, but not from the context menu. see #13873 which is probably the cause of multiple other bugs.
From my understanding,
Restore previous windows on startjust opens the last project you had open when you open atom, it doesn't have anything to do with saving and not saving project sessions, but maybe if we do have this unchecked we want to prompt for save, but if you reopen that project from terminal withatom .with no Atom process running (bug #13873) this should work.RoverJOne commentedon Feb 23, 2017
ungb commentedon Feb 23, 2017
let me spin up a mint linux distro tomorrow and try to repro. I am not seeing that on mac.
My current settings:

GIF:

RoverJOne commentedon Feb 23, 2017
ungb commentedon Feb 23, 2017
Sorry, Can you clarify? Which are you seeing on ubuntu? That you are able to see what I see in my comment (#13861 (comment)), or the same thing you see in mint linux(comment #13861 (comment))?
RoverJOne commentedon Feb 24, 2017
ungb commentedon Feb 24, 2017
Thanks for your prompt responses and feedback @RoverJOne! Sorry for the confusion, I wasn't trying to say that
atom .was the fix to the issue, I was just trying to verify the behavior you are seeing and where the underlying data-loss issues is occurring.It seems like, you would like the editor to prompt you for unsaved changes if you have the option
Restore previous windows on startunchecked, which I think is valid.I believe that having a separate option for
Always Prompt to Savewould be good to have as it seems that some people would rather always save their files on close than relying on the saved session regardless of if the previous windows will be loaded on start.Also, based on your scenarios looks like there might be other data-loss bugs. I'll spend some time investigate the scenarios you provided in comment #13861 (comment)
lock commentedon Apr 2, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!