@eht16 commented on this pull request.


In src/keyfile.c:

>  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 d6ebff6. 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, view it on GitHub, or mute the thread.