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#33458: 27.0.50; dired loses position when reverted from outside place Date: Tue, 25 Dec 2018 23:25:41 +0200 Organization: LINKOV.NET Message-ID: <87muotnvsa.fsf@mail.linkov.net> References: <87k1l6f9li@posteo.net> <87y38yjkqk.fsf@mail.linkov.net> <5C0E1C9D.3040106@gmx.at> <87pnu9j5lh.fsf@mail.linkov.net> <5C0F7695.1070408@gmx.at> <875zvzlgqm.fsf@mail.linkov.net> <5C10C786.3030504@gmx.at> <8736r2fhnp.fsf@mail.linkov.net> <5C12200E.8060609@gmx.at> <5C137900.7010704@gmx.at> <87r2ehro5k.fsf@mail.linkov.net> <5C175917.4010702@gmx.at> <87va3riqvm.fsf@mail.linkov.net> <5C18AFC7.40200@gmx.at> <87sgyrae4s.fsf@mail.linkov.net> <5C1CAF40.60104@gmx.at> <87imzl6tks.fsf@mail.linkov.net> <5C1F5828.3040303@gmx.at> <5C1FDCCB.1080404@gmx.at> <87o99bkdpj.fsf@mail.linkov.net> <5C2095A8.8090206@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545774014 10883 195.159.176.226 (25 Dec 2018 21:40:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2018 21:40:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33458@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 25 22:40:09 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 1gbuQr-0002jf-0C for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Dec 2018 22:40:09 +0100 Original-Received: from localhost ([127.0.0.1]:43442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbuSx-00065D-DI for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Dec 2018 16:42:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbuSl-00062c-Px for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 16:42:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbuSg-0006gy-Qc for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 16:42:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbuSg-0006gE-GC for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 16:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gbuSg-000414-CA for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 16:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Dec 2018 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33458-submit@debbugs.gnu.org id=B33458.154577411715420 (code B ref 33458); Tue, 25 Dec 2018 21:42:02 +0000 Original-Received: (at 33458) by debbugs.gnu.org; 25 Dec 2018 21:41:57 +0000 Original-Received: from localhost ([127.0.0.1]:36478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbuSb-00040d-7a for submit@debbugs.gnu.org; Tue, 25 Dec 2018 16:41:57 -0500 Original-Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:31877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbuSY-00040U-BZ for 33458@debbugs.gnu.org; Tue, 25 Dec 2018 16:41:56 -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 02CB95C2F4C; Tue, 25 Dec 2018 21:41:53 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a16.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id ABFBA5C2EFE; Tue, 25 Dec 2018 21:41:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a16.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); Tue, 25 Dec 2018 21:41:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Skirt-Glossy: 725f0ac50f9b5322_1545774112844_2489916398 X-MC-Loop-Signature: 1545774112844:223914030 X-MC-Ingress-Time: 1545774112843 Original-Received: from pdx1-sub0-mail-a16.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a16.g.dreamhost.com (Postfix) with ESMTP id 620447F91D; Tue, 25 Dec 2018 13:41:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=GCCQeZHUWPVbJZqb5VA3vWJbuwo=; b= YLulAE9m715UyNRyzHuaLgkp6nDEVbsoDvHBCVKbhCLWgwky+oKB9XlwEGSKZ7cD Pjwa6mhqwopoj80g8QaqAgNO+U4GJXinA/KAR/H7fixpoqyE/Xtn2/uA3kaeAFEv 4yiT7myrl90pJ/ndjRwi3w0QUHJk+UrO8cwvVJzWP4I= Original-Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193]) (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-a16.g.dreamhost.com (Postfix) with ESMTPSA id F3C3F7F937; Tue, 25 Dec 2018 13:41:50 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a16 In-Reply-To: <5C2095A8.8090206@gmx.at> (martin rudalics's message of "Mon, 24 Dec 2018 09:15:36 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudekfedgudehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuffhomhgrihhnpehgihhtlhgrsgdrtghomhenucfkphepledurdduvdelrddutdekrdduleefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtkedrudelfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd 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:153845 Archived-At: >> Thanks, but I expected it to be more configurable, i.e. to also look >> at prev/next-buffers in a saved configuration when needed, etc. > > We can easily do that. But note that a window's previous and next > buffers are stored in the window itself (where, if the window is live, > they can change at any time) and not in the window copy stored in the > configuration. Oh, I see now why this case fails: (let ((_ (view-emacs-todo)) (w-c (current-window-configuration))) (view-emacs-news) (set-window-configuration w-c) (previous-buffer)) I expected it not to change prev/next buffers of the window saved in the window configuration, so the expectation for the last call to 'previous-buffer' was to return from the TODO buffer to the original buffer *scratch*. But since the NEWS buffer meddled with the same window, this is not the case. This is why any code that saves window configurations has to care about creating a new window after the current-window-configuration call (thus removing the window saved in the window configuration), like I fixed now in https://gitlab.com/link0ff/emacs-wincows/commit/226cf229 >> This could be achieved with a complete export of the saved >> configuration to a Lisp structure. > > It's a bit tedious to code but can be certainly done. But I suppose > that what might then interest you just as well is to transform window > states into window configurations ;-) Indeed, this would simplify many things.