From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: put input focus on active minibuffer Date: Sun, 14 Feb 2016 08:54:50 -0800 (PST) Message-ID: References: <871t8fdhbn.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1455468933 23970 80.91.229.3 (14 Feb 2016 16:55:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 16:55:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexis , Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 14 17:55:21 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aUzxB-0007jF-5w for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 17:55:21 +0100 Original-Received: from localhost ([::1]:51924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzx7-0005Ce-3k for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 11:55:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzwp-0005BJ-AL for emacs-devel@gnu.org; Sun, 14 Feb 2016 11:55:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUzwm-0006PL-03 for emacs-devel@gnu.org; Sun, 14 Feb 2016 11:54:59 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:19756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzwl-0006PG-Pr for emacs-devel@gnu.org; Sun, 14 Feb 2016 11:54:55 -0500 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1EGsqub004972 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 14 Feb 2016 16:54:53 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u1EGspjK021891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 14 Feb 2016 16:54:52 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u1EGspo2031705; Sun, 14 Feb 2016 16:54:51 GMT In-Reply-To: <871t8fdhbn.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199935 Archived-At: > > No, please do not do this. A user should be able to select > > different buffers and windows, including by clicking the mouse > > or using keyboard keys, while the minibuffer is active. A user > > should be able to do all kinds of things while the minibuffer is > > active - including come back to the minibuffer to continue > > inputting text there etc. >=20 > Agreed. >=20 > But, if using GNU Emacs 24.4 or later, perhaps make use of > `focus-in-hook`? For example, something along the lines of: >=20 > (defun focus-to-active-minibuffer () > (if (minibuffer-window-active-p (minibuffer-window)) > (select-window (minibuffer-window)))) >=20 > (add-hook 'focus-in-hook #'focus-to-active-minibuffer) If you do that then whenever a frame receives the focus so will its (active) minibuffer window. That precludes the user interactions I described above, and about which you "Agreed". A user needs to be able to interact with other windows directly, whatever frame they are in. This interaction needs to be able to include inserting text etc. - actions that require that window to have the focus. Users need to be able to change the focus to anywhere they like when the minibuffer is active. Just because it is active and the user will want to interact with it, does not mean that the user should not be able to interact with other window as well. What you suggest could be useful for a particular command that wants/needs, for some reason, to preclude the user from focussing other windows while the minibuffer is active. But it is not applicable to the general case of using a minibuffer.