Hi All,<br><br>I've created this thread separate from Eugene's and Ditmar's session management threads because my concern is mostly about other parts of Geany and I don't want to be seen as criticising either of them as it was their input that started me thinking.<br>

<br>Having multiple Geany instances is a great capability,<br><br>*  I can have two (or more) projects open to share code or to interrupt work on one to do something an another,<br>*  I can have Geany on *both* of my screens so I can see different parts of what I'm working on<br>

*  I can set up my filemanager to open different instances so opening random files won't affect the work I'm doing<br><br>My concern is that we should make sure that the way Geany works is safe and preferably causes no surprises when multiple instances are sharing files.<br>

<br>There are three types of files that Geany instances could share and I think they should be handled differently:<br><br>*  Files being edited (the second of my use cases above).  I don't think it is up to Geany to handle users editing the same file in multiple instances, its up to the user to sort it out when time comes to save.  A user can always set readonly to protect against themselves.  Making --readonly a command line option would be a good addition.<br>

<br>* Project files (same project in two instances), since the user doesn't explicitly control the project file I think Geany is going to have to become involved in this case.  The only options that I can see in this case are:<br>
<br>**  when a project file has changed on disk (by date/time), for Geany to ask if it should save or save as or throw away any changes to project from this instance.  This way an instance won't silently overwrite changes made by another instance, and with save as I can procrastinate by saving this instances changes elsewhere until I can decide which I want.<br>
<br>** only the Geany not started with --new-instance can save the project file<br>
<br>*  Geany.conf (shared by any two or more instances), this is a real potential problem if multiple instances try to save the same file.  Discussions in another thread seemed to come to the conclusion that only the Geany that was started without --new-instance should save it preventing races when several instances are closed at once.  BUT this is not implemented in the SVN that is about to become 0.19 and in my test a new instance overwrote the main Geany.conf losing session, recent files etc!!!<br>
<br>I think that preventing --new-instance from saving project and preference files should be implemented before 0.19 is released otherwise failing to close instances in the right order or missing an instance when logging out will overwrite the preferences.  And configuring a filemanager to use --new-instance will overwrite when closed even if no other Geany is running.<br>
<br>Later on we can look at the other options and also look at indicating to the user which Geany instances can save, maybe by something after the Geany in the title bar?<br><br>Cheers<br>Lex<br>