Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-save settings and app state (list of opened files) in realtime, instead of on clean exit #373

Open
nekohayo opened this issue Oct 9, 2023 · 2 comments

Comments

@nekohayo
Copy link

nekohayo commented Oct 9, 2023

Testing with v59 (v60 isn't available in Fedora yet), I observed that Setzer apparently saves its state (settings, opened files, etc.) in the pickle format (instead of dconf / gsettings), and apparently does so only when you cleanly quit the application.

Therefore, according to my experience, if you encounter a crash (which unfortunately can happen sometimes), every time you reopen the app after a crash, its settings will be those of the last graceful exit, and it will not remember which files you had open at the time of the crash.

If my guess is correct… then it would be better to write to the pickle file whenever a setting (or the list of opened/closed files) is changed, instead of waiting for graceful shutdown to do it. Even if the app shouldn't crash in theory, in practice it can happen… and so can sudden power outages or the desktop environment crashing!

@kinten108101
Copy link
Contributor

Testing with v59 (v60 isn't available in Fedora yet), I observed that Setzer apparently saves its state (settings, opened files, etc.) in the pickle format (instead of dconf / gsettings), and apparently does so only when you cleanly quit the application.

Therefore, according to my experience, if you encounter a crash (which unfortunately can happen sometimes), every time you reopen the app after a crash, its settings will be those of the last graceful exit, and it will not remember which files you had open at the time of the crash.

If my guess is correct… then it would be better to write to the pickle file whenever a setting (or the list of opened/closed files) is changed, instead of waiting for graceful shutdown to do it. Even if the app shouldn't crash in theory, in practice it can happen… and so can sudden power outages or the desktop environment crashing!

I thought it's by design that Setzer does not autosave, that's why there's a save button :-) It would be better if Setzer does it like other text editors like vim where all changes are recorded in a temporary file and this temp file is only merged with the original file when click Save.

@nekohayo
Copy link
Author

Nah, I'm talking about the way settings & "the list of which files are open" is autosaved, not about autosaving the files' contents.

@nekohayo nekohayo changed the title Auto-save settings and state of opened files in realtime, instead of on clean exit Auto-save settings and state (list of opened files) in realtime, instead of on clean exit Oct 21, 2023
@nekohayo nekohayo changed the title Auto-save settings and state (list of opened files) in realtime, instead of on clean exit Auto-save settings and app state (list of opened files) in realtime, instead of on clean exit Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants