<blockquote>
<p>I don't know the Geany code infrastructure and if such a functionality would be implementable through a plugin.</p>
</blockquote>
<p>Unfortunately there is currently no method for a plugin to intervene in the file open process.  Open is a fairly complex process and there are many places where a plugin could be called for various things, and you would have to get just the right one for this use-case.</p>
<p>The best that could be done at the moment is for the GPG plugin to have a separate open menu/button/shortcut which saves an unencrypted temporary file and calls Geany to open that and after Geany closes and writes that re-encrypts and deletes the temporary file.</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/780#issuecomment-428748233">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_-MLkRVVqCwxmJ1FUZPeBElYOXpks5ujm2ogaJpZM4XNmam">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ_eYTr0R2M1yKmb_daLMtgwjBYkRks5ujm2ogaJpZM4XNmam.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":"PERSON","message":"@elextr in #780: \u003e I don't know the Geany code infrastructure and if such a functionality would be implementable through a plugin.\r\n\r\nUnfortunately there is currently no method for a plugin to intervene in the file open process.  Open is a fairly complex process and there are many places where a plugin could be called for various things, and you would have to get just the right one for this use-case.\r\n\r\nThe best that could be done at the moment is for the GPG plugin to have a separate open menu/button/shortcut which saves an unencrypted temporary file and calls Geany to open that and after Geany closes and writes that re-encrypts and deletes the temporary file."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/780#issuecomment-428748233"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/issues/780#issuecomment-428748233",
"url": "https://github.com/geany/geany-plugins/issues/780#issuecomment-428748233",
"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": "Re: [geany/geany-plugins] Allow opening gpg encrypted file (#780)",
"sections": [
{
"text": "",
"activityTitle": "**elextr**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@elextr",
"facts": [

]
}
],
"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\": 780,\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\": 780\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/issues/780#issuecomment-428748233"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 389441190\n}"
}
],
"themeColor": "26292E"
}
]</script>