* Do not switch focus to the completions buffer window
@ 2014-02-06 9:24 Leo Alekseyev
2014-02-07 3:08 ` Michael Heerdegen
0 siblings, 1 reply; 3+ messages in thread
From: Leo Alekseyev @ 2014-02-06 9:24 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
How would I go about preventing *Completions* buffer window from receiving
focus? I find some value in having it pop-up, but its usability is very
questionable. Using Tomohiro Matsuyama's popwin, it is very easy to
dismiss the buffer with C-g. What I want is for it not to even receive
focus. I tried creating the following piece of advice; the code doesn't
work but it gives you an idea of what I'm after:
(defadvice comint-dynamic-list-filename-completions (around
unfocus-completions-buffer activate)
(let ((cur-win (selected-window)))
ad-do-it
(select-window cur-win)))
Thanks,
--Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Do not switch focus to the completions buffer window
2014-02-06 9:24 Do not switch focus to the completions buffer window Leo Alekseyev
@ 2014-02-07 3:08 ` Michael Heerdegen
2014-02-07 3:44 ` Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2014-02-07 3:08 UTC (permalink / raw)
To: help-gnu-emacs
Hi Leo,
> Hi all,
> How would I go about preventing *Completions* buffer window from receiving
> focus? I find some value in having it pop-up, but its usability is very
> questionable. Using Tomohiro Matsuyama's popwin, it is very easy to
> dismiss the buffer with C-g. What I want is for it not to even receive
> focus. I tried creating the following piece of advice; the code doesn't
> work but it gives you an idea of what I'm after:
>
> (defadvice comint-dynamic-list-filename-completions (around
> unfocus-completions-buffer activate)
> (let ((cur-win (selected-window)))
> ad-do-it
> (select-window cur-win)))
The *Completions* window is never selected for me. I tested with Emacs
23 and Emacs 24. Even better, with the latest Emacs release, the
*Completions* pop up window is even automatically closed after
successful completion.
So I think what you see is caused by your setup, or you use a really old
Emacs version. Or please give a recipe of what you see starting from
emacs -Q.
Regards,
Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Do not switch focus to the completions buffer window
2014-02-07 3:08 ` Michael Heerdegen
@ 2014-02-07 3:44 ` Drew Adams
0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2014-02-07 3:44 UTC (permalink / raw)
To: Michael Heerdegen, help-gnu-emacs
> The *Completions* window is never selected for me. I tested with
> Emacs 23 and Emacs 24. Even better, with the latest Emacs release,
> the *Completions* pop up window is even automatically closed after
> successful completion.
>
> So I think what you see is caused by your setup, or you use a really
> old Emacs version. Or please give a recipe of what you see starting
> from emacs -Q.
Perhaps Leo is doing something like this?
emacs -Q
(setq pop-up-frames t)
M-x for TAB
That's enough, on MS Windows at least, to repro the problem.
When MS Windows creates a new frame, it gives it the input
focus. Anything you type after the TAB above will be sent
to *Completions*.
This has been a limitation of Emacs since forever, and a
limitation that I, for one, jump through some hoops to
workaround. (And it was a problem solved by the Epoch
version of Emacs 20 years ago.)
Dunno whether this is in fact related to Leo's actual problem.
But it is one possible scenario that leads to the problem
Leo described.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-07 3:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 9:24 Do not switch focus to the completions buffer window Leo Alekseyev
2014-02-07 3:08 ` Michael Heerdegen
2014-02-07 3:44 ` 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.