GNU bug report logs - #33532
26.1; set-window-configuration does not restore display start

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Tue, 27 Nov 2018 22:12:02 UTC

Severity: normal

Merged with 33533

Found in version 26.1

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Markus Triska <triska <at> metalevel.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 33532 <at> debbugs.gnu.org
Subject: bug#33532: 26.1; set-window-configuration does not restore display start
Date: Thu, 29 Nov 2018 20:11:12 +0100
> These functions have an analogous issue, which you can see with:
>
>      (let ((buf (get-buffer-create "buf")))
>        (switch-to-buffer buf)
>        (erase-buffer)
>        (dotimes (x 10)
>          (insert (format "x is %s\n" x)))
>        (recenter 3)
>        (sit-for 1)
>        (let ((conf (window-state-get))
>              (ws (window-start))
>              (str (with-current-buffer buf (buffer-string))))
>          (with-current-buffer buf
>            (erase-buffer)
>            (insert str))
>          (window-state-put conf)
>          (sit-for 1)
>          (message "window-start: %s vs. %s" ws (window-start))))

You have to call 'window-state-get' with the WRITABLE argument
non-nil, like (window-state-get nil t).  Otherwise, it gets you
markers just like 'current-window-configuration'.

Note that I did not disregard the remainder of your mail but please
let's continue the discussion after you tried my suggestion.

Thanks, martin




This bug report was last modified 6 years and 174 days ago.

Previous Next


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