I have a multi-monitor setup, in which a specific monitor has a dedicated Emacs frame in full screen which shows compiler errors (from Compilation Mode or SBT Mode). I'd like to preserve the setup automatically, even if I click on an error location in that frame. Specifically, if the dedicated “error” frame is selected,
display-buffer should show an buffer in the “main frame” where I do my editing.
The “main frame” is the one on my primary monitor, which stands in the center of my desk. It's also the “official” primary monitor as per global display settings in the OS X system configuration.
To make sure that buffers are shown at the right place, I need to find out whether a certain frame is on the primary display or not. Is that possible, and if so, how?
A platform independent approach would be great, but if that is not possible, a solution for OS X is also fine.