From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33532: 26.1; set-window-configuration does not restore display start Date: Wed, 28 Nov 2018 19:41:56 +0200 Message-ID: <83sgzldrq3.fsf@gnu.org> References: <87efb62mt2.fsf@metalevel.at> <83o9a9g0ui.fsf@gnu.org> <877egxyvje.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1543427323 22493 195.159.176.226 (28 Nov 2018 17:48:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2018 17:48:43 +0000 (UTC) Cc: 33532@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 18:48:39 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 1gS3wz-0005hk-Qh for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 18:48:37 +0100 Original-Received: from localhost ([::1]:49276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS3z6-0003OM-A0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 12:50:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS3wh-0000wT-MP for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 12:48:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gS3qc-0007XI-Ne for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 12:42:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49468) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gS3qc-0007Wj-Jk for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 12:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gS3qc-0004Bu-EE for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 12:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Nov 2018 17:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33532 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33532-submit@debbugs.gnu.org id=B33532.154342691816099 (code B ref 33532); Wed, 28 Nov 2018 17:42:02 +0000 Original-Received: (at 33532) by debbugs.gnu.org; 28 Nov 2018 17:41:58 +0000 Original-Received: from localhost ([127.0.0.1]:53726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gS3qY-0004Bb-AO for submit@debbugs.gnu.org; Wed, 28 Nov 2018 12:41:58 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gS3qW-0004BN-NP for 33532@debbugs.gnu.org; Wed, 28 Nov 2018 12:41:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gS3qN-0006zl-88 for 33532@debbugs.gnu.org; Wed, 28 Nov 2018 12:41:51 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS3qM-0006vZ-9q; Wed, 28 Nov 2018 12:41:46 -0500 Original-Received: from [176.228.60.248] (port=3411 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gS3qL-0003zR-5G; Wed, 28 Nov 2018 12:41:46 -0500 In-reply-to: <877egxyvje.fsf@metalevel.at> (message from Markus Triska on Wed, 28 Nov 2018 18:13:57 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:152863 Archived-At: > From: Markus Triska > Cc: 33532@debbugs.gnu.org > Date: Wed, 28 Nov 2018 18:13:57 +0100 > > Eli Zaretskii writes: > > > How important is the use case of replacing buffer text with identical > > text? Because replacing with a different text will make preserving > > window-start position based on its numerical value not really a > > sensible thing, would it? It could even be impossible, e.g. if the > > same position happens to be in the middle of a sequence of composed > > characters. > > Please consider a use case that is described in the Emacs manual: > > In order to store a window configuration on disk and > read it back in another Emacs session ... > > In such use cases, I want to restore the exact same text in all buffers, > and then restore the window configuration, including display starts. Please propose how to do that. If it can be done ion a useful manner, I don't see why we shouldn't. > In fact, the snippet illustrates an even simpler situation: It stores > the configuration in a variable, and the session keeps running. I would > like to obtain the configuration, then close all buffers, and later > restore their contents (for example, from files), and then use > set-window-configuration to restore the original window configuration, > including all window-starts. Well, you get everything _excluding_ the window-start. I think it's still a bargain. > Could set-window-configuration be generalized to reliably restore the > window-starts also in such cases? If not, please consider adjusting the > documentation to make clear what this actually guarantees. In > particular, when are window-starts reliably restored, and when not? As long as the buffer text exists, you will get the best approximation to restoring window-start.