The Geany does not have command line option to force open a "*.geany" file as a text file. This limitation means that it is not possible to use Geany as generic text editor, as editor which can open and edit any text file, specified by command-line.
Indeed but you can open them from the open dialog. So I think you are making a bit of an overreach that Geany can't be a "general text editor".
It is true, but I cannot, for example, bind Geany to F4 key in MidnightCommander (I can bind, but on "*.geany" files F4 will load project instead on start editing file).
Also you normally should not need to edit `.geany` files, almost all changes can be made from the GUI, and if you edit the `.geany` file that Geany is using it will be written over when Geany closes.
Anyhow if someone wants to propose a pull request it can be considered.
I have found real workaround. Firstly, Geany opens "*.geany" file as ordinar files if more than one file specified in command line. Secondly, Geany silently ignores "files with empty name", i. e. empty command line arguments. Thus, to open "some_file.geany" as ordinal text file they can use the following command: `geany "" some_file.geany`
Just to clarify, if the `*.geany` file is not the FIRST non-option argument it will open, not load the project, but if you use the "empty file first" trick consistently it will be ok.
Just BTW Github allows you to close your own issues, but done.
Closed #1658.
Note: invlaid URI (like "workaround://") works much better, than empty string: it works good even when new editor instance delegates files to already running instance.
Ok, I finally got it. The approach with empty argument works well with "-i" option, when you should do not care about processes merging, Without "-i" option it is possible to add ":0" suffix to *.geany file. All workarounds do not cover a case with *.geany argument, representing non-existing file, and '-i' option is not specified. But in my case (using Geany as $EDITOR), I does not have such case.
Ok, now I really finally got it. Always-working workaround: geany some_existing_or_not_existing_file_with_very_strange_name_or_even_dir_name_or_project_name:0:00000
(Trailing zeros count should be enough to result does not match an existing file.)
github-comments@lists.geany.org