From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: C-x C-f in two frames -> "user minibuffer while in minibuffer": Bug? Date: Thu, 9 Jun 2005 09:22:44 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1118335267 14795 80.91.229.2 (9 Jun 2005 16:41:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2005 16:41:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 18:41:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DgQ3Q-0001FP-Bv for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2005 18:38:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgQAN-0003za-3l for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2005 12:46:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DgQ0r-00077t-UG for help-gnu-emacs@gnu.org; Thu, 09 Jun 2005 12:36:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DgQ0Z-0006zr-KQ for Help-gnu-emacs@gnu.org; Thu, 09 Jun 2005 12:36:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgQ0X-0006oS-P4 for Help-gnu-emacs@gnu.org; Thu, 09 Jun 2005 12:35:53 -0400 Original-Received: from [148.87.122.33] (helo=rgminet04.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DgPo3-0003TZ-DK for Help-gnu-emacs@gnu.org; Thu, 09 Jun 2005 12:22:59 -0400 Original-Received: from rgminet04.oracle.com (localhost [127.0.0.1]) by rgminet04.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j59GMkBY001954 for ; Thu, 9 Jun 2005 10:22:46 -0600 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by rgminet04.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j59GMjW2001918 for ; Thu, 9 Jun 2005 10:22:45 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j59GMjCw016756 for ; Thu, 9 Jun 2005 10:22:45 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw300.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j59GMi9l016751 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 9 Jun 2005 10:22:44 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27380 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27380 If I open a second frame, then do C-x C-f in one of them and press tab so that the window is split and I get a *Completions* buffer in one frame, and when I then select the second frame and do a C-x C-f there, I don't get another *Completions* buffer there, but an error message that appears in the first frame: "Command attempted to use minibuffer while in minibuffer" This happens with standard settings, on the GNU/Linux port as well as on Carbon, no matter what display-buffer-reuse-frames is. Is that a bug? Others have explained what's happening wrt minibuffer input. Here's some more info that might help: The *Completions* buffer is a bit special, in that its input is directed to the minibuffer. When it is in a separate frame, the frame focus needs to be redirected to the minibuffer explicitly, I've found. I do this: ;; Use `my-display-*Completions*-frame' to display *Completions* buffer (add-to-list 'special-display-buffer-names (list "*Completions*" 'my-display-*Completions*-frame)) (defun my-display-*Completions*-frame (buf &optional args) "Display *Completions* buffer in its own frame. `special-display-function' is used to do the actual displaying. Completion input events are redirected to `my-minibuffer-frame'." (let (return-window) (setq return-window (select-window (funcall special-display-function buf args))) (raise-frame) (redirect-frame-focus (selected-frame) my-minibuffer-frame) return-window)) The key line is the second-to-last: redirect-frame-focus. The value of variable `my-minibuffer-frame' is a standalone minibuffer (only) frame. (For the complete code, see http://www.emacswiki.org/elisp/oneonone.el. See also http://www.emacswiki.org/elisp/elect-mbuf.el for code that removes the *Completions* frame when you are done with it.) HTH, Drew