<p></p>
<p dir="auto">Its an important paradigm to grasp, a "file" is a bunch of bytes on a persistent storage medium, but no modern editor/IDE operates on the file, they operate on a memory structure variously called a "buffer", or as in Geany a "document", and will not touch the file except when you load or save the document.  Thus we have a <code>File</code> menu and a <code>Document</code> menu, and <code>Readonly</code> is in the document menu, ie it applies to the document, not the file.</p>
<p dir="auto">If the document has been modified and then is set readonly it can't be changed any more, but it can still be saved to the file, and it is always possible to save-as, even an unmodified readonly document and even to the original file name.  Allowing the overwrite option on the change notification just matches these other file operations.  So any "never write the file" option will have to be respected by all those operations, and there are other operations that save to the file (such as build commands), and the autosave plugin, and any other plugin that can save the document to the file.  So it becomes complicated to actually implement a "never write to the file" option.</p>
<p dir="auto">Note that when you open the file in two windows you have two copies of Geany running (instances in our terminology) and these do not know about each other.  So if one saves to a file which another has in an open document, and therefore is monitoring for modifications, you will be notified.  It seemed to me that an option removing the annoyance of notifications, along with its attendant "overwrite" button, would be relatively simple and remove the immediate risk for your multiple instance use-case.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3142#issuecomment-1082076567">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ6DE7BOVYOUH2KTQYTVCMTTRANCNFSM5R3YOYLQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJZTHVZMPD3SHXYNFWLVCMTTRA5CNFSM5R3YOYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIB7S3FY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3142/c1082076567</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3142#issuecomment-1082076567",
"url": "https://github.com/geany/geany/pull/3142#issuecomment-1082076567",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>