bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33532: 26.1; set-window-configuration does not restore display start


From: martin rudalics
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]