<p>As for the extra button, I actually thought that it makes sense in the general save dialogue, not only just for the plugin. For example, someone is locking my file. I don't know who it is or how to reach that person, but I need to save my work somehow. In a normal "save" dialogue, the pop up would occur, I would click OK, then go to "File" and "Save As..". If the popup dialogue already has a "Save As" button, it would more convenient to use.</p>

<p>As for my other two suggestions, implementing them would mean that the plugin would not use the normal "save file"-API, but has to implement a modified version. If this is not practical, a poor-man's solution would be, that the plugin would first check, whether file and directory have write permission, and only if they do, invoke the "save file" function. This is not a completely clean solution, because between checking the permissions and actually saving the file, there is a tiny time slot, during which the file might become locked. This should be very rare though.</p>

<p>Even then, it is easy to fix, I think: I guess the plugin is using some API function to save a file. One could extend this API by an additional parameter, which defines what to do in case of error: Show a pop-up, or return an error message to the caller (i.e. the plugin), which then handles the error in its own way.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/815#issuecomment-165026559">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJx1GYRGSoeFyvvd_JtZtcLILnnBHks5pQRFugaJpZM4G04_e.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/815#issuecomment-165026559"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>