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#28978: 26.0; Regression: separate, dedicated `*Completions*' frame no longer has parameter `minibuffer' Date: Fri, 27 Oct 2017 07:19:43 -0700 (PDT) Message-ID: <31caab4d-f332-48a7-9736-ccd172073672@default> References: <4d0c5535-246a-4356-914f-3c8d030ba9c9@default> <59F0412F.9090206@gmx.at> <22c73180-e9a6-416f-9e28-da98d07908f8@default> <59F1957F.80900@gmx.at> <59F2ED8C.3010400@gmx.at> 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 1509114027 2344 195.159.176.226 (27 Oct 2017 14:20:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2017 14:20:27 +0000 (UTC) To: martin rudalics , 28978@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 16:20:16 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 1e85UU-0006wO-BF for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 16:20:06 +0200 Original-Received: from localhost ([::1]:57532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e85Ub-0001Qn-IC for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 10:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e85UT-0001OD-Mq for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2017 10:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e85UQ-0006sZ-H4 for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2017 10:20:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e85UQ-0006sM-Dt for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2017 10:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e85UQ-0002CX-7l for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2017 10:20: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: Fri, 27 Oct 2017 14:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28978 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28978-submit@debbugs.gnu.org id=B28978.15091139978444 (code B ref 28978); Fri, 27 Oct 2017 14:20:02 +0000 Original-Received: (at 28978) by debbugs.gnu.org; 27 Oct 2017 14:19:57 +0000 Original-Received: from localhost ([127.0.0.1]:37487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e85UL-0002C6-61 for submit@debbugs.gnu.org; Fri, 27 Oct 2017 10:19:57 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:28639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e85UJ-0002Br-6s for 28978@debbugs.gnu.org; Fri, 27 Oct 2017 10:19:56 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9REJmZj023534 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Oct 2017 14:19:48 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9REJleV000617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Oct 2017 14:19:48 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9REJi88006402; Fri, 27 Oct 2017 14:19:46 GMT In-Reply-To: <59F2ED8C.3010400@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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:139079 Archived-At: > The change and its motivation are: >=20 > =09Fix semantics of 'minibuffer' frame parameter >=20 > =09The 'minibuffer' frame parameter is now t for a normal frame > =09(a frame with a root window plus a minibuffer window) and the > =09frame's minibuffer window for a minibuffer-less frame (a frame > =09whose minibuffer window is on another frame). See also: > =09https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > 3A__lists.gnu.org_archive_html_emacs-2Ddevel_2016- > 2D07_msg01259.html&d=3DDwICaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057S= bK10 > &r=3DqZLZosY6GBAaJtOG9v8QX7nD4BS9t9s5otgxC3d4IFU&m=3Diis9a2_IADv9pVb4yf4H= sSV4 > tsAWIhyObsr30ujC7gQ&s=3DzcJ6cBmJCUoJPZS4bM11HngUAPBn-_GqScRVTZzkcas&e=3D >=20 > =09* src/frame.c (make_frame, make_frame_without_minibuffer) > =09(make_minibuffer_frame): When assigning the frame's minibuffer > =09window also store corresponding 'minibuffer' frame parameter. > =09(store_frame_param): Move the 'minibuffer' parameter checks to > =09the beginning so we can silently override the value before it > =09gets stored in the parameter alist. Fix error handling. > =09(Fframe_parameters): Return value of 'minibuffer' parameter > =09unmodified. >=20 > =09* lisp/frameset.el (frameset-filter-minibuffer): When the cdr of > =09the parameter is a minibuffer window, save (minibuffer . nil) > =09instead of (minibuffer . t). > =09(frameset--reuse-frame): To find a non-minibuffer-only frame > =09look out for a frame whose 'minibuffer' parameter is t instead > =09of that frame's minibuffer window. > =09(frameset-minibufferless-first-p): To find a minibuffer-less > =09frame look out for a frame whose 'minibuffer' parameter is a > =09window instead of nil. So the meaning of frame-parameter `minibuffer' has changed. I will need to adjust my code somehow. How would you suggest I change the test I have been using, to detect a frame that has the active minibuffer (versus the case I reported, where dedicated frame `*Completions*' has no minibuffer)? Previously this was sufficient: only a frame with a the active minibuffer returned non-nil: (cdr (assoc 'minibuffer (frame-parameters this-frame))) Please see the code I use, in the attachment to an earlier message. Here, again, is the important part of that code, showing the test I use: (let* ((this-buffer-frames (icicle-frames-on BUFFER)) (this-frame (car this-buffer-frames)) mini-param) (unless (and this-frame (frame-visible-p this-frame) ;; Only one frame shows BUFFER. (null (cdr this-buffer-frames)) ;; That frame has parameter `minibuffer'. (setq mini-param ; <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D (cdr (assoc 'minibuffer (frame-parameters this-frame)))) ;; Param `minibuffer' is the active minibuffer. (eq mini-param (active-minibuffer-window)) (save-window-excursion (select-frame this-frame) ;; Frame has only one window. (one-window-p t 'SELECTED-FRAME-ONLY))) ...)) I'm looking for an alternative test that will continue to work. (I'd prefer one test that works across Emacs versions, but a test that works only for Emacs 26 and later is OK too.) In the case I cited in this bug report, `this-frame' in that code is frame `*Completions*', which is dedicated to buffer `*Completions*' and has no minibuffer. That frame is displayed via `special-display-buffer-names'. But the code above is not just for my own use, i.e., with such a dedicated `*Completions*' frame. It needs to work also for other cases, including where `*Completions*' is alone in its frame but that frame has the active minibuffer. That's what the `unless' is for: the code should delete the frame in the case I reported, but it should not delete the frame (or the window) if the frame with `*Completions*' has the active minibuffer. Thanks for your help adjusting to this change.