Bug 475210

Summary: Always create a tempfile / session file for new documents
Product: [Applications] kate Reporter: Henning <boredsquirrel>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: aspotashev, christoph, mirh, waqar.17a
Priority: NOR    
Version First Reported In: 23.04.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Henning 2023-10-04 11:28:20 UTC
Afaik new documents are purely saved in RAM. Only when they are stored in a location, the live changes are stored in a tempfile in the same dir.

What happens:
I created a new file and didnt save it yet. Set the Laptop to sleep, after wakeup kscreenlock crashed, again, and I needed to force shutdown. the writing was lost on reboot, no restore dialog as there was no tempfile.

What should happen:
Always create a tempfile in the KDE config dir or somewhere else. Maybe in Home, and add it to a .hidden file or simply add a dot. This tempfile will then allow restoring any previous document, not only if a saved one has a tempfile in the same dir with some detected diffs.

This is crucial for Kates crash resistance. May have problems in the Flatpak due to portals, so saving in a Kate-specific config dir should be better to avoid any external storage write access
Comment 1 Christoph Cullmann 2024-01-20 21:25:41 UTC
Is a good idea and a valid wish, help to implement that is welcome.
Comment 2 mirh 2024-07-03 13:59:56 UTC
Duplicate of bug 274102?
Comment 3 Waqar Ahmed 2025-05-26 04:33:20 UTC

*** This bug has been marked as a duplicate of bug 274102 ***