<p><a class="user-mention" data-hovercard-user-id="9009011" href="https://github.com/LarsGit223">@LarsGit223</a> yes thats exactly what I mean.</p>
<blockquote>
<p>If there is more than one plugin, what do we do?</p>
</blockquote>
<p>Probably the same as when two plugins share any resources now, fail in unpredictable ways.  This already occurs when you run two plugins that both use markers (bookmarks is one, not sure of the other).</p>
<p>Whilst I have argued in the past that Geany needs to somehow mediate between plugins, I have become convinced that in reality Geany just can't know what to do, and either the plugin authors have to write them to play nice together, or the user has to not use both at the same time.  Since Geany doesn't know what plugins do, how is it going to decide who wins?  Should the "project" plugin that says its priority zero beat the "C language features" plugin that also calls itself priority zero and also wants to set commands?  And what about when the current file is a Python file?  Geany just doesn't know.</p>
<p>Since any mechanism is going to be specific to what the plugins want to do, and shared between plugins, maybe if there is a mechanism you can implement for a specific case it should go in your shared plugin library, eg</p>
<pre><code>plugin_set shared commands_decided_by_arm_wrestling(credentials, command_number, command)
</code></pre>

<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/issues/733#issuecomment-380262971">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ9kvMTCEimbbxhmNPP82NzD5uYJQks5tnSz3gaJpZM4TNXBD">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ_W6YjZD6TciNR3756izmUiZst8Rks5tnSz3gaJpZM4TNXBD.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/issues/733#issuecomment-380262971"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #733: @LarsGit223 yes thats exactly what I mean.\r\n\r\n\u003e If there is more than one plugin, what do we do?\r\n\r\nProbably the same as when two plugins share any resources now, fail in unpredictable ways.  This already occurs when you run two plugins that both use markers (bookmarks is one, not sure of the other).\r\n\r\nWhilst I have argued in the past that Geany needs to somehow mediate between plugins, I have become convinced that in reality Geany just can't know what to do, and either the plugin authors have to write them to play nice together, or the user has to not use both at the same time.  Since Geany doesn't know what plugins do, how is it going to decide who wins?  Should the \"project\" plugin that says its priority zero beat the \"C language features\" plugin that also calls itself priority zero and also wants to set commands?  And what about when the current file is a Python file?  Geany just doesn't know.\r\n\r\nSince any mechanism is going to be specific to what the plugins want to do, and shared between plugins, maybe if there is a mechanism you can implement for a specific case it should go in your shared plugin library, eg\r\n```\r\nplugin_set shared commands_decided_by_arm_wrestling(credentials, command_number, command)\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/733#issuecomment-380262971"}}}</script>