From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: About the 'minibuffer' frame parameter Date: Sun, 31 Jul 2016 20:12:46 +0200 Message-ID: <579E3F9E.8020200@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1469988848 20391 80.91.229.8 (31 Jul 2016 18:14:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Jul 2016 18:14:08 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 31 20:13:55 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bTvFL-0005Ft-Bi for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2016 20:13:55 +0200 Original-Received: from localhost ([::1]:40390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTvFH-0007ip-H1 for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2016 14:13:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTvER-00075t-5i for emacs-devel@gnu.org; Sun, 31 Jul 2016 14:13:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTvEN-0005Tn-RB for emacs-devel@gnu.org; Sun, 31 Jul 2016 14:12:59 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:50204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTvEN-0005Tb-Gb for emacs-devel@gnu.org; Sun, 31 Jul 2016 14:12:55 -0400 Original-Received: from [192.168.1.100] ([212.95.7.118]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MZD0K-1biHFo1jAq-00L2CV for ; Sun, 31 Jul 2016 20:12:52 +0200 X-Provags-ID: V03:K0:Q1gmuCiopQTnq+Fu8G3vyWPLWU9t/GMGgRbIV4aTavjBJJThpHd lJjkIxdvOBH7MnvYHgAlH7iorNrL9pgL9B84hALPaOQFG5NEt5MU2EJo1Hdcu/Q+YgPuKXS SoawQMTrT98d0Lp3PO6odwPrdy586AUunlPS930F7xDr/UmHuQdS2BXN80DR38PTTGsj6EQ YQ7hj5HGJMbl0Vfjwpx1g== X-UI-Out-Filterresults: notjunk:1;V01:K0:uv2Vd63/Co4=:BLQYw9k9PmwpOoQYgyLaym kg8hEHBelHw72KWH2tl7QUe8WJhiD0nIvW2IDwisnQm2Ct5SIGU8hzLKBrziC8yJ/Mo8JBe0E jcQxB7vfnQfwH0g3yPErD7HaoNcRAwsPXvxdGhQSaAhXEEkRrrOIe0nrOhE+Ghl73YnsaN1An 7FG/4eijfXiWQzq4NpAEL+SPNEZY0rnji8xHrg5ymgc1MbVpvkC1VcowH6Uy/sv/1iVgcLhGZ BtJ3t9Y2uLq0C/HudCLD1vWCiG/BqbG5g7B1HhRMDSaImoL/8NsvJwYq7Jif1hLGyyh9rFBPq /yN4P8BTf1QBRumbmirhpOmCtnU9x0hrhqacc7D1EqE1FSxeNDKq0MagT3R+khmVEIH29KCbV 8gkHvxr/ILKoQQY1RXzOlxCG4c+WS5JX3fYivpG6BGE+TJWk9X4TTvdI1yBDqEdJyNXpXv7Eu I4v9E/0bvyjRbW23id/t0yRVmS3HyoA+J13zxtvs++fk0e+n1aStparUGs62OxZ3Fc+ESf2fD RATZTQ16P/PlkZb95dsb4UZkKo1eV/U2KOAt+aMI8UDdGLYn8V/SDN+nRgZ3HfuXB8gXPJ9Dv 3soMgdAYPXU5JbMjHcsWmmlwbCeoGbenhnuLuhBlLlQF6nrwuUGZDFREvi2e/krAwATER2RZC j8WrtDq1wJthCLW2RlUpHBcAbw1iceEwgLD6YDzMGUWL6w3iD9o7LS7ecGyiLjwGdp8/3lVQx AGARftH//qeN+d2PT3CWr7o04neLGmr1WHZfQRI2fjPUD6DpoX3llHKwldjboh7GyrA91SEj X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:206275 Archived-At: With emacs -Q evaluate: (progn (setq minibuffer-less-frame (make-frame '((minibuffer . nil)))) (setq minibuffer-only-frame (make-frame '((minibuffer . only)))) (set-frame-parameter minibuffer-less-frame 'minibuffer (frame-root-window minibuffer-only-= frame)) (frame-parameter minibuffer-less-frame 'minibuffer)) This reveals a number of problems with how we currently handle the 'minibuffer' frame parameter and how it's documented. In section 28.4.3.5 we say about this parameter: `minibuffer' Whether this frame has its own minibuffer. The value `t' means yes, `nil' means no, `only' means this frame is just a minibuffer. If the value is a minibuffer window (in some other frame), the frame uses that minibuffer. This frame parameter takes effect when the frame is created, and can not be changed afterwards. The sentence "If the value is a minibuffer window (in some other frame), the frame uses that minibuffer." is misleading. A minibuffer window is reported iff that window is on the _same_ frame and that frame is not a minibuffer-only frame. A minibuffer window in some other frame is never reported. But if the frame is minibuffer-less and uses the minibuffer window of some other frame, we return as value nil although the real, internal frame parameter's value (not the one produced by the store_in_alist (&alist, Qminibuffer, (! FRAME_HAS_MINIBUF_P (f) ? Qnil : FRAME_MINIBUF_ONLY_P (f) ? Qonly : FRAME_MINIBUF_WINDOW (f))); construct) is actually that window. Otherwise, evaluating the =E2=80=98set-frame-parameter=E2=80=99 above would have produced an error.= Which means that the sentence "This frame parameter takes effect when the frame is created, and can not be changed afterwards." is misleading as well. In fact, setting the 'minibuffer' frame parameter is the only way to change the minibuffer window for a specific frame. Note in this context that =E2=80=98minibuffer-window=E2=80=99 returns the= correct minibuffer window for its FRAME argument while =E2=80=98set-minibuffer-wi= ndow=E2=80=99 does not allow to set the minibuffer window for a specific frame. I'm not sure how to deal with this situation. Personally, I'd prefer to report the real, internal 'minibuffer' parameter but am afraid that might break existing code. In any case, the documentation should be fixed. Somehow. martin