In my setup, I have several (GNU) Emacs instances running simultaneously on my local machine, one for each project or task that I'm currently working on.
I would like to be able to open buffers in an already running Emacs instance, for example by a command like
$ emacs file.txt
The typically suggested solution to this is to run Emacs in server mode. However, this conflicts with my use of multiple Emacs instances, as I understand that by default only a single emacsclient can be active at any time.
How can I open files as buffers in existing (possibly multiple) Emacs instances? The final goal is to open the file in the Emacs instance that is in the current workspace (Compiz), or to create such an instance if it doesn't already exist.