From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33532: 26.1; set-window-configuration does not restore display start Date: Mon, 03 Dec 2018 02:52:53 +0200 Organization: LINKOV.NET Message-ID: <87ftvftoaq.fsf@mail.linkov.net> 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> <5C0177B2.4030803@gmx.at> <87va4cdfll.fsf@mail.linkov.net> <5C03991F.8030204@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1543800436 11774 195.159.176.226 (3 Dec 2018 01:27:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2018 01:27:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33532@debbugs.gnu.org, Markus Triska To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 03 02:27:12 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 1gTd0w-0002vP-Pc for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 02:27:11 +0100 Original-Received: from localhost ([::1]:46364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTd33-0006My-CB for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2018 20:29:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTd2s-0006Me-KR for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2018 20:29:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTd2m-0002Gx-N2 for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2018 20:29:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54296) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTd2l-0002Fm-GX for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2018 20:29:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTd2l-0005C8-BK for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2018 20:29:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Dec 2018 01:29:03 +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.154380054019937 (code B ref 33532); Mon, 03 Dec 2018 01:29:03 +0000 Original-Received: (at 33532) by debbugs.gnu.org; 3 Dec 2018 01:29:00 +0000 Original-Received: from localhost ([127.0.0.1]:58551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTd2i-0005BV-2D for submit@debbugs.gnu.org; Sun, 02 Dec 2018 20:29:00 -0500 Original-Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:5290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTd2g-0005BG-Iy for 33532@debbugs.gnu.org; Sun, 02 Dec 2018 20:28:59 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A99FB2821CB; Mon, 3 Dec 2018 01:28:57 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 482D3282838; Mon, 3 Dec 2018 01:28:57 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Mon, 03 Dec 2018 01:28:57 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arch-Gusty: 513aef9c1351d9de_1543800537530_4089281604 X-MC-Loop-Signature: 1543800537530:1423652936 X-MC-Ingress-Time: 1543800537529 Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 0E8CE80248; Sun, 2 Dec 2018 17:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jurta.org; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=jurta.org; bh=d50U5/AUFZDt8HoZ3x5QvUQ6zZs=; b=P qHzgqLKPHLUhF3FrGDCe5p3ZPZqWjjEAW/a7i1jvOdFdXmwScHq2BXq2czX+KWNg aNt7FHFHsr8ViIHVNAqMCfNnFgCSws8g3MWxQW++DR1kYi1HchNgn1KSc+RY9zMg FBdFnipblI6ysFGXeeQUO4UumwGvMSNcFgGui9JU14= Original-Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTPSA id DCF288023F; Sun, 2 Dec 2018 17:28:53 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 In-Reply-To: <5C03991F.8030204@gmx.at> (martin rudalics's message of "Sun, 02 Dec 2018 09:34:39 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeftddgtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhrihesjhhurhhtrgdrohhrgheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehjuhhrthgrrdhorhhgqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd 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:153012 Archived-At: >>> 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? >> >> I see no drawbacks, let's try storing both (maybe together with >> metadata like dired-filename). > > It will fail when a window is stowed away in a list or configuration > and the entire stretch of the buffer from 'point-min' up to some > position at or after the stored point position is deleted. In that > case, the point of any window showing the buffer should rightfully > drop to 'point-min' but in our case it would go to the old position > when the buffer is re-shown in the window. While this might be a rare > use case, it would be confusing nevertheless. I still think the problem is in markers dropping to 'point-min'. Shouldn't a marker remember its previous position as a number and try to restore it when this position becomes available again?