<p>It is intended that saving a file under a different name does not change the filetype.  Filetypes are only automatically detected when a file is first opened, and after that it is not changed by Geany since a user can set it from the <code>Document</code> menu.</p>
<p>Example use-cases are scripts embedded in HTML and the user selects the filetype to be the script language so its highlighted and parsed, even though the filename is still <code>.html</code>, or cases where Geany detects the filetype wrongly and the user sets it.  It would be annoying if the filetype kept changing.</p>
<p>It might be possible to have an option in the Save As dialog, but clicking that is not much of a saving from <code>Document->Set Filetype->select type</code> before or after saving.</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/issues/2124#issuecomment-483068708">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJzXJ4wfFSXsLbm_ZeQ2hmKnHlXPbks5vg7zIgaJpZM4cu6CM">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ-XX_sT00pfsz9RjVtH1x4HpEh7sks5vg7zIgaJpZM4cu6CM.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","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #2124: It is intended that saving a file under a different name does not change the filetype.  Filetypes are only automatically detected when a file is first opened, and after that it is not changed by Geany since a user can set it from the `Document` menu. \r\n\r\nExample use-cases are scripts embedded in HTML and the user selects the filetype to be the script language so its highlighted and parsed, even though the filename is still `.html`, or cases where Geany detects the filetype wrongly and the user sets it.  It would be annoying if the filetype kept changing.\r\n\r\nIt might be possible to have an option in the Save As dialog, but clicking that is not much of a saving from `Document-\u003eSet Filetype-\u003eselect type` before or after saving."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/2124#issuecomment-483068708"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2124#issuecomment-483068708",
"url": "https://github.com/geany/geany/issues/2124#issuecomment-483068708",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>