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

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1122#discussion_r738805854">projectorganizer/src/prjorg-main.c</a>:</p>
<pre style='color:#555'>> @@ -167,6 +307,7 @@ PluginCallback plugin_callbacks[] = {
        {"document-open", (GCallback) & on_doc_open, TRUE, NULL},
        {"document-activate", (GCallback) & on_doc_activate, TRUE, NULL},
        {"document-close", (GCallback) & on_doc_close, TRUE, NULL},
+       {"document-filetype-set", (GCallback) & on_doc_filetype_set, TRUE, NULL},
</pre>
<p>Basically I was just talking about calling the function in <code>on_doc_open()</code> which you already did. But what I think might be going on here is that Geany first calls the "document-open" signal and then sets the filetype in which case it overrides what you set in <code>on_doc_open()</code>. But I think you could use <code>g_idle_add()</code> inside <code>on_doc_open()</code> and set it in the callback which will be called after the function that calls "document-open" finishes.</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-plugins/pull/1122#discussion_r738805854">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ4TNKQBPLC2QSZQLEDUJHJEVANCNFSM5GF3IVPA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJY4LCC7FP4BHXXZCVDUJHJEVA5CNFSM5GF3IVPKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF46BTDA.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-plugins/pull/1122#discussion_r738805854",
"url": "https://github.com/geany/geany-plugins/pull/1122#discussion_r738805854",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>