In Emacs, how do I change the minibuffer completion list window?
elisp, emacs
Solution
After starting down the path of trying to use `minibuffer-scroll-window` (which turns out to not be user customizable). I tried this approach:
(add-to-list 'special-display-buffer-names '("*Completions*" my-display-completions))
(defun my-display-completions (buf)
"put the *completions* buffer in the right spot"
(let ((windows (delete (minibuffer-window) (window-list))))
(if (eq 1 (length windows))
(progn
(select-window (car windows))
(split-window-vertically)))
(let ((target-window (window-at 0 (- (frame-height) 2)))
(pop-up-windows t))
(set-window-buffer target-window buf)
target-window)))
This works by splitting the sole window in two and displaying `*Completions*` in the bottom window, or, if there are already 2 or more windows shown, using the bottom-left window to show the `*Completions*`.
Problem
I would like to set a specific window for the minibuffer completion list. Currently, I have 3 windows in this configuration: ``` ______ | | | |____| | |____|_| ``` In this case, I'd like to use the bottom left window for the minibuffer completion list. Currently, it seems to a window at random, and most of the time it likes to use the far right window, which is too thin to show the completion list without me having to scroll horizontally, which is irritating. Also, I'm using a lisp script called revive.el to restore my window configuration from a file (~/.revive.el) when I load Emacs.