GNU bug report logs - #69093
window-state-put doesn't update current buffer

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 13 Feb 2024 07:46:02 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: window-state-put doesn't update current buffer
Date: Tue, 13 Feb 2024 09:39:29 +0200
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)))




This bug report was last modified 1 year and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.