From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Wed, 14 Oct 2020 21:58:35 +0300 Message-ID: <83y2k8y6qs.fsf@gnu.org> References: <20201013190255.GA8896@ACM> <838sca0w7k.fsf@gnu.org> <20201013195103.GB8896@ACM> <20201013204408.GC8896@ACM> <831ri027vz.fsf@gnu.org> <20201014160240.GA7651@ACM> <83d01kzswk.fsf@gnu.org> <20201014163534.GB7651@ACM> <838sc8zqjj.fsf@gnu.org> <20201014184523.GC7651@ACM> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32328"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ghe@sdf.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 14 21:00:21 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSm0b-0008Gm-Jy for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 21:00:21 +0200 Original-Received: from localhost ([::1]:55862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSm0a-0007DZ-JJ for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 15:00:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSlyl-0005ii-45 for emacs-devel@gnu.org; Wed, 14 Oct 2020 14:58:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34470) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSlyk-00074f-HK; Wed, 14 Oct 2020 14:58:26 -0400 Original-Received: from [176.228.60.248] (port=3795 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kSlyj-0001pB-J7; Wed, 14 Oct 2020 14:58:26 -0400 In-Reply-To: <20201014184523.GC7651@ACM> (message from Alan Mackenzie on Wed, 14 Oct 2020 18:45:23 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257675 Archived-At: > Date: Wed, 14 Oct 2020 18:45:23 +0000 > Cc: ghe@sdf.org, emacs-devel@gnu.org > From: Alan Mackenzie > > Calling the frames F1 and F2: > > (i) On F1, C-x b ; Leaves a minibuffer open. > (ii) Move to F2. > (iii) C-s foo RET > > On the current master, and with my patch, the minibuffer is still on F1. > With my "always" variation, the minibuffer would now be on F2 (or, > possibly on all frames). > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > Starting again from a vanilla state: > (iv) On F1, C-x b ; Leaves a minibuffer open. > (v) Move to F2. > (vi) C-s foo ; Leaves an Isearch active. > (vii) C-x 8 RET RET ; Inserts a foreign character into > the search string. > (viii) RET ; Terminates Isearch. > > On the current master, the minibuffer has been moved to F2. With my > patch, it would still be on F1. With the "always" variation it would be > on F2 (or, possibly on all frames). You should try this with the emacs-27 branch, because Gregory's patch installed there (and will be soon merged to master) changes the behavior quite a bit. > The current master seems to me to be inconsistent, in that whether the > minibuffer moves from F1 to F2 depends on whether the Isearch used a > (recursive) minibuffer. AFAICT, this no longer happens. > With my patch, a minibuffer would remain on the frame it was opened on, > no matter what. That's a separate issue, I believe. I'm not sure I like the behavior you suggest. If the user switched to a different frame, why should the minibuffer prompt stay on the non-selected frame? > (defvar minibuffer-follows-frame 'hybrid > "How a minibuffer moves on selecting a different frame. > It takes one of the following values: > nil: Minibuffers remain on the frame they were opened on. > t: A minibuffers is moved onto the newly selected frame. > The symbol `hybrid': A minibuffer is moved on onto the current frame when > a recursive minibuffer opened on this frame terminates. > > `hybrid' corresponds with the standard behavior from Emacs 27 and earlier." I think 'hybrid' is no longer needed (and makes little sense as useful behavior to me).