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: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!] Date: Sat, 24 Oct 2020 19:29:03 +0000 Message-ID: <20201024192903.GC5972@ACM> References: <83sgafy56d.fsf@gnu.org> <20201015180143.GA10229@ACM> <83wnzrwdy5.fsf@gnu.org> <20201021151945.GA19276@ACM> <20201021200438.GF19276@ACM> <83h7qmkzla.fsf@gnu.org> <20201023204257.GB5249@ACM> <837drghyo0.fsf@gnu.org> <20201024154455.GB5972@ACM> 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="25991"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 24 21:29:48 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 1kWPEa-0006fq-IC for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Oct 2020 21:29:48 +0200 Original-Received: from localhost ([::1]:45418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWPEZ-0001ne-Ki for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Oct 2020 15:29:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWPDy-0001M8-Ad for emacs-devel@gnu.org; Sat, 24 Oct 2020 15:29:10 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:25026 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kWPDu-0005Ff-R7 for emacs-devel@gnu.org; Sat, 24 Oct 2020 15:29:09 -0400 Original-Received: (qmail 77881 invoked by uid 3782); 24 Oct 2020 19:29:04 -0000 Original-Received: from acm.muc.de (p2e5d523b.dip0.t-ipconnect.de [46.93.82.59]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 24 Oct 2020 21:29:03 +0200 Original-Received: (qmail 8148 invoked by uid 1000); 24 Oct 2020 19:29:03 -0000 Content-Disposition: inline In-Reply-To: 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/24 15:29:05 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:258435 Archived-At: Hello, Stefan. On Sat, Oct 24, 2020 at 14:40:52 -0400, Stefan Monnier wrote: > > At the moment, when I create a setup with three frames, exactly one of > > which is a "normal" frame with minibuffer, my C-x o can be made wrongly > > to cycle between all three frames. > Depending on what you need to do before this can happen, I wouldn't > necessarily worry about this particular issue too much because "the > right behavior" is very hard (if not impossible) to define precisely in > such a way that it makes sense in all cases. I've found the cause of it. It's some arcane coding in candidate_window_p in window.c. It's trying to move from an active minibuffer to a (window in a) frame in which it's active, but fails to check that the frame's MB is the MB we're moving from. Or something like that. When I add that check, it behaves better. > FWIW, I still haven't found anyone using a setup like the one > you describe. I can't imagine anybody wanting to use it, either. But if there are bugs associated with applying my "minibuffer follows selected frame" patch, they might bite in other circumstances. > The ones I know are: > - one minibuffer-only frame and all other frames a minibuffer-less; > At least "per terminal": there can also be at the same time a normal > tty frame (with minibuffer and all), or a second X11 display with its > own minibuffer-only frame, ... > - all normal frames, except potentially a few very special minibuffer-less > frames used for very special purposes (behaving more like things like > tooltips, or tool bars or ...). Yes. Either a user will want "normal" frames, or frames without MBs and a single minibuffer frame. > > It is bugs like this I must fix, and my feeling at the moment is that > > there will be more than just that one. > If you can reproduce the problem without your patch, then I hope you > won't count it as a bug, otherwise it'll never end. Yes, I can see that danger. I won't raise any bug reports for this sort of thing without first discussing it on emacs-devel. > Stefan -- Alan Mackenzie (Nuremberg, Germany).