In a 2 window setup, is there a way to make all temporary popup buffers (help, compile, occur, etc) always open in a specific window?

For example, I have a left and right window. I do most of my work in the left window. When I lookup something in help it opens in the right window which is what I want.

But let’s say I’m in the right window already and look up help, it will open in the left window. Is there a way to make it always open in the right?

  • TibbledigginsOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Thank you all for tips. My elisp skills are pretty poor so I’m having trouble figuring out how to make this work, even copying examples online. For example:

    (add-to-list 'display-buffer-alist '("*help*"
                                         (display-buffer-reuse-window)
                                         (display-buffer-in-side-window . ((side . right)
                                                                           (window-width . 0.5)))))
    
    (add-to-list 'display-buffer-alist '("*info*"
                                         (display-buffer-reuse-window)
                                         (display-buffer-in-side-window . ((side . right)
                                                                           (window-width . 0.5)))))
    

    With that in my init.el, if I open emacs and look up “help” it creates a new window on the right, which is the default behavior so I can’t say for sure if the code is doing anything. If I select a link in the help file (like the manual) that opens “info” it opens it back in the left window.

    What am I doing wrong here?