Steps to reproduce: Test A: 1. Open Kate/KWrite. 2. Type something. 3. Save to a file on disk. 4. Type some more. 5. Kill the process without closing the app correctly. 6. Reopen the file in Kate/KWrite. 7. It flags the file as "not closed properly" and offers to recover the unsaved data. Test B: 1. Close the above file without recovering the data. 2. Move the file on disk (without the unsaved data) to another location. 3. Open it from there in Kate/KWrite. 4. It does NOT flag the file as "not closed properly" and does not offer to recover the unsaved data. Test C: 1. Open a new document in Kate/KWrite. 2. Type something. 3. Kill the process as before but *without* saving to disk. 4. Reopen Kate/KWrite. 5. It does NOT advise you that a document was not saved and does not offer to recover the unsaved data. Observed behaviour: Test A is the nominal behaviour. In Test B and Test C, there is no way to recover the lost data. Other applications such as LibreOffice which are used for other purposes and not really useful for plaintext editing such as Kate/KWrite however have a data recovery feature which only depends on the existence of the swap file and not on the existence of the saved file or of such a file being located in the same directory. Expected behaviour: 1. Loss of data is unacceptable. 2. Katepart should save swap data for unsaved files also. 3. When Kate/KWrite (or at least Kate only) is reopened after an abnormal termination, it should advise the user of the availability of such swap data, whether for saved or unsaved documents, and offer to recover the data. Comment: 1. This behaviour is already found in LibreOffice etc but which aren't useful for the usecase of Kate/KWrite etc. Hence I request for Kate to have this ability. 2. I lost many paragraphs of writing this morning because of this limitation, prompting me to file this bug. Thanks!
Under "expected behaviour" I forgot to add a fourth point: 4. Same swap behaviour should be available for moved files also. Of course, Katepart can't know where the file has been moved *to*, but it should know where the file was earlier and should offer to save there or at least it should offer to save it somewhere if that location no longer exists.
Was your loss of data caused by a crash, or did you kill Kate manually?
(In reply to Christoph Feck from comment #2) > Was your loss of data caused by a crash, or did you kill Kate manually? Initially it was caused by a system power loss due to my UPS battery failing, but for testing of course I didn't pull the plug! Surely the effect is the same whether it goes down itself or we kill it?
I recently saw how Notepad++ is dealing with unsaved files: 1. Open Notepad++, create a new tab and type something 2. Close Notepad++; there is no "do you want to save" question 3. Open it again; the content of unsaved tab was restored without any message I am not convinced whether this message-less behaviour is a good. But just for the record.
I'm also coming from windows and using notepad++. Their behaviour is brilliant. If all my windows 'resume' after a reboot on linux. I expect a text editor to also just 'resume' in the exact same state. With all files including unsaved text to be open
I am very open to have such a feature ;=) Unfortunately I think at the moment nobody is working on this. Patches highly welcome!
*** This bug has been marked as a duplicate of bug 353654 ***