I like to use emacsclient to open new emacs frames on different virtual desktops. This works great except that its a pain when emacs decides to switch frames if I am switching to a buffer that is already open in a frame other than that has the focus. Is there a way to disable this frame reuse?
2
votes
1 Answers
1
votes
You need to customize the behaviour of display-buffer (This is the function called by switch-to-buffer and friends). The second optional argument FRAME needs to be set to nil so that the function will only consider the current frame when looking for already open buffers. Also make sure to have display-buffer-reuse-frames set to nil (It's the default).
Check the built-in documentation: C-h f display-buffer RET
Unfortunately, display-buffer is often not called directly. Probably remapping switch-to-buffer to your custom switch-to-buffer will be the best course of action.