From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: how to remove buffers created during command completion from an emacs shell Date: Tue, 13 Nov 2012 21:48:54 +0100 Organization: GNU's Not UNIX! Message-ID: <201211132048.qADKmsRh000829@kcals.intra.maillard.im> References: <81e50116-0cc7-4f9f-a460-db61568360d4@googlegroups.com> Reply-To: Xavier Maillard NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1352839742 23815 80.91.229.3 (13 Nov 2012 20:49:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2012 20:49:02 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: bharmaji Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 13 21:49:13 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TYNPx-0005sE-P6 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2012 21:49:09 +0100 Original-Received: from localhost ([::1]:53677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYNPo-0000Z5-6K for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2012 15:49:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYNPg-0000WS-Gu for help-gnu-emacs@gnu.org; Tue, 13 Nov 2012 15:48:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYNPd-0005vQ-EC for help-gnu-emacs@gnu.org; Tue, 13 Nov 2012 15:48:52 -0500 Original-Received: from cha51-3-88-164-105-66.fbx.proxad.net ([88.164.105.66]:60249 helo=maillard.im) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYNPd-0005sc-65 for help-gnu-emacs@gnu.org; Tue, 13 Nov 2012 15:48:49 -0500 Original-Received: from kcals.intra.maillard.im (cha51-3-88-164-105-66.fbx.proxad.net [88.164.105.66]) (Authenticated sender: xavier) by maillard.im (Postfix) with ESMTPSA id B3C3A194C085; Tue, 13 Nov 2012 21:48:46 +0100 (CET) Original-Received: from kcals.intra.maillard.im (kcals.intra.maillard.im [127.0.0.1]) by kcals.intra.maillard.im (8.14.5/8.14.5) with ESMTP id qADKmtcn000831; Tue, 13 Nov 2012 21:48:55 +0100 Original-Received: (from xavier@localhost) by kcals.intra.maillard.im (8.14.5/8.14.5/Submit) id qADKmsRh000829; Tue, 13 Nov 2012 21:48:54 +0100 X-Authentication-Warning: kcals.intra.maillard.im: xavier set sender to xavier@maillard.im using -f In-reply-to: <81e50116-0cc7-4f9f-a460-db61568360d4@googlegroups.com> (message from bharmaji on Mon, 12 Nov 2012 22:53:15 -0800 (PST)) User-Agent: Rmail/24.2.1 Emacs/24.2.1 (i486-slackware-linux-gnu) Jabber-ID: xavier@maillard.im X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 88.164.105.66 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87676 Archived-At: 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