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: Sat, 14 Nov 2020 19:12:24 +0200 Message-ID: <837dqnvp53.fsf@gnu.org> References: <83v9ed3nbw.fsf@gnu.org> <835z6b27xm.fsf@gnu.org> <20201111203716.GA19003@ACM> <83v9e8ukk4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6484"; mail-complaints-to="usenet@ciao.gmane.io" Cc: enometh@meer.net, monnier@iro.umontreal.ca, andreyk.mad@gmail.com, emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 14 18:13:13 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 1kdz6v-0001aA-60 for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Nov 2020 18:13:13 +0100 Original-Received: from localhost ([::1]:57262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdz6u-0005H7-8D for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Nov 2020 12:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdz6O-0004iM-3c for emacs-devel@gnu.org; Sat, 14 Nov 2020 12:12:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57946) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdz6M-0007Wl-FP; Sat, 14 Nov 2020 12:12:38 -0500 Original-Received: from [176.228.60.248] (port=4265 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdz6L-0006qv-5k; Sat, 14 Nov 2020 12:12:37 -0500 In-Reply-To: <83v9e8ukk4.fsf@gnu.org> (message from Eli Zaretskii on Sat, 14 Nov 2020 15:36:43 +0200) 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:259175 Archived-At: > Date: Sat, 14 Nov 2020 15:36:43 +0200 > From: Eli Zaretskii > Cc: enometh@meer.net, monnier@iro.umontreal.ca, andreyk.mad@gmail.com, > emacs-devel@gnu.org > > > Date: Wed, 11 Nov 2020 20:37:16 +0000 > > Cc: Andrii Kolomoiets , monnier@iro.umontreal.ca, > > enometh@meer.net, emacs-devel@gnu.org > > From: Alan Mackenzie > > > > > > C-x 5 2 > > > > M-x > > > > C-x 5 o > > > > M-x > > > > > > With the default setting of `enable-recursive-minibuffers`, the > > > > minibuffer is moved to active frame, but the error message is displayed > > > > in the other frame. > > > > > Arguably a bug. Alan, could you please look into this? > > > > I think this is a bug, too. > > > > I've been looking at the C sources for some while but haven't found > > anything useful. I've tried setting echo_area_window during the frame > > change, but this doesn't have any visible effect. > > > > I'll carry on with the diagnosis. Any quick tips would be welcome. > > My guess is that this is somehow related to the fact that error > messages are displayed as part of handling an error signal, which > causes a throw to top level. Specifically, read-from-minibuffer (called when we type the first M-x) binds some variables, then enters recursive-edit. When the error unwinds the stack, it restores the original window configuration, which includes the frame which was selected back then. And that undoes the effect of "C-x 5 o", so the error message is displayed on the original frame.