From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Do not switch focus to the completions buffer window Date: Fri, 07 Feb 2014 04:08:52 +0100 Message-ID: <87r47fpqkb.fsf@web.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391742570 12593 80.91.229.3 (7 Feb 2014 03:09:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2014 03:09:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 07 04:09:37 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WBbou-0003g2-Vx for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Feb 2014 04:09:37 +0100 Original-Received: from localhost ([::1]:39421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBbou-0004sn-I4 for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 22:09:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBboY-0004lI-AX for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 22:09:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBboR-0008GD-1Q for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 22:09:14 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBboQ-0008G4-RY for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 22:09:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WBboP-0003Fd-Dr for help-gnu-emacs@gnu.org; Fri, 07 Feb 2014 04:09:05 +0100 Original-Received: from ip-90-187-159-185.web.vodafone.de ([90.187.159.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 04:09:05 +0100 Original-Received: from michael_heerdegen by ip-90-187-159-185.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 04:09:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-187-159-185.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:GJWR/UoMmtrBY45iHO+x5R5BdHg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95957 Archived-At: 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.