all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Dismissing a completion buffer?
@ 2009-01-12 18:13 WalterGR
  2009-01-12 23:09 ` Peter Dyballa
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: WalterGR @ 2009-01-12 18:13 UTC (permalink / raw
  To: help-gnu-emacs

When a completion buffer pops up, e.g. M-x o, enter something, hit
tab... how do I dismiss that buffer?  Ctrl-g (cancel) seems to have no
effect; Ctrl-x k doesn't do the right thing; and hitting Esc doesn't
have the desired effect.

This:

http://www.dr-qubit.org/predictive/user-guide/html/Pop_002dUp-Frame.html

mentions completion-popup-frame-dismiss and some key bindings.  The
key bindings don't seems to work on my installation.

Thanks,

Walter


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Dismissing a completion buffer?
  2009-01-12 18:13 Dismissing a completion buffer? WalterGR
@ 2009-01-12 23:09 ` Peter Dyballa
       [not found] ` <mailman.4689.1231801752.26697.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-01-12 23:09 UTC (permalink / raw
  To: WalterGR; +Cc: help-gnu-emacs


Am 12.01.2009 um 19:13 schrieb WalterGR:

> When a completion buffer pops up, e.g. M-x o, enter something, hit
> tab... how do I dismiss that buffer?


Pick an item, or add something to the incomplete string, or press SPC.

--
Greetings

   Pete

They that can give up essential liberty to obtain a little temporary  
safety deserve neither liberty nor safety.
		-Benjamin Franklin, Historical Review of Pennsylvania.







^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Dismissing a completion buffer?
       [not found] ` <mailman.4689.1231801752.26697.help-gnu-emacs@gnu.org>
@ 2009-01-13  8:03   ` WalterGR
  2009-01-13 16:01     ` Peter Dyballa
  0 siblings, 1 reply; 7+ messages in thread
