From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#33532: 26.1; set-window-configuration does not restore display start Date: Tue, 27 Nov 2018 23:11:21 +0100 Message-ID: <87efb62mt2.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1543356608 30200 195.159.176.226 (27 Nov 2018 22:10:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 22:10:08 +0000 (UTC) To: 33532@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 27 23:10:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRlYR-0007ju-Gw for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Nov 2018 23:10:03 +0100 Original-Received: from localhost ([::1]:44792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRlaX-0005Gi-7z for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Nov 2018 17:12:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRlaP-0005GY-Mw for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:12:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRlaM-0007fR-Ij for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:12:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRlaM-0007fL-Fz for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRlaM-0007cV-7q for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Nov 2018 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33532 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154335669529257 (code B ref -1); Tue, 27 Nov 2018 22:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Nov 2018 22:11:35 +0000 Original-Received: from localhost ([127.0.0.1]:52578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRlZv-0007bp-DK for submit@debbugs.gnu.org; Tue, 27 Nov 2018 17:11:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRlZt-0007bc-Od for submit@debbugs.gnu.org; Tue, 27 Nov 2018 17:11:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRlZn-0007RR-Pl for submit@debbugs.gnu.org; Tue, 27 Nov 2018 17:11:28 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRlZn-0007RL-N9 for submit@debbugs.gnu.org; Tue, 27 Nov 2018 17:11:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRlZm-0005EM-Ui for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:11:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRlZj-0007P3-RY for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:11:26 -0500 Original-Received: from metalevel.at ([78.46.218.83]:50650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRlZj-0007O7-Jn for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 17:11:23 -0500 Original-Received: from debian (localhost.localdomain [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id B128CA2AE0 for ; Tue, 27 Nov 2018 23:11:21 +0100 (CET) Original-Received: by debian (Postfix, from userid 1000) id 6A1CDE369E; Tue, 27 Nov 2018 23:11:21 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152832 Archived-At: 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)