pluma, and I believe gedit also, does not start a new instance, if it is running already, but instead opens the file with the existing instance. The call then returns immediately. Normally this is desired behaviour. But sometimes the immediate return is a problem when the editor is called from a script or program, which relies on the file having been edited before the call is returned (e.g.
git commit or
Is there a way to either start a new instance of pluma or otherwise force a call to pluma (when one instance is already open) to not return immediately but only after the file in question has been closed in the editor.