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?
I like to use emacsclient to open new emacs frames on different virtual desktops.
Share
You need to customize the behaviour of
display-buffer(This is the function called byswitch-to-bufferand friends). The second optional argumentFRAMEneeds to be set tonilso that the function will only consider the current frame when looking for already open buffers. Also make sure to havedisplay-buffer-reuse-framesset tonil(It’s the default).Check the built-in documentation:
C-h f display-buffer RETUnfortunately,
display-bufferis often not called directly. Probably remappingswitch-to-bufferto your customswitch-to-bufferwill be the best course of action.