Jérémie
Jérémie

Reputation: 1373

Prevent emacs from automatically closing a window after completion

This is some variation of a problem already mentioned, but I can't figure out what exactly.

I have my frame split in three windows:

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

When I'm typing the shell, I do "tab" to get completions. They appear in the window on the left. Then emacs doesn't close the buffer, but the entire window, and I'm left with a horizontally split screen:

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

I'm not sure I understand how to stop this from happening, and it's not a problem I remember ever having. My botched attempts managed to get to the state where emacs would not close the completion suggestion buffer at all, but that's not ideal either.

What can I do to have emacs normally close the completion buffer, but leave my window alone?

Upvotes: 5

Views: 1141

Answers (1)

slitvinov
slitvinov

Reputation: 5768

M-x dedicated-mode

;; This minor mode allows you to toggle a window's "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.

Upvotes: 5

Related Questions