Prevent emacs from automatically closing a window after completion

This is some variation of the problem already mentioned, but I can’t understand what exactly.

My frame is divided into three windows:

----------------
|       |      |
|       |------|
|       |shell |
----------------

When I type a shell, I make a “tab” to get the completion. They appear in the window on the left. Then emacs does not close the buffer, but the entire window, and I remain with a horizontally split screen:

----------------
|              |
|--------------|
| shell        |
----------------

I'm not sure I understand how to stop this, and that is not the problem that I remember ever. My unsuccessful attempts managed to get to a state in which emacs does not close the completion offer buffer at all, but this is not ideal either.

What if emacs usually close the completion buffer, but leave my window alone?

+5
source share
1 answer

M-x dedicated mode

;; This minor mode allows you to toggle a window "dedicated" flag.
;; When a window is "dedicated", Emacs will not select files into that
;; window. This can be quite handy since many commands will use
;; another window to show results (e.g., compilation mode, starting
;; info, etc.) A dedicated window won't be used for such a purpose.
;;
;; Dedicated buffers will have "D" shown in the mode line.
+5
source

All Articles