To be very clear, Geany keeping the filetype fixed after opening, or first save of a new file, is a feature not a fault.

The presumption is that the majority of files recognise their filetype correctly either because of the shebang, or the XML marker, or an extracted filetype, or the extension, or the user has deliberately set the filetype to something different. This is why you have to close the file to forget the filetype, closing Geany or the project with the file still open will remember the current filetype when the session is reloaded.

If a file is not detected correctly I totally agree the user needs to edit the file (or change the extension), but that is likely to be rare and breaking the filetype guarantee on reload is not an acceptable tradeoff for the few times the workaround of "close&save, reload last" is needed.

Its not clear you understand that "shebang" is a well known term, not just a function in Geany. In case you havn't encountered it outside the name of the find_shebang() function in Geany, see here.

So using "shebang" for all the ways Geany detects a filetype was therefore confusing, its only one of them. A better term for the whole gamut of methods is "internal filetype detection" (even if filetypes_detect_from_file_internal() also checks the extension, sigh).

I think I returned the confusion by using the term "filetype regex" to mean "the filetype extracted by the regex", so (assuming the default regex) I was meaning for example the user should edit the comment in the file to say "--Python--" if their shebang is #!pypy, not that they should edit the regex, sorry for the confusion.

Alt+R does nothing on my computer.

Ahh sorry thats a keybinding I set myself for the "Re-open last closed tab" action. You can bind it yourself, then it will allow you to avoid the ... menu!!! (gasps of horror).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.