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: Fri, 30 Nov 2018 18:47:30 +0100 Message-ID: <5C0177B2.4030803@gmx.at> References: <87efb62mt2.fsf@metalevel.at> <83o9a9g0ui.fsf@gnu.org> <877egxyvje.fsf@metalevel.at> <5BFFA3FB.4060603@gmx.at> <8736rj4uxg.fsf@metalevel.at> <5C0039D0.2090309@gmx.at> <877eguqz7k.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 1543599971 8715 195.159.176.226 (30 Nov 2018 17:46:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2018 17:46:11 +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 Fri Nov 30 18:46:06 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 1gSmrc-000284-Ew for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2018 18:46:04 +0100 Original-Received: from localhost ([::1]:34014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSmti-0008M3-Qq for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2018 12:48:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSmta-0008He-S0 for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 12:48:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSmtW-00058s-Sa for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 12:48:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSmtW-00058g-Og for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 12:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gSmtW-0003MV-IU for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 12:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Nov 2018 17:48: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.154360007112906 (code B ref 33532); Fri, 30 Nov 2018 17:48:02 +0000 Original-Received: (at 33532) by debbugs.gnu.org; 30 Nov 2018 17:47:51 +0000 Original-Received: from localhost ([127.0.0.1]:56629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSmtL-0003M6-BX for submit@debbugs.gnu.org; Fri, 30 Nov 2018 12:47:51 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:55929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSmtJ-0003Lq-1n for 33532@debbugs.gnu.org; Fri, 30 Nov 2018 12:47:49 -0500 Original-Received: from [192.168.1.101] ([212.95.5.107]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lt1S6-1hVApv04WQ-012ZTc; Fri, 30 Nov 2018 18:47:37 +0100 In-Reply-To: <877eguqz7k.fsf@metalevel.at> X-Provags-ID: V03:K1:nWdV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o5eZ 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:152939 Archived-At: > Perfect! This is what I need also for current-window-configuration! > Also, could this be made the default? Or is there some advantage in > using markers instead of the actual positions that can be restored? First of all we need a "reasonable" use case. The only purpose of a form like (let ((str (with-current-buffer buf (buffer-string)))) (with-current-buffer buf (erase-buffer) (insert str))) is to annihilate all marker positions in buf and I have yet to understand why that could be useful. I'm sure you have something more reasonable in mind. Once we have such a use case we can decide how to best support it. AFAICT Emacs' window configurations use window start and point markers ever since. And while they interfere with reverting buffers (see Bug#33458 for a discussion) turning them into pure positions would break far too many things as to make that the default. We could store - in configurations and states - both, markers and their corresponding pure positions. Then if, when restoring a configuration or state, a marker's position has dropped to 1 while the corresponding saved pure position is > 1, use the the pure position instead. This should automatically fix your case and not violate any others. Juri what do you think? martin