From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active Date: Sat, 10 Jun 2023 08:45:40 +0000 Message-ID: <3c82fb01f4e9db2eeaf9@heytings.org> References: <83o7lo28e6.fsf@gnu.org> <83cz241rgy.fsf@gnu.org> <835y7v26ys.fsf@gnu.org> <3c82fb01f4aa90537660@heytings.org> <83352z24ug.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4597"; mail-complaints-to="usenet@ciao.gmane.io" Cc: al@petrofsky.org, rudalics@gmx.at, monnier@iro.umontreal.ca, 63967@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 10 10:46:29 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q7uEv-000137-66 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jun 2023 10:46:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7uEa-0003aO-PX; Sat, 10 Jun 2023 04:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7uEU-0003V0-54 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7uET-0005TG-Nr for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7uET-00026Q-K6 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2023 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63967 X-GNU-PR-Package: emacs Original-Received: via spool by 63967-submit@debbugs.gnu.org id=B63967.16863867458058 (code B ref 63967); Sat, 10 Jun 2023 08:46:01 +0000 Original-Received: (at 63967) by debbugs.gnu.org; 10 Jun 2023 08:45:45 +0000 Original-Received: from localhost ([127.0.0.1]:33242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7uEC-00025u-Mu for submit@debbugs.gnu.org; Sat, 10 Jun 2023 04:45:45 -0400 Original-Received: from heytings.org ([95.142.160.155]:38340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7uE9-00025l-S1 for 63967@debbugs.gnu.org; Sat, 10 Jun 2023 04:45:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1686386740; bh=wSVI/HKVSstCS7jRCGTwMTd3eDQ+L5zIsJFkvgaw3iM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=wxImpdZS7Zmkk9QZE8vB9PkinuuoLQZiCieMEvZBbCcHj1P+aiAdB/oUkUwoyJ3Q9 N2onSk8PCDLzOR4lf4c+hoak0lTBSycn5/c/qByet52YxH8I7p1pMAOfRH9boqdc0c RoWPJmpLKr1WSNXkP1MUgCActblRaNT8dpVSEsiZEbAdX0aqhufAIgiPqnmR1ZM2S0 +Lewm6XhLq0h4SyG4QBws/3RbTUIaIq1tgGMscONx3w1/nmXSiqvUXRoxt5fv4r1q0 oNxqx7SPgBo5Fy99Lh0tsgVrQPMvqmB+9pFAKn/kZWbdvKVlcjvBG+s6Ay1wp42k6Y nxZKaFSet4uDA== In-Reply-To: <83352z24ug.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263201 Archived-At: >> I see. Apparently we don't work the same way. I didn't have time to >> investigate this issue further after bisecting, but the first thing I >> would have done is to determine which of the four calls to >> Fset_frame_selected_window in that changeset is responsible for that >> bug. > > You assume that the only way to change the selected-window on the C > level is by calling Fset_frame_selected_window? That's false; just try > grepping the C sources for "selected_window =". And that's even before > you consider the possibilities of indirect setting, when the actual > setting is in Lisp via some proxy. > I don't think it's useful to argue, I'm just observing that we don't work the same way. But no, I don't assume anything, on the contrary. Just commenting out each one of the Fset_frame_selected_window in that changeset in turn, and checking whether doing that fixes the bug, shows that the culprit is the call to Fset_frame_selected_window in minibuffer_unwind. Doing that does not involve any guesswork, and the result is 100% accurate. Of course, that's not the end of the story, and of course, it could have turned out that none of these four calls is the culprit (in which case I would probably have checked the five calls to set_window_buffer).