From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Dismissing a completion buffer? Date: Tue, 13 Jan 2009 12:28:32 -0800 Message-ID: <001d01c975bd$8259c600$0200a8c0@us.oracle.com> References: <4eb174fb-89f2-43ee-8446-6e20f9e66087@b38g2000prf.googlegroups.com> <238c8ae2-ce48-40b8-ac58-4435c5dbb2c8@p36g2000prp.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1231878647 1181 80.91.229.12 (13 Jan 2009 20:30:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2009 20:30:47 +0000 (UTC) To: "'WalterGR'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 13 21:31:59 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LMpvM-0001qo-Jz for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2009 21:31:45 +0100 Original-Received: from localhost ([127.0.0.1]:45972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMpu6-0001t5-2F for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2009 15:30:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMpsM-0000GU-VQ for help-gnu-emacs@gnu.org; Tue, 13 Jan 2009 15:28:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMpsL-0000Eu-V1 for help-gnu-emacs@gnu.org; Tue, 13 Jan 2009 15:28:38 -0500 Original-Received: from [199.232.76.173] (port=45236 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMpsL-0000E7-9B for help-gnu-emacs@gnu.org; Tue, 13 Jan 2009 15:28:37 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:34317 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LMpsK-0001VS-Rv for help-gnu-emacs@gnu.org; Tue, 13 Jan 2009 15:28:37 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n0DKSC0Y004318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 13 Jan 2009 20:28:13 GMT Original-Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n0DKTAQU003793; Tue, 13 Jan 2009 20:29:11 GMT Original-Received: from dradamslap1 (/141.144.161.46) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 Jan 2009 20:28:29 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <238c8ae2-ce48-40b8-ac58-4435c5dbb2c8@p36g2000prp.googlegroups.com> Thread-Index: Acl1tEijlVR15HzFQ+6aIUjvXKEgXwAAupCw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt706.oracle.com [141.146.40.84] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010208.496CF96F.00AE:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61309 Archived-At: > > > When a completion buffer pops up, e.g. M-x o, enter something, hit > > > tab... how do I dismiss that buffer? =A0Ctrl-g (cancel)=20 > > > seems to have no effect; Ctrl-x k doesn't do the right thing; and > > > hitting Esc doesn't have the desired effect. > > > In vanilla Emacs, `C-g' does nothing to remove this frame,=20 > > as you say. Icicles does not have this problem: > > http://www.emacswiki.org/cgi-bin/wiki/Icicles >=20 > (I'm fairly new to Emacs and still hazy on the interaction between > pieces and parts...) >=20 > The completion buffer I'm concerned about is created while using SLIME > to edit Lisp code / interact with a Lisp REPL. I don't use SLIME, so I can't speak directly to that. > Is my understanding correct that Icicles works with any completion > buffer? (My assumption here is that buffers named "*Completions*" > are some specific Emacs "thing" that code can interact with, which > obviously may be incorrect...) Icicles always uses buffer *Completions* for its completion. Any = Emacs-Lisp code that calls `completing-read' or `read-file-name' will, in Icicle mode, automatically take advantage of Icicles completion enhancements. In addition, some other existing Emacs-Lisp code can also take advantage = of Icicles - for example, Emacs-Lisp symbol completion, dabbrev completion, = BBDB completion, ESS completion, GUD completion, IELM completion, and = shell-mode completion generally: http://www.emacswiki.org/emacs/Icicles_-_Completion_in_Other_Buffers Yes, it is possible for some Emacs-Lisp code to display completions in a = buffer other than *Completions*. If it uses function `display-completion-list', = then it can provide any name it wants for the completion-candidates buffer. Even if some Emacs-Lisp code does use the name "*Completions*" when it = calls `display-completion-list', if it does not also use the minibuffer for = completion (e.g. by calling `completing-read') then Icicles will not kick in - = except for a certain number of special cases (see above for examples) where Icicle = mode enhances the vanilla non-minibuffer completion. For your specific question regarding SLIME mode completion, I don't know = whether it uses the minibuffer for completion. If it does not, then Icicles = completion will not automatically kick in - there is currently no SLIME = mode-specific enhancement by Icicles. (It could no doubt be added, just as it was = added for the kinds of non-minibuffer completion mentioned above.) It's easy to download Icicles and try it, to see if it helps with = SLIME-mode completion: http://www.emacswiki.org/emacs/Icicles_-_Libraries If it does not, then let me know the specifics off-list, and I'll look = into the possibility of adding some SLIME-mode support. Or you could add that support yourself, using this as a guideline: http://www.emacswiki.org/emacs/Icicles_-_Defining_Completion_for_Comint_M= odes That is, if SLIME uses Comint mode ("a general-purpose mode for communicating with interactive subprocesses" - Emacs manual), then = adding support for it is pretty simple. If SLIME does not derive from Comint mode, but SLIME completion is = similar to, say, Emacs-Lisp symbol completion, then you can use `icicle-lisp-complete-symbol' as a guideline. It is a simple enhancement = to the vanilla `lisp-complete-symbol': it just uses minibuffer completion = whenever there are multiple completion candidates. In short, whenever the minibuffer is used for completion, Icicles kicks = in. If you have a function that completes buffer text without using the = minibuffer, then you can change it to call `completing-read' whenever there are = multiple completions. In that way, it will use the minibuffer for such a choice, = and Icicles will kick in. HTH.