From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#33532: 26.1; set-window-configuration does not restore display start Date: Thu, 29 Nov 2018 09:31:55 +0100 Message-ID: <5BFFA3FB.4060603@gmx.at> References: <87efb62mt2.fsf@metalevel.at> <83o9a9g0ui.fsf@gnu.org> <877egxyvje.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1543480275 4989 195.159.176.226 (29 Nov 2018 08:31:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2018 08:31:15 +0000 (UTC) Cc: 33532@debbugs.gnu.org To: Markus Triska , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 09:31:10 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 1gSHj1-00016e-Fa for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 09:31:07 +0100 Original-Received: from localhost ([::1]:52821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSHl7-0003tC-Gt for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 03:33:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSHkv-0003gM-Rb for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:33:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSHks-0005I2-9s for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:33:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSHkr-0005H9-V0 for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gSHkr-00086p-Rs for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Nov 2018 08:33:01 +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.154348033131097 (code B ref 33532); Thu, 29 Nov 2018 08:33:01 +0000 Original-Received: (at 33532) by debbugs.gnu.org; 29 Nov 2018 08:32:11 +0000 Original-Received: from localhost ([127.0.0.1]:54061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHk3-00085U-5e for submit@debbugs.gnu.org; Thu, 29 Nov 2018 03:32:11 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:56143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHk1-00084v-C4 for 33532@debbugs.gnu.org; Thu, 29 Nov 2018 03:32:09 -0500 Original-Received: from [192.168.1.101] ([213.162.73.80]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lt1S6-1fPqcz0Hhy-012ZRU; Thu, 29 Nov 2018 09:32:03 +0100 In-Reply-To: <877egxyvje.fsf@metalevel.at> X-Provags-ID: V03:K1:YLbIZB45o2zeX9/s6HhOPDjelQVNIWu/88R5KEl1sM+194VULYI DFU3elV+Yiw2FGjkAULEhcWXNsShHVzDk2GJm/LISMaWhDYaUE40iJjpAQfVwYbtk8Me8gd d7hkCiQ6J/4N1Ffsc3jNFOq2JEN1l8NmA+yIrmqI1CK5B1mbf2CMVilst0k2YvrWWTVhyHI 9vNJIxIBuw1QWLH5kp2LA== X-UI-Out-Filterresults: notjunk:1;V03:K0:IluSA+Wggcs=:3miNSGq1VhLBWJZUtGO7UP hCZ+HaRXUvv5yAIu3WVAzrVhMJr7sL+nnzn5gAV0XNHzMidIb8ont0TF6dRL57ElU1MuQb8a4 38PAeXwOqe+chrzyS3jkn0tMKH4oD6nXdTdfoZQ2V1ri0814Wb8PbOU1hNWgs3bwy5G5AihYL oUWzd/0VE20fq3Ggl5uqsGTrl2QWEi/49DzuwUn/nlyjTgUIoVskm36sMGm9jSj5dS2Ms9ZJP /yz041oGup4IPnkPs1pMMyMLigVyQXF9nMpiOR+6y4eTc/BlsQYfH+cY610tu5mQQWBcvlWSf ynt6pvstigzPY+4MMtt0KxPO6/z6Q0R928CpKkSUTOcZe4BNzdIlWQo0rEquj5i16NllVBg0Z isEtFa3XVuEOgPHFRytW0Teh8BDd7/x77q3n8xJyCWxTraB05HqDoBqh0SxI925adriKrqKtA Kz5QtiwsTeFgUe1JzeLgqX1tHBLJQ1/AxdvdfvJggpsrEMqxB02jTO4r9H1Fu0xuLjGr9dTts WUf5kI7z8ycvjc3IHvD/JJjNd1SgCMWNzokSrLPh/lwXGvN7bJbAFBdeLEyTdTxPM4ZNHOsfC hwuCv9zoDJ4APTi8aQgCzvvUsbhFxx+/K+s1fgM0AwoecNQwWzMvHiRm4FOQlhDF5ANi6a7Xc DuPBthdoQUODTTmq7vBf0IKcwjbKgkAm1pC7sGKYwodtM83UaW0PI7LhAzg7VSXYnc/MMvs1P jdbqPkbgAnYtsQS9bMdBG0tW++GuRCWIGHqIyyBG1+x/E7ChcZLgEJjlv4PIIA6lSdzsuNba 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:152884 Archived-At: > 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 ... But the whole text is In order to store a window configuration on disk and read it back in another Emacs session, you can use the functions described next. and the functions mentioned there are `window-state-get' and `window-state-put'. So you have to tell us what you want to fix: The behavior of window configurations throughout one and the same Emacs session (which uses markers to restore positions) or when restoring a previous session (which relies on positions only). > In such use cases, I want to restore the exact same text in all buffers, What is "to restore the exact same text in all buffers"? The text at the time the configuration was stored in a register? That one might not be available any more. Restoring a window configuration (or state) can only use the buffer text as is and adjust positions accordingly. > and then restore the window configuration, including display starts. > > 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, I suppose you mean "kill all buffers" here. This will implicitly make the window start and point positions of any window that showed the buffer previously and is stored in a configuration to point nowhere. Furthermore, there is no guarantee that the same buffer will be shown in that window when the configuration is restored. > 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. If you use window states instead of configurations then this should work. States store positions instead of markers. > 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? Emacs tries its best to do that. But killing and reverting buffers, among other operations, can defy such attempts. So you either should try 'window-state-get' and 'window-state-put' to do what you want or save any positions separately before killing buffers and restore them together with their buffers after restoring a configuration. martin