From: Xavier Maillard <xavier@maillard.im>
To: bharmaji <bharmaji@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to remove buffers created during command completion from an emacs shell
Date: Tue, 13 Nov 2012 21:48:54 +0100 [thread overview]
Message-ID: <201211132048.qADKmsRh000829@kcals.intra.maillard.im> (raw)
In-Reply-To: <81e50116-0cc7-4f9f-a460-db61568360d4@googlegroups.com> (message from bharmaji on Mon, 12 Nov 2012 22:53:15 -0800 (PST))
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
next prev parent reply other threads:[~2012-11-13 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 6:53 how to remove buffers created during command completion from an emacs shell bharmaji
2012-11-13 9:44 ` Peter Dyballa
2012-11-13 20:48 ` Xavier Maillard [this message]
2012-11-14 16:23 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201211132048.qADKmsRh000829@kcals.intra.maillard.im \
--to=xavier@maillard.im \
--cc=bharmaji@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.