[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to remove buffers created during command completion from an emac
From: |
Xavier Maillard |
Subject: |
Re: how to remove buffers created during command completion from an emacs shell |
Date: |
Tue, 13 Nov 2012 21:48:54 +0100 |
User-agent: |
Rmail/24.2.1 Emacs/24.2.1 (i486-slackware-linux-gnu) |
Hi,
> Can someone please help with the following problem. I do M-x
> shell to enter a shell. Then if I type a command and press TAB,
> a buffer is created for command completion. Now if I do not
> click on an entry in that buffer, the buffer continues to stay
> there. I have to do C-x 0 to get it removed. Is there a way for
> it to automatically get removed if I fill the command myself
> and press ENTER or is there a way for me to select an entry
> without using a mouse?
Here is how you can circumvent that simply:
;; Reduce open buffer list: first the completion buffer
(add-hook 'minibuffer-exit-hook
'(lambda ()
(let ((buffer "*Completions*"))
(and (get-buffer buffer)
(kill-buffer buffer)
(message "Killing buffer %s" buffer)))))
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org