* can't close *Completions*
@ 2007-03-04 3:54 Andrew Yates
2007-03-06 4:30 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Yates @ 2007-03-04 3:54 UTC (permalink / raw)
To: help-gnu-emacs
When I use comint-dynamic-complete-filename, the frame is split and a
*Completions* window is opened. At the bottom of *Completions*, it
says "Hit space to flush." Pressing space immediately does close
*Completions*, but if I press any other key before pressing space,
space no longer closes the window. I can close it with kill-buffer or
by switching to that buffer and closing it, but that's inefficient.
Is there a way to make RET close the buffer, just as space does? I'm
using that function for file completion in a terminal, so closing it
with RET makes sense in this case.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: can't close *Completions*
2007-03-04 3:54 can't close *Completions* Andrew Yates
@ 2007-03-06 4:30 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2007-03-06 4:30 UTC (permalink / raw)
To: help-gnu-emacs
Andrew Yates wrote:
> When I use comint-dynamic-complete-filename, the frame is split and a
> *Completions* window is opened. At the bottom of *Completions*, it
> says "Hit space to flush." Pressing space immediately does close
> *Completions*, but if I press any other key before pressing space,
> space no longer closes the window. I can close it with kill-buffer or
> by switching to that buffer and closing it, but that's inefficient.
What about `C-x 1'?
> Is there a way to make RET close the buffer, just as space does? I'm
> using that function for file completion in a terminal, so closing it
> with RET makes sense in this case.
Hmmm, RET is bound to comint-send-input, and SPC is handled by
comint-dynamic-list-completions, neither of which is easily customized.
Here's what I would try:
(defadvice comint-send-input (after undisplay-completions activate)
"If the *Completions* buffer is displayed in the selected frame,
restore the previous window configuration."
(when (and (get-buffer-window "*Completions*")
comint-dynamic-list-completions-config)
(set-window-configuration comint-dynamic-list-completions-config)))
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-06 4:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 3:54 can't close *Completions* Andrew Yates
2007-03-06 4:30 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).