Function: projectile--displaying-in-other-window
projectile--displaying-in-other-window is a macro defined in
projectile.el.
Signature
(projectile--displaying-in-other-window OTHER-WINDOW &rest BODY)
Documentation
Run BODY, popping whatever buffer it displays elsewhere when OTHER-WINDOW.
The built-in shells (shell, eshell, ielm) display their buffer
themselves and have no -other-window flavour to call, the way vterm
and eat do. They all go through display-buffer though, and
display-buffer-overriding-action outranks the action they pass, so
binding it around the call is what redirects them.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260930.434/projectile.el
;;; Shells, REPLs and terminals
;;
;; `projectile-run' launches a shell, REPL or terminal in the project root
;; using a pluggable backend (built on the generic registry defined for
;; `projectile-search'). Register your own with
;; `projectile-register-shell-backend'.
;;;; Engines for the built-in shells (always available)
(defmacro projectile--displaying-in-other-window (other-window &rest body)
"Run BODY, popping whatever buffer it displays elsewhere when OTHER-WINDOW.
The built-in shells (`shell', `eshell', `ielm') display their buffer
themselves and have no `-other-window' flavour to call, the way `vterm'
and `eat' do. They all go through `display-buffer' though, and
`display-buffer-overriding-action' outranks the action they pass, so
binding it around the call is what redirects them."
(declare (indent 1) (debug t))
`(let ((display-buffer-overriding-action
(when ,other-window
'((display-buffer-pop-up-window) (inhibit-same-window . t)))))
,@body))