From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: About the 'minibuffer' frame parameter Date: Tue, 09 Aug 2016 19:21:05 +0300 Message-ID: <83pophhq1a.fsf@gnu.org> References: <579E3F9E.8020200@gmx.at> <83h9azl4s1.fsf@gnu.org> <57A4C0DE.3060506@gmx.at> <837fbvkofs.fsf@gnu.org> <57A5AF03.30807@gmx.at> <8360rck7kd.fsf@gnu.org> <57A84256.8030706@gmx.at> <83popji89w.fsf@gnu.org> <57A9940B.6030005@gmx.at> <8337mehu5u.fsf@gnu.org> <57A9FFDE.10106@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470761914 14183 195.159.176.226 (9 Aug 2016 16:58:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2016 16:58:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 18:58:29 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 1bXAMD-0003U3-9k for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2016 18:58:25 +0200 Original-Received: from localhost ([::1]:36739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXAMA-0003bW-7Y for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2016 12:58:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9mO-0008AI-2Z for emacs-devel@gnu.org; Tue, 09 Aug 2016 12:21:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX9mJ-0000pd-Ru for emacs-devel@gnu.org; Tue, 09 Aug 2016 12:21:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9mJ-0000pX-OR; Tue, 09 Aug 2016 12:21:19 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2297 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bX9mI-0005cQ-Hb; Tue, 09 Aug 2016 12:21:19 -0400 In-reply-to: <57A9FFDE.10106@gmx.at> (message from martin rudalics on Tue, 09 Aug 2016 18:07:58 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:206510 Archived-At: > Date: Tue, 09 Aug 2016 18:07:58 +0200 > From: martin rudalics > CC: emacs-devel@gnu.org > > >> (1) Make sure that store_frame_param doesn't store invalid parameter > >> values. > >> > >> (2) Never store a minibuffer window as frame parameter. > >> > >> (3) Have ‘frame-parameter’ return the 'minibuffer' parameter as stored > >> internally. If no stored value is available, return t. > >> > >> (4) Wait for regression reports. > >> > >> (5) Fix the documentation. > >> > >> (6) Fix/remove related comments. > > > > I'm okay with that, but I'm surprised by (2): won't storing the > > minibuffer window there allow us to report the correct value in (3)? > > What am I missing? > > If we did that we would invert the values returned by ‘frame-parameter’ > for the "normal" frame and minibuffer-less frame cases. Currently, we > return the minibuffer window for a normal frame and nil for a > minibuffer-less frame. You would return the minibuffer window for a > minibuffer-less frame and t for a normal frame. Correct? Maybe. Another alternative would be to return a window in both cases. > This would have the benefit that after > > (set-frame-parameter minibuffer-less-frame 'minibuffer some-minibuffer-window) > > the value returned by ‘frame-parameter’ would be consistent with the > requested value. However, most minibuffer-less frames are created via > > (make-frame '((minibuffer . nil))) > > and whatever we do here we would introduce another inconsistency: Either > the stored value is the minibuffer window chosen by Emacs and the value > returned by ‘frame-parameter’ would not be the value from the PARAMETERS > argument of ‘make-frame’. Or we would sometimes return nil and > sometimes a window as value of the 'minibuffer' frame parameter of a > minibuffer-less frame. We have already a few cases where frame-parameter returns a value different from the one specified when make-frame was called. There's nothing wrong about that, if it's Emacs that chooses the actual value. > Given the fact that changing the frame parameter of a minibuffer-less > frame is a pretty rare operation, I would prefer the solution sketched > in (2). WDYT? Do you still prefer (2)? I prefer storing a window because then we could naturally return it, like we do with frame colors.