<p><b>@eht16</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2114#discussion_r298830316">src/keyfile.c</a>:</p>
<pre style='color:#555'>>  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);
</pre>
<blockquote>
<p>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</p>
</blockquote>
<p>Hmm, I'm not sure if checking <code>doc->real_path</code> for <code>NULL</code> is sufficient, there might be more cases when we want to trigger the config save. Also, the <code>doc->real_path</code> check would have to differentiate cases like renaming and closing documents.<br>
The config save process is pretty lightweight and, as said initially, very fast.<br>
Users trying to reduce disk IO still can disable this feature.</p>
<p>Can we agree to implement more sophisticated checks independent of this PR afterwards if someone wants to?</p>
<blockquote>
<p>Why is document-new connected to? If there's no file yet it won't affect the session.</p>
</blockquote>
<p>Removed in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/geany/geany/commit/d6ebff6c4f6c04786e5448735ac59462e2f7619a/hovercard" href="https://github.com/geany/geany/commit/d6ebff6c4f6c04786e5448735ac59462e2f7619a"><tt>d6ebff6</tt></a>. Probably not necessary, I just added it for completeness.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2114?email_source=notifications&email_token=AAIOWJ56CVAP4MXLWJQG3Z3P5CMPRA5CNFSM4HCD7YRKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5BVI4A#discussion_r298830316">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJY5QXL6ZG7OYS2ESQTP5CMPRANCNFSM4HCD7YRA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ562ADSKGU32W27NI3P5CMPRA5CNFSM4HCD7YRKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5BVI4A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2114?email_source=notifications\u0026email_token=AAIOWJ56CVAP4MXLWJQG3Z3P5CMPRA5CNFSM4HCD7YRKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5BVI4A#discussion_r298830316",
"url": "https://github.com/geany/geany/pull/2114?email_source=notifications\u0026email_token=AAIOWJ56CVAP4MXLWJQG3Z3P5CMPRA5CNFSM4HCD7YRKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5BVI4A#discussion_r298830316",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>