Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent emacs from automatically closing a window after completion

Tags:

emacs

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?

like image 848
Jérémie Avatar asked Jul 28 '12 22:07

Jérémie


1 Answers

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.
like image 98
slitvinov Avatar answered Oct 12 '22 10:10

slitvinov