From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Alekseyev Newsgroups: gmane.emacs.help Subject: Do not switch focus to the completions buffer window Date: Thu, 6 Feb 2014 01:24:05 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1391678680 23808 80.91.229.3 (6 Feb 2014 09:24:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 09:24:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 06 10:24:47 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 1WBLCK-0007UR-CY for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 10:24:40 +0100 Original-Received: from localhost ([::1]:35347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBLCK-0007dS-0H for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 04:24:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBLC9-0007dK-33 for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 04:24:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBLC8-0002RZ-0T for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 04:24:29 -0500 Original-Received: from mail-oa0-x231.google.com ([2607:f8b0:4003:c02::231]:35659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBLC7-0002RJ-Ry for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 04:24:27 -0500 Original-Received: by mail-oa0-f49.google.com with SMTP id i7so1946757oag.8 for ; Thu, 06 Feb 2014 01:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=Lh2UCVZd7okrfAe4rzvuegwy4+uYW5F2SjWwd7jhFKk=; b=aZnByT0CwJMGU/EhJdPujG7ajrVrQV4AxsleWGyoxaigpqJ/VNuR0h6skL9BN4lfun rRy8S3HU5cLvbUb0m1OWfW732CqkSnwoPoLkeNx5QOA6XiBrc8SiNI6HOTBGdeIl7Za5 OEoHEHlIZN3S9Y9HmJxR86VK55iT0Yi6cKIboLTGGJBS/tEDss4jLILIyqLFGuvm12vI U0I7H7IQ+30AA98nuZMwazowY3zAE5Zwd+qmhzJFcU8gWiodgZjfzC0UBXLrglW00JkK /WYsCM22vHB+o2XUzo0mWung2TlaAIT6joh4wAQUksG/mGnW10QIhPeB3+7bbz8nHH8i SNyA== X-Received: by 10.60.84.241 with SMTP id c17mr91396oez.86.1391678666875; Thu, 06 Feb 2014 01:24:26 -0800 (PST) Original-Received: by 10.182.176.106 with HTTP; Thu, 6 Feb 2014 01:24:05 -0800 (PST) X-Google-Sender-Auth: fsLy8QFtHiqWnE0ADt8m0ywQPjA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::231 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:95937 Archived-At: 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