[Github-comments] [geany/geany] Filetype is not redetected on reload, even when current filetype is None (Issue #2996)

elextr notifications at xxxxx
Sat Nov 13 06:58:20 UTC 2021


> Detects filetype based on a shebang line in the file or the filename extension. 

Which was correct until someone decided to add the html/xml stuff and didn't update it.

> Not a good presumption. 
> I did not find this "filetype guarantee" in the manual. 

All projects as old (the oldest release tag in git is 2005 when the project was moved from CVS to SVN but that clearly wasn't the start of the project) as Geany have some undocumented presumptions of how the project works and how things are intended to work.  One of the skills in contributing to open source is to listen and learn those unwritten presumptions.

Unconditionally changing the filetype (if detected) from a reloaded file means a user specified filetype will be overridden, and people do reload for all sorts of things, there is even an automatic reload option used by some for dynamic things like logfiles or program outputs.  An accidental filetype detection on reload would keep changing the user set filetype for those.

If there is an argument for re-running the filetype detection on an open file then a menu item (which can have a keybinding so you can avoid that horrible menu thing :-) should be added to do that.  Do not to connect two separate actions and force users to accept both when they only want one.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2996#issuecomment-967794800
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211112/9cb6a34c/attachment.htm>


More information about the Github-comments mailing list