From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Wed, 14 Oct 2020 19:49:04 +0000 Message-ID: <20201014194904.GD7651@ACM> References: <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> <83y2k8y6qs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ghe@sdf.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 14 21:50:10 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 1kSmmn-0003VR-GI for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 21:50:09 +0200 Original-Received: from localhost ([::1]:43696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSmmm-0006k9-G9 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 15:50:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSmlr-0005st-IF for emacs-devel@gnu.org; Wed, 14 Oct 2020 15:49:11 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43153 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kSmlp-0004xS-2h for emacs-devel@gnu.org; Wed, 14 Oct 2020 15:49:11 -0400 Original-Received: (qmail 45042 invoked by uid 3782); 14 Oct 2020 19:49:04 -0000 Original-Received: from acm.muc.de (p4fe15b87.dip0.t-ipconnect.de [79.225.91.135]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Wed, 14 Oct 2020 21:49:04 +0200 Original-Received: (qmail 3687 invoked by uid 1000); 14 Oct 2020 19:49:04 -0000 Content-Disposition: inline In-Reply-To: <83y2k8y6qs.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 14:45:24 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:257682 Archived-At: Hello, Eli. On Wed, Oct 14, 2020 at 21:58:35 +0300, Eli Zaretskii wrote: > > 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: [ .... ] > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > 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. I've just tried it. The behaviour is indeed that which I noted above - the minibuffer moves to F2 if and only if a minibuffer has been used in Isearch. > > 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. Oh, but it does. > > 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? Because the action which the minibuffer will invoke usually takes place in that now non-selected frame. I feel a bit of a jolt when I hit RET in F2, but the effect (of switch-to-buffer) takes place in F1. This applies to C-x C-f, C-x C-w, C-x b, M-x imenu, ..... > > (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). I agree, but for backward compatibility.... ;-) -- Alan Mackenzie (Nuremberg, Germany).