<p>There are 3 tiny things that can be easily implemented in Geany:</p>
<ol>
<li>
<p>Having %f, %d, %e, %p, %l in context command (just as in Compile/Build/Run).</p>
</li>
<li>
<p>Having three context commands (they would be roughly corresponding to the Compile/Build/Run) mapped e.g. to Ctrl+F1,  Ctrl+F2,  Ctrl+F3. Now we have one and only context command.</p>
</li>
<li>
<p>Having possibility to process multiline selection, if context command equal to the naked "%s". Now we can process only one line of selection.</p>
</li>
</ol>
<hr>
<p>I try and show how the context command can be used with all its beauty.</p>
<p>Imagine we have a Python module under testing in Geany. And it is called with parameters. And the parameters are changed from time to time.</p>
<p>Goings to Run command setting every time are tiresome. And dull nuisance when we have this cool CONTEXT COMMAND.</p>
<p>All we need is to make a multiline Python comment in our module (let it be mymodule.py) containing something like:</p>
<pre><code>""" BEGIN OF TEST BLOCK:
 mymodule.py testpar1
 mymodule.py testpar1 testpar2
 mymodule.py testpar1 testpar2 testpar3
 etc.
END OF TEST BLOCK """
</code></pre>
<p>... and to set THE CONTEXT COMMAND equal to<br>
python3 %s</p>
<p>After that we select a line with current test parameters and call the context command from popup menu or with hotkey.</p>
<p>By this we get a batch of self-documented test cases directly inserted in the code!<br>
By this we don't touch RUN settings of other Python modules. It seems to be the main advantage of this.</p>
<p>mymodule.py could be smartly replaced with "%f" if Geany allowed it. It would enable independence of code on renaming, moving to other platform and so on. After all, it's shorter than "my_supposedly_gigantello.py"</p>
<hr>
<p>Now about the issue.</p>
<p>If we key mapped CONTEXT COMMAND to Ctrl+F1 (or even F1, leaving to Geany only menu to call its help), then it works. Sometimes, however, it works not.</p>
<p>For example, select the following<br>
<code>#include</code><br>
and call the context command from popup menu - it will process the "#include" OK.<br>
But Ctrl+F1 ignores our hotkeying it.</p>
<h2>It occurs every time when we selected something more complex than just a word.</h2>
<h2>It is not awfully good if we would try the above example of using CONTEXT COMMAND.</h2>

<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/1807">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJygRbI06MWYHYi-emJYiXjl7dEjUks5tegIjgaJpZM4SrmCE">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ7aQEzLhe8c53A1poTAGLZjoVxP4ks5tegIjgaJpZM4SrmCE.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/issues/1807"></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":"DESCRIPTION","message":"3 propositions and 1 issue (for Geany team). And how use context (for all) (#1807)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1807"}}}</script>