<blockquote>
<p>It would be good if Geany could organize its sockets so that more than the first open instance could be communicated with.</p>
</blockquote>
<p>See --socket-file or -c <a href="https://www.geany.org/manual/current/index.html#command-line-options" rel="nofollow">here</a></p>
<blockquote>
<p>Ideally, the most recently focused editor would accept document open commands.</p>
</blockquote>
<p>Needs some system wide shared global thing that records who was the last Geany to be focussed, but I doubt it will be very useful on systems with "focus follows mouse" since it would be too easy to change which Geany that was.</p>
<blockquote>
<p>What would be cool is if I could type open or edit instead, to open them in the current instance.</p>
</blockquote>
<p>See above.  You can define your own <code>open</code> or <code>edit</code> aliases since the terminal has a shell running inside it.  (Note Geany does not see anything that you type in the terminal other than a few shortcut keys, it all goes directly to the shell)</p>
<blockquote>
<p>We could tackle multiple-instance communication by allowing successive instances to listen on the existing socket, or just having them create sequential new sockets. I prefer the former.</p>
</blockquote>
<p>Unix sockets allow multiple listeners, but only one of them can read a message, so its the one taht wins the race that gets it.  You need a shared server (the "global thing" referred to above) that communicates wit all the instances.  IMO this is all becoming too complex just to automate which Geany gets an open request, its better to specify it explicitly as above.</p>
<blockquote>
<p>I believe this change isn't all that complicated, and might be interested in making it if the team doesn't have any other plans. Let me know.</p>
</blockquote>
<p>Other than the fundamental flaw noted above :)</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/issues/1727#issuecomment-353765250">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJzGX1CA0grJDBEqFS16qkWuVioaGks5tDddLgaJpZM4RLsks">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ2RKqr8NlH3mbAsfKYMDY83El-yxks5tDddLgaJpZM4RLsks.gif" width="1" /></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/issues/1727#issuecomment-353765250"></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","title":"geany/geany","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"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #1727: \u003e It would be good if Geany could organize its sockets so that more than the first open instance could be communicated with. \r\n\r\nSee --socket-file or -c [here](https://www.geany.org/manual/current/index.html#command-line-options)\r\n\r\n\u003e  Ideally, the most recently focused editor would accept document open commands.\r\n\r\nNeeds some system wide shared global thing that records who was the last Geany to be focussed, but I doubt it will be very useful on systems with \"focus follows mouse\" since it would be too easy to change which Geany that was.\r\n\r\n\u003e What would be cool is if I could type open or edit instead, to open them in the current instance.\r\n\r\nSee above.  You can define your own `open` or `edit` aliases since the terminal has a shell running inside it.  (Note Geany does not see anything that you type in the terminal other than a few shortcut keys, it all goes directly to the shell)\r\n\r\n\u003e We could tackle multiple-instance communication by allowing successive instances to listen on the existing socket, or just having them create sequential new sockets. I prefer the former.\r\n\r\nUnix sockets allow multiple listeners, but only one of them can read a message, so its the one taht wins the race that gets it.  You need a shared server (the \"global thing\" referred to above) that communicates wit all the instances.  IMO this is all becoming too complex just to automate which Geany gets an open request, its better to specify it explicitly as above.\r\n\r\n\u003e I believe this change isn't all that complicated, and might be interested in making it if the team doesn't have any other plans. Let me know.\r\n\r\nOther than the fundamental flaw noted above :)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1727#issuecomment-353765250"}}}</script>