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: Markus Triska
Subject: bug#33532: 26.1; set-window-configuration does not restore display start
Date: Tue, 27 Nov 2018 23:11:21 +0100

In "emacs -Q", please evaluate the following form:

    (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 (current-window-configuration))
            (ws (window-start))
            (str (with-current-buffer buf (buffer-string))))
        (with-current-buffer buf
          (erase-buffer)
          (insert str))
        (set-window-configuration conf)
        (sit-for 1)
        (message "window-start: %s vs. %s" ws (window-start))))

This shows that after set-window-configuration, even though the buffer
content is the same as at the time the configuration was obtained, the
value of (window-start) differs from before: After the window
configuration is set, (window-start) is 1. I expect it to be 50 (i.e.,
the value at the time the configuration was obtained), because the
documentation of current-window-configuration states:

    This describes ... for each ... buffer, where display starts ...

If possible, could you please consider restoring window-start to the
exact same position? Thank you very much!

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2018-11-18 built on debian
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:     Debian GNU/Linux 9.6 (stretch)







reply via email to

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