all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33533: 26.1; set-window-configuration does not restore display start
@ 2018-11-27 22:05 Markus Triska
  0 siblings, 0 replies; only message in thread
From: Markus Triska @ 2018-11-27 22:05 UTC (permalink / raw)
  To: 33533


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)






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-27 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-27 22:05 bug#33533: 26.1; set-window-configuration does not restore display start Markus Triska

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.