I work with different Emacs frames on the same desktop. When I run
compile Emacs splits the current frame and creates a clone of the buffer
*compilation*, although the compilation buffer is already visible, but just in another frame. After that I see the same compilation buffer in both frames. I am wondering, why this is the default, because it does not seem to make any sense.
The following video shows this: https://youtu.be/hvziEkfmb_c
I have read that
display-buffer-alist is the right place to customize this feature, but I do not understand the condition and action arguments.
I would like to give each frame a meaning: for example compile frame and edit frame. When I run
compile from the edit frame, Emacs should use the compile frame for the compilation buffer. And when I click on a source line in the compilation buffer in the compile frame, it should use the edit frame to show either the buffer of the already opened file or it should use the edit frame to open the new file.
I general Emacs should never split a frame for a buffer, which is already visible in another frame.
I not sure how this logic fits into the