From: WalterGR @ 2009-01-13  8:03 UTC (permalink / raw
  To: help-gnu-emacs

On Jan 12, 3:09 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 12.01.2009 um 19:13 schrieb WalterGR:
>
> > When a completion buffer pops up, e.g. M-x o, enter something, hit
> > tab... how do I dismiss that buffer?
>
> Pick an item, or add something to the incomplete string, or press SPC.

Clarification: I want to dismiss it without choosing anything.  And
this is GNU Emacs 22.2.1 ("2008-09-05 on vernadsky, modified by
Ubuntu").

For the file open completion list, neither adding something to the
string nor pressing SPC dismiss it.  Is there another way to do it?

For the symbol completion list (at least when using SLIME for Lisp,)
adding something to the string doesn't dismiss it, but SPC does.  Is
there a way to make all completion lists dismiss in the same way?

Thanks,

Walter


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Dismissing a completion buffer?
  2009-01-13  8:03   ` WalterGR
@ 2009-01-13 16:01     ` Peter Dyballa
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-01-13 16:01 UTC (permalink / raw
  To: WalterGR; +Cc: help-gnu-emacs


Am 13.01.2009 um 09:03 schrieb WalterGR:

> For the file open completion list, neither adding something to the
> string nor pressing SPC dismiss it.  Is there another way to do it?


If it exists, and it does exist, then it's documented. (I am  
meanwhile in GNU Emacs 22.3 and 23.0.60.)

--
Mit friedvollen Grüßen

   Pete

Nazionalismus ist die Religion der armen Schweine






^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Dismissing a completion buffer?
  2009-01-12 18:13 Dismissing a completion buffer? WalterGR
  2009-01-12 23:09 ` Peter Dyballa
       [not found] ` <mailman.4689.1231801752.26697.help-gnu-emacs@gnu.org>
@ 2009-01-13 16:43 ` Drew Adams
       [not found] ` <mailman.4776.1231865048.26697.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2009-01-13 16:43 UTC (permalink / raw
  To: 'WalterGR', help-gnu-emacs

> When a completion buffer pops up, e.g. M-x o, enter something, hit
> tab... how do I dismiss that buffer?  Ctrl-g (cancel) seems to have no
> effect; Ctrl-x k doesn't do the right thing; and hitting Esc doesn't
> have the desired effect.

I assume that you have `pop-up-frames' = t or something similar - something that
causes buffer *Completions* to appear in its own frame.

In vanilla Emacs, `C-g' does nothing to remove this frame, as you say.
Icicles does not have this problem:
http://www.emacswiki.org/cgi-bin/wiki/Icicles

In Icicles, if *Completions* is displayed in its own frame (sole window), and
that frame has no minibuffer or has only an inactive minibuffer, then the frame
is deleted when you use `C-g' (or when you choose a completion candidate).

> http://www.dr-qubit.org/predictive/user-guide/html/Pop_002dUp-Frame.html
> mentions completion-popup-frame-dismiss and some key bindings.  The
> key bindings don't seems to work on my installation.

Perhaps Toby Cubitt (author of Predictive) can help with that.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Dismissing a completion buffer?
       [not found] ` <mailman.4776.1231865048.26697.help-gnu-emacs@gnu.org>
@ 2009-01-13 16:55   ` WalterGR
  2009-01-13 20:28     ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: WalterGR @ 2009-01-13 16:55 UTC (permalink / raw
  To: help-gnu-emacs

On Jan 13, 8:43 am, "Drew Adams" <drew.ad...@oracle.com> wrote:
> > When a completion buffer pops up, e.g. M-x o, enter something, hit
> > tab... how do I dismiss that buffer?  Ctrl-g (cancel) seems to have no
> > effect; Ctrl-x k doesn't do the right thing; and hitting Esc doesn't
> > have the desired effect.
>
> I assume that you have `pop-up-frames' = t or something similar - something that
> causes buffer *Completions* to appear in its own frame.

Right.

> In vanilla Emacs, `C-g' does nothing to remove this frame, as you say.
> Icicles does not have this problem:http://www.emacswiki.org/cgi-bin/wiki/Icicles

(I'm fairly new to Emacs and still hazy on the interaction between
pieces and parts...)

The completion buffer I'm concerned about is created while using SLIME
to edit Lisp code / interact with a Lisp REPL.  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...)

> >http://www.dr-qubit.org/predictive/user-guide/html/Pop_002dUp-Frame.html
> > mentions completion-popup-frame-dismiss and some key bindings.  The
> > key bindings don't seems to work on my installation.
>
> Perhaps Toby Cubitt (author of Predictive) can help with that.

I just realized those were the docs for some specific thing called
"Predictive," not Emacs predictive completion in general.  So they're
not relevant for what I'm trying to do.

Thanks,

Walter


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Dismissing a completion buffer?
  2009-01-13 16:55   ` WalterGR
@ 2009-01-13 20:28     ` Drew Adams
  0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2009-01-13 20:28 UTC (permalink / raw
  To: 'WalterGR', help-gnu-emacs

> > > When a completion buffer pops up, e.g. M-x o, enter something, hit
> > > tab... how do I dismiss that buffer?  Ctrl-g (cancel) 
> > > 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, 
> > as you say. Icicles does not have this problem:
> > http://www.emacswiki.org/cgi-bin/wiki/Icicles
> 
> (I'm fairly new to Emacs and still hazy on the interaction between
> pieces and parts...)
> 
> 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_Modes
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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-13 20:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 18:13 Dismissing a completion buffer? WalterGR
2009-01-12 23:09 ` Peter Dyballa
     [not found] ` <mailman.4689.1231801752.26697.help-gnu-emacs@gnu.org>
2009-01-13  8:03   ` WalterGR
2009-01-13 16:01     ` Peter Dyballa
2009-01-13 16:43 ` Drew Adams
     [not found] ` <mailman.4776.1231865048.26697.help-gnu-emacs@gnu.org>
2009-01-13 16:55   ` WalterGR
2009-01-13 20:28     ` Drew Adams

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.