From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#69093: window-state-put doesn't update current buffer Date: Tue, 13 Feb 2024 09:39:29 +0200 Organization: LINKOV.NET Message-ID: <86il2s6cva.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22515"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: martin rudalics To: 69093@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 08:46:17 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 1rZnUe-0005ic-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 08:46:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZnUH-0007yL-EX; Tue, 13 Feb 2024 02:45:53 -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 1rZnU9-0007xr-Ge for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 02:45:45 -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 1rZnU9-0004LF-8X for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 02:45:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZnUQ-0005cR-8a; Tue, 13 Feb 2024 02:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: rudalics@gmx.at, bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69093 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: martin rudalics Original-Received: via spool by submit@debbugs.gnu.org id=B.170781032021517 (code B ref -1); Tue, 13 Feb 2024 07:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 07:45:20 +0000 Original-Received: from localhost ([127.0.0.1]:41009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZnTk-0005az-28 for submit@debbugs.gnu.org; Tue, 13 Feb 2024 02:45:20 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZnTh-0005ap-Aq for submit@debbugs.gnu.org; Tue, 13 Feb 2024 02:45:18 -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 1rZnTN-0007tq-WF for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 02:44:58 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZnTI-00046R-Hm for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 02:44:57 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id C5142E0007 for ; Tue, 13 Feb 2024 07:44:48 +0000 (UTC) X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=217.70.183.196; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:279946 Archived-At: Martin, could you help to understand what is missing in 'window-state-put' that it doesn't set the current buffer correctly like 'set-window-configuration' does. For example, here the message says that the current-buffer and point still have old values coming from the old buffer that was current before calling 'window-state-put': (let (ws) (info) (setq ws (window-state-get nil 'writable)) (quit-window) (window-state-put ws nil 'safe) (message "! %S %S %S" (point) (current-buffer) (window-buffer))) However, 'set-window-configuration' works correctly and sets the restored buffer as current: (let (wc) (info) (setq wc (current-window-configuration)) (quit-window) (set-window-configuration wc nil t) (message "! %S %S %S" (point) (current-buffer) (window-buffer)))