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: Sun, 21 Mar 2021 10:30:39 +0000 Message-ID: References: <83o8fgfgjn.fsf@gnu.org> <83mtuze31r.fsf@gnu.org> <838s6jdthq.fsf@gnu.org> <83im5mcd7i.fsf@gnu.org> <87h7l6t2gg.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8021"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Miha =?utf-8?B?UmlodGFyxaFpxI0=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 21 11:32:15 2021 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 1lNvNX-00020w-5F for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Mar 2021 11:32:15 +0100 Original-Received: from localhost ([::1]:49442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNvNW-00017h-5x for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Mar 2021 06:32:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNvMB-0000aa-Mz for emacs-devel@gnu.org; Sun, 21 Mar 2021 06:30:52 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:27355 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1lNvM6-00071J-Sk for emacs-devel@gnu.org; Sun, 21 Mar 2021 06:30:51 -0400 Original-Received: (qmail 27187 invoked by uid 3782); 21 Mar 2021 10:30:40 -0000 Original-Received: from acm.muc.de (p4fe154c6.dip0.t-ipconnect.de [79.225.84.198]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 21 Mar 2021 11:30:39 +0100 Original-Received: (qmail 4970 invoked by uid 1000); 21 Mar 2021 10:30:39 -0000 Content-Disposition: inline In-Reply-To: <87h7l6t2gg.fsf@miha-pc> X-Submission-Agent: TMDA/1.3.x (Ph3nix) 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-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:266691 Archived-At: Hello, Miha. On Sat, Mar 20, 2021 at 13:49:19 +0100, Miha Rihtaršič wrote: > Alan Mackenzie writes: > >> No, I'm saying that the initial frame is never deleted. At least > >> that's my recollection. > > So, when a new frame is created (possibly with emacsclient), and there > > are now exactly two frames, we want to copy any minibuffers from the > > other frame to the new one when that other frame is the initial frame. > Just giving a heads up that trouble may arise when moving a minibuffer > from one terminal to another (from tty to X for example). > This is judging from the following comment that I stumbled upon when > reading function `server-goto-toplevel': Thanks. > ;; We're inside a minibuffer already, so if the emacs-client is trying > ;; to open a frame on a new display, we might end up with an unusable > ;; frame because input from that display will be blocked (until exiting > ;; the minibuffer). Better exit this minibuffer right away. That looks like a bug which ought to be fixed, but I've no idea where to start looking for the problem. > `emacsclient ~/foo' causes a throw to top-level in most cases before > spawning a new frame to avoid some trouble, but I'm not sure if this > trouble applies for our case. When starting emacsclient, I've seen minibuffers being preserved, but I think I've also seen them being aborted. By trouble, I think you mean that described in the comment above. On a slightly different note, do you see any reason not to commit the latest state of src/minibuf.c etc., as amended by my patch from Wednesday? -- Alan Mackenzie (Nuremberg, Germany).