<p>From <a href="https://github.com/geany/geany/issues/1959" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/1959/hovercard">Geany #1959</a>:</p>
<p>I think it's not Geany’s task: adding this additional functionality to the plugin is more logical. And we can use existing plugins, in this case we have all power of Lua or Python (GeanyLua, GeanyPy, Peasy).<br>
"Open selected file" (Ctrl+Shift+O) is a function <code>src/document.c:on_menu_open_selected_file1_activate()</code>, I wrote a Lua script <a href="https://pastebin.com/JuvRhRRu" rel="nofollow">https://pastebin.com/JuvRhRRu</a> (last version), but it's too big :)</p>
<p>Well, I decided that it is logical to hang this task on the plugin, entirely: <a href="https://pastebin.com/TiL8wMeH" rel="nofollow">https://pastebin.com/TiL8wMeH</a> But one problem: function <code>src/utils.c:utils_tidy_path()</code> is not available for plugins. Yes, I can just copy this function to plugin, but it's somehow stupid, I think that function <code>utils_tidy_path()</code> can be to add to list of functions when available for plugins. Or maybe not (bump ABI and other) :)</p>
<p>Function like as <code>glspi_selfile()</code> would be useful in other non-specific (i.e. for general purpose) plugins too - GeanyPy, Peasy. Or maybe writing Lua- or Python-script as a separate module is the best solution. I don't know now.</p>
<p>Any opinions? Ideas?</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/issues/786">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ3a-l4tAEUg-1f6TF8fz58RUNK0jks5upBelgaJpZM4X9T_o">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ6ypeRoW3iGrTPQXp8p_n_maFxDdks5upBelgaJpZM4X9T_o.gif" height="1" width="1" alt="" /></p>
<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://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"GeanyLua: get selected filename (#786)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/786"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/issues/786",
"url": "https://github.com/geany/geany-plugins/issues/786",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "GeanyLua: get selected filename (#786)",
"sections": [
{
"text": "",
"activityTitle": "**Skif-off**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@Skif-off",
"facts": [
{
"name": "Repository: ",
"value": "geany/geany-plugins"
},
{
"name": "Issue #: ",
"value": 786
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 786,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 786\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/issues/786"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 401948648\n}"
}
],
"themeColor": "26292E"
}
]</script>