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.bugs Subject: bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active Date: Sat, 10 Jun 2023 20:09:49 +0300 Message-ID: <83jzwbz1k2.fsf@gnu.org> References: <83o7lo28e6.fsf@gnu.org> <0469e0cb-4f63-eb4b-1184-2dfeabdcf9e6@gmx.at> <83y1krzpoy.fsf@gnu.org> <8a540045-0f14-43cf-0515-4dcab2f68b98@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33047"; mail-complaints-to="usenet@ciao.gmane.io" Cc: al@petrofsky.org, 63967@debbugs.gnu.org, monnier@iro.umontreal.ca To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 10 19:10:18 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 1q826T-0008TW-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jun 2023 19:10:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q826G-0000vv-NV; Sat, 10 Jun 2023 13:10:04 -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 1q826E-0000vU-Ej for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 13:10: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 1q826E-0006NM-4W for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 13:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q826E-0001tc-0H for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 13:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2023 17:10: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.16864169907265 (code B ref 63967); Sat, 10 Jun 2023 17:10:01 +0000 Original-Received: (at 63967) by debbugs.gnu.org; 10 Jun 2023 17:09:50 +0000 Original-Received: from localhost ([127.0.0.1]:36188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8262-0001t7-9P for submit@debbugs.gnu.org; Sat, 10 Jun 2023 13:09:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q825x-0001sr-HC for 63967@debbugs.gnu.org; Sat, 10 Jun 2023 13:09:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q825r-0006LU-Cs; Sat, 10 Jun 2023 13:09:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=w/lN/Z4gZp5HxmSn5mqDmf7hexK/R3U/aqd+tVcNc+E=; b=W0rOX4jJKSiI Y0OxK5ipC4rRFzVbHKWxOLCV3EC9PPe1XYhVAEi/QRTr4l1msh2x5dA5RuVvdaDg8VQ/tdEvNP6Iy xZy+5dDdgDGTr4rWCANAJv97Cg+Agt5I1pVTVgeL1PL7QpXE8qXjwO/3duc1yEKQYzcWpH0hPM9xR i72NJn+w2TmydGTLfmyXWoigzigrgjp0SNU9gC2Q/fuA7O9yLKxoCR/vrI2OBWz2/p8Mikz0xnVeN 2Vk4dtxBaIOb7Wou5zxn57HstIaSzJhCuB74LnMBBhJ20AwA90WPPzVO4jGmgQk62xNtaCL6Rh5z3 Y80xXXi7VobfuFM1diVLEA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q825q-0002gu-TB; Sat, 10 Jun 2023 13:09:39 -0400 In-Reply-To: <8a540045-0f14-43cf-0515-4dcab2f68b98@gmx.at> (message from martin rudalics on Sat, 10 Jun 2023 16:51:47 +0200) 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:263227 Archived-At: > Date: Sat, 10 Jun 2023 16:51:47 +0200 > Cc: al@petrofsky.org, monnier@iro.umontreal.ca, 63967@debbugs.gnu.org > From: martin rudalics > > > That works, but does it make sens to do the other stuff in that if > > clause in that case? We do: > > > > if (!NILP (w->prev_buffers)) > > { > > entry = Fcar (w->prev_buffers); > > w->prev_buffers = Fcdr (w->prev_buffers); > > set_window_buffer (window, Fcar (entry), 0, 0); > > Fset_window_start (window, Fcar (Fcdr (entry)), Qnil); > > Fset_window_point (window, Fcar (Fcdr (Fcdr (entry)))); > > /* set-window-configuration may/will have unselected the > > mini-window as the selected window. Restore it. */ > > if (!EQ (orig_selected_window, FRAME_SELECTED_WINDOW (f))) > > Fset_frame_selected_window (exp_MB_frame, window, Qnil); > > } > > > > Does it make sense to manipulate the buffer, window-start, and > > window-point of WINDOW if we are not going to make it the selected > > window? > > If w->prev_buffers gets us the right minibuffer to display here (any > former dw->prev_buffers = sw->prev_buffers should guarantee that), then > for that buffer we have to establish the corresponding start and point > positions. This makes sense regardless of whether the minibuffer window > will be selected or not. But read_minibuf_unwind already does all that when it restores the window configuration, doesn't it? Or is there something about the mini-window that restoring window configuration doesn't handle correctly?