How to programmatically display a buffer in a window other than the current, similar to the behavior of grep next-errorEmacs. I want this to work in the latest Emacs 24.1. Note that this logic has recently been changed in the Emacs backbone and combined into one function display-bufferwith a rather complex call semantics. It’s hard for me to understand how to use it display-buffereven after you have read the help on this several times. Why is there no wrapper function for this, for example display-buffer-other-window?
other than the current
next-error
display-buffer
display-buffer-other-window
The length of the docstring up display-bufferincludes the following:
ACTION `display-buffer ' -nil , . , . , ACTION - t.
, , :
(display-buffer BUFFER-OR-NAME t)
Emacs
(pop-to-buffer BUFFER 'other-window)
And the shell exists, BTW, it's called switch-to-buffer-other-window.
switch-to-buffer-other-window