WrapEarnPass created an issue (geany/geany#4603)

Geany 2.2.0 (git >= 98bcbee3b).

https://www.geany.org/manual/reference/signals.html
``` project-save
Sent when a project is saved(happens when the project is created, the 
properties dialog is closed or Geany is exited). This signal is emitted shortly 
before Geany will write the contents of the GKeyFile to the disc.
```
This signal is firing on every document save, but the manual seems to indicate 
that it should only fire if the .geany file was updated. Which led me to check 
the .geany file for mtime, and sure enough, every document save is re-writing 
the .geany file.

```
build@debian:~/Projects/cmake-loader$ stat cmake-loader.geany && sha256sum 
cmake-loader.geany && cp cmake-loader.geany geany.back
  File: cmake-loader.geany
Modify: 2026-06-20 15:11:30.598326438 -0400
d042301db2dd6e5c55b923229ecd746e5a36e07b7395ea721a9f46cefa462ec6  
cmake-loader.geany
...removed a line and saved a file...
build@debian:~/Projects/cmake-loader$ stat cmake-loader.geany && sha256sum 
cmake-loader.geany
  File: cmake-loader.geany
Modify: 2026-06-20 15:12:00.230323035 -0400
806eb31af2f20a389755c33dffcf1b1397e14bcc8d708aec816f3a100c18ed45  
cmake-loader.geany
build@debian:~/Projects/cmake-loader$ diff cmake-loader.geany geany.back 
32c32
< 
FILE_NAME_0=2230;C;0;EUTF-8;1;1;0;%2Fhome%2Fbuild%2FProjects%2Fgeany-plugins-remote%2Fgeany-plugins%2Fautorun%2Fsrc%2Fplugin_main.c;0;2
---
> FILE_NAME_0=2231;C;0;EUTF-8;1;1;0;%2Fhome%2Fbuild%2FProjects%2Fgeany-plugins-remote%2Fgeany-plugins%2Fautorun%2Fsrc%2Fplugin_main.c;0;2
```
I don't know what that first field is, but it does not appear to provide any 
information that needs to be persisted to disk. 

Also, is current_page really a valuable field to store? The current_page may 
change hundreds of times in a session and has no real value to save except 
maybe on geany exit. I know with the rise of SSDs write times aren't really a 
thing anymore, but these types of "would be nice to know" would be better in a 
temp file synced back to .geany on exit, or perhaps elided entirely.

Also, for any plugins that depend on Project like Workbench, or Auto-run (the 
one I am working on), we have an option of either reloading our configs each 
time a document saves (because it looks like a project-save), or only reading 
the Project config on plugin_init.

```
Autorun-Message: 15:16:49.012: on_project_save
Autorun-Message: 15:16:49.012: found project autorun
Autorun-Message: 15:16:49.012:  CBS_00_CM
Autorun-Message: 15:16:49.012:  CBS_00_WD
Autorun-Message: 15:16:49.012:  COS_00_CM
Autorun-Message: 15:16:49.012:  COS_00_WD
Autorun-Message: 15:16:52.730: on_project_save
Autorun-Message: 15:16:52.730: found project autorun
Autorun-Message: 15:16:52.730:  CBS_00_CM
Autorun-Message: 15:16:52.730:  CBS_00_WD
Autorun-Message: 15:16:52.730:  COS_00_CM
Autorun-Message: 15:16:52.731:  COS_00_WD
Autorun-Message: 15:17:06.183: on_project_save
Autorun-Message: 15:17:06.184: found project autorun
Autorun-Message: 15:17:06.184:  CBS_00_CM
Autorun-Message: 15:17:06.184:  CBS_00_WD
Autorun-Message: 15:17:06.184:  COS_00_CM
Autorun-Message: 15:17:06.184:  COS_00_WD
Autorun-Message: 15:17:56.203: on_project_save
Autorun-Message: 15:17:56.203: found project autorun
```
Those were all fired by document-saves, and caused me to dump and reload the 
entire .geany file each time to synchronize with Project.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4603
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/[email protected]>

Reply via email to