When the geanypg plugin is installed, I would like to be able to open encrypted .gpg files. Currently, when I try to open such a file, the message is `The file ".../somefile.xml.gpg" does not look like a text file or the file encoding is not supported.`.
Geany cannot open binary files. What is file saying about the file?
I understand that. The idea is that Geany would recognize a gpg-encoded file and decode it on the fly (after asking for the key/password) using the geanypg plugin functionality (as far as the resulting decoded file is a text file itself, of course). I don't know the Geany code infrastructure and if such a functionality would be implementable through a plugin.
I don't know the Geany code infrastructure and if such a functionality would be implementable through a plugin.
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.
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.
Feel free to close the issue if you think the idea not feasible. An alternative would be to consider this a potential core functionality of geany.
One of the reasons that GPG functionality is in a plugin is that the majority of Geany users do not need it, but having it compiled into the Geany core would add a requirement for GPG anywhere Geany is used for all users. So its unlikely that it would be added to Geany core.
github-comments@lists.geany.org