Fork me on GitHub

Hey, as an Emacs / Cider newb, I hoped someone might be able to point me at documentation / explanation of how Cider / Emacs chooses which window to open Cider buffers. It always seems to choose the least appropriate window... For example, I open a fresh Emacs instance, C-3, C-2 to create a 3 window frame, opening a unit test in the first small window, production code below it, and nothing in the large right window. When compiling the test, failures are reported in the below small window rather than the unused large one. How can I configure Cider to always display it's buffers in the right window, or am I not following the Emacs way?


@paulspencerwilliams I don't know/understand the details, but cider calls emacs function display-buffer: If I repeat your steps I indeed get the cider-test-report buffer to be opened in small window (left bottom). Possible workaround is to first split frame vertically into 2 windows, open test buffer on the left, run tests for the first time in this setup -> cider-test-report is opened on the right side. Then split left window horizontally and open production code in the bottom window. Now re-run tests - cider-test-report buffer should be opened in the right window.


@jumar yes, that would work. It appears that generally, opening up the buffer into a window first helps. Difficulty is not knowing how many buffers could be opened. I'll have a dive into your linked code. Cheers!