eht16 commented on this pull request.


>  void configuration_init(void)
 {
        keyfile_groups = g_ptr_array_new();
        pref_groups = g_ptr_array_new();
        init_pref_groups();
+
+       g_signal_connect(geany_object, "document-new", 
G_CALLBACK(document_list_changed_cb), NULL);
+       g_signal_connect(geany_object, "document-open", 
G_CALLBACK(document_list_changed_cb), NULL);
+       g_signal_connect(geany_object, "document-save", 
G_CALLBACK(document_list_changed_cb), NULL);

> It would be nice to avoid saving the conf when saving a file in the common 
> case, e.g. when just updating the file's content. AFAIK, we don't affect the 
> session then, do we? My point is that I'm 

Hmm, I'm not sure if checking `doc->real_path` for `NULL` is sufficient, there 
might be more cases when we want to trigger the config save. Also, the 
`doc->real_path` check would have to differentiate cases like renaming and 
closing documents.
The config save process is pretty lightweight and, as said initially, very fast.
Users trying to reduce disk IO still can disable this feature.

Can we agree to implement more sophisticated checks independent of this PR 
afterwards if someone wants to?

> Why is document-new connected to? If there's no file yet it won't affect the 
> session.

Removed in 
https://github.com/geany/geany/pull/2114/commits/d6ebff6c4f6c04786e5448735ac59462e2f7619a.
 Probably not necessary, I just added it for completeness.

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

Reply via email to