From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#26513: 25.2; pop-up-frames and *Completions* buffer Date: Sat, 15 Apr 2017 09:49:28 -0700 (PDT) Message-ID: <7e856815-6dff-4152-b144-c45a4bedb0b4@default> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492275011 11362 195.159.176.226 (15 Apr 2017 16:50:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Apr 2017 16:50:11 +0000 (UTC) To: charles@aurox.ch, 26513@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 15 18:50:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQth-0002nW-Hr for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Apr 2017 18:50:05 +0200 Original-Received: from localhost ([::1]:57422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czQtn-0007pS-FO for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Apr 2017 12:50:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czQth-0007oK-HF for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2017 12:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czQte-0007rj-Ep for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2017 12:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czQte-0007rd-At for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2017 12:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1czQte-00058D-6H for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2017 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2017 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26513 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26513-submit@debbugs.gnu.org id=B26513.149227499119704 (code B ref 26513); Sat, 15 Apr 2017 16:50:02 +0000 Original-Received: (at 26513) by debbugs.gnu.org; 15 Apr 2017 16:49:51 +0000 Original-Received: from localhost ([127.0.0.1]:49192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQtT-00057k-EF for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:49:51 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQtR-00057W-Ne for 26513@debbugs.gnu.org; Sat, 15 Apr 2017 12:49:50 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3FGnX9F004850 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 15 Apr 2017 16:49:34 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3FGnWVX006455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 15 Apr 2017 16:49:33 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v3FGnS1F010908; Sat, 15 Apr 2017 16:49:30 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131616 Archived-At: FWIW, I reported such problems a couple of decades ago. Unfortunately (for me at least), there is not enough use or interest in using separate frames by default, including for *Completions*, so this kind of thing has not gotten the love it would really need for progress. I've tried to do what I can in my own environment to handle this, especially in the context of a standalone=20 minibuffer frame. And Martin has been helpful wrt problems that resulted from changes in the Emacs code over the years. Here's what I do for *Completions*, FWIW: I add an entry to `special-display-buffer-names* that has a function, `1on1-display-*Completions*-frame', which takes care of displaying the *Completions* frame. The main thing that function does is redirect the focus of the *Completions* frame to the standalone minibuffer frame (if the minibuffer is active) or (if not) to the buffer that was current before *Completions* display was requested: (let ((redirect (if (active-minibuffer-window) 1on1-minibuffer-frame (and completion-reference-buffer (get-buffer-window completion-reference-buffer 'visible) (not (eq (get-buffer "*Completions*")=20 completion-reference-buffer)) (window-frame (get-buffer-window completion-reference-buffer t)))))) (when redirect (redirect-frame-focus (selected-frame) redirect))) I've said it before, but I think it is relevant: Back in the early 1990s the Emacs implementation named `Epoch' worked very well with a standalone minibuffer frame, out of the box. All I've done is try to work around Emacs's poor (non-existent) support for this kind of use case - essentially trying to emulate Epoch behavior. But frames remain the poor cousin to windows in Emacs. Part of that is likely due to the fact that Emacs cannot completely control the behavior of frames for all window managers. Window mgrs are different, and they have ultimate control. The other reason is probably just because few Emacs users try to use separate frames by default, or if they try they soon give up due to the many hurdles. Anyway, you might try, to start with, redirecting the frame focus back to `completion-reference-buffer'. For reference, in case it helps, my code for `1on1-display-*Completions*-frame' is in `oneonone.el' (https://www.emacswiki.org/emacs/download/oneonone.el). My code for keybindings in `completion-list-mode-map' is in `icicles-mode.el' (https://www.emacswiki.org/emacs/download/icicles-mode.el).