Hi,
If I close a session or restart my computer without closing geany manually, then the last added notes do not appear anymore, i'm on 1.38 kubuntu 22.04, plasma 5.24. (so this does not happen if geany is closed manually before restart)
Kind regards,
Correct, scribble is only saved at Geany shutdown.
If you close a session or restart the machine you are effectively crashing Geany, so it has no chance to save anything.
Thank you for quick answer elextr.
I remember that on first use of this frame it is written it in something like : "write anything here" ; this could come with a warning notice and would avoid situations like this one https://users.geany.narkive.com/bmbq3r7w/geany-lost-all-my-scribble-notes
Well that was 11 years ago, and the issue is in the OP "so I killed Geany" ... same problem, but none of us seemed to notice back then.
But losing scribble is the least of the potential issues you can have when killing Geany, no modified buffer will be saved, so any edits will be lost, recent changes mean that session and settings are reasonably safe unless you are really (un)lucky and the crash happens in the middle of saving them.
If you have autosave on you might again be (un)lucky that the crash happens during a save and you lose the original file too.
The moral is "just don't crash it, its not written to handle that".
Geany certainly could be improved to to save modified buffers intermittently separate to the original files like some other tools do (Vscode for eg), but thats a reasonable amount of work and "somebody"s got to do it. And since it involves startup and reloading it might not be possible in a plugin, it might need to be in core.
Thank you for the elaborated reply elextr
Lots of users close their session without closing softwares 1 by 1 and if a software does not ask for saving something, then we can expect it that what was typed in it is saved(initially this thread was not talking about a crash, just a regular session closure)
Above all if no indication of this need to close the program manually is given(here is in french, after a fresh install, the indication provided by geany regarding the use of scribble)
![Screenshot_20230523_170835](https://github.com/geany/geany-plugins/assets/63743077/08fc2c5c-7527-44cf-b5...)
I understand that it is an work investment which may not a priority but I think this post install indication is wrong.
just a regular session closure
A session closure __is__ a crash as far as any running applications are concerned, they get sent a SIGTERM (and if they don't exit fast enough a SIGKILL) they don't get shutdown politely.
Geany used to try to save files when it received a SIGTERM, but that has a dialog and user interaction, illegal actions in a SIGTERM handler, and user interaction was often too slow. So the whole thing was undefined behaviour from performing illegal actions in a signal handler, and random success depending on how fast the user was, and increased risk of losing the original files as the risk of being killed during writing was increased. So that was disabled.
As to the message, for string contents just use the pencil to edit it in github, since you don't have permission github will kindly go to the trouble of making you a fork and submitting a PR.
Closed #1253 as completed.
github-comments@lists.geany.org