I use a monitor and a laptop screen as my multimonitor setup.
Unfortunately the monitor and the laptop differs in resolution. So I use 2 frames, one frame on the monitor and one frame on the laptop screen.
Both frames are connected to one Emacs instance.
I will call the frame that's opened on monitor as
frame 1 on the monitor, I have a buffer opened with the default SQL-mode that's shipped with Emacs.
On the laptop screen, there is a SQL-process being displayed in the Emacs
frame 1, in the buffer with SQL-mode, I call M-x
sql-send-region to send a SQL-statement to the SQL-process.
I see the result on the laptop screen in
frame 2. But in the meanwhile, the SQL-mode propably have detected there is no window in the Emacs
frame 1, so Emacs opens a new window with the same buffer of the SQL-process.
As the result, there are two windows on two screens, viewing the same buffer (the SQL-process).
I would prevent that the SQL-mode opens a new window when sending a SQL-statement to the SQL-process. How could I 'tell' Emacs to prevent that?
EDIT as answered below, this question is solved by now. See the second option from the user