Display buffer in another window in recent Emacs

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?

+5
source share
3 answers

The length of the docstring up display-bufferincludes the following:

ACTION `display-buffer ' -nil , . , . , ACTION - t.

, , :

(display-buffer BUFFER-OR-NAME t)
+4

Emacs

(pop-to-buffer BUFFER 'other-window)
+2

And the shell exists, BTW, it's called switch-to-buffer-other-window.

+2
source

All Articles