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#69093: window-state-put doesn't update current buffer Date: Fri, 16 Feb 2024 13:46:24 +0200 Message-ID: <86r0hcvdgv.fsf@gnu.org> References: <86il2s6cva.fsf@mail.linkov.net> <2387160a-717f-4164-a0ad-cd831cabd60f@gmx.at> <86cysy1c7e.fsf@mail.linkov.net> <9bc224fd-265b-42a6-9315-9e1caa9e7172@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3896"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69093@debbugs.gnu.org, juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 16 12:47:08 2024 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 1rawgM-0000eg-Jr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Feb 2024 12:47:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rawg1-0000Cn-KF; Fri, 16 Feb 2024 06:46:45 -0500 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 1rawg0-0000CJ-1X for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 06:46:44 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rawfz-00016v-Pz for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 06:46:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rawgI-0001CV-Jw for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 06:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Feb 2024 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69093 X-GNU-PR-Package: emacs Original-Received: via spool by 69093-submit@debbugs.gnu.org id=B69093.17080840204601 (code B ref 69093); Fri, 16 Feb 2024 11:47:02 +0000 Original-Received: (at 69093) by debbugs.gnu.org; 16 Feb 2024 11:47:00 +0000 Original-Received: from localhost ([127.0.0.1]:57952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rawgG-0001C8-5K for submit@debbugs.gnu.org; Fri, 16 Feb 2024 06:47:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rawgD-0001Bv-9s for 69093@debbugs.gnu.org; Fri, 16 Feb 2024 06:46:58 -0500 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 1rawfl-00013D-7y; Fri, 16 Feb 2024 06:46:30 -0500 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=xBqfoNU50/t1pr1Py5/1wa45gtVFY2xJFG9q1bWyLx8=; b=hIJ/JA5aByTQ bdqlNCYjNPD4/0XzEk9gSp293QChdWoyzhEu2g0YPJINoXIQ5Tt+QjfKbElOoxjPRBABburNk9LQj Lh69/X3worcZ76kXAmGvnE0tzjlX7C420mv5uMSr5Jgu6YFnlhKtU3Zd4oeP4PnfNmd78RyGwrBMB HK5T80MEL6Tt8uJe4Sv1Ox3B0rK4OF5GvvNRddImpvE79rrdRPu9UHsDaxqkXt/ugeaDJSA6t/bKe 6fi2ZNC2yIEd8V/u4WTg1BlEeDVZTAzWPsquAEdoV6oGr/1DmTq91OghQzZm2aa/Ngf/UmLPH01Dz EsiriXXAUcUnujt9Nh+Zpw==; In-Reply-To: <9bc224fd-265b-42a6-9315-9e1caa9e7172@gmx.at> (bug-gnu-emacs@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:280098 Archived-At: > Cc: 69093@debbugs.gnu.org > Date: Fri, 16 Feb 2024 10:39:36 +0100 > From: martin rudalics via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > Thanks for explanations. I see this line in 'set-window-configuration': > > > > Fset_buffer (new_current_buffer); > > > > Do you think this is the right fix? > > No. I think the right fix would be to remove the above line from > 'set-window-configuration'. We can't do that because some applications > might depend on the current behavior. But I am quite confident that > nobody fully understands 'set-window-configuration' anyway and can > predict what it does when selected frame, current buffer and the buffer > and frame stored in the CONFIGURATION argument mismatch. A more worrisome aspect of such a change would be the gazillion uses of save-window-excursion. > I'd say that any code run in a state where the buffer of the selected > window and the current buffer are not the same - regardless of whether > this happens when a state/configuration is saved or restored - should > simply report an error. Some do, others don't. Still others silently correct the mismatch.