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: Mon, 03 Dec 2018 08:45:38 +0100 Message-ID: <5C04DF22.3030100@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> <5C0177B2.4030803@gmx.at> <87va4cdfll.fsf@mail.linkov.net> <5C03991F.8030204@gmx.at> <87ftvftoaq.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040406070109030707050004" X-Trace: blaine.gmane.org 1543823062 15712 195.159.176.226 (3 Dec 2018 07:44:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2018 07:44:22 +0000 (UTC) Cc: 33532@debbugs.gnu.org, Markus Triska To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 03 08:44:18 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 1gTitu-0003xp-0u for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 08:44:18 +0100 Original-Received: from localhost ([::1]:47215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTiw0-0002ib-LX for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 02:46:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTive-0002ZJ-3X for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 02:46:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTiva-0005s8-RC for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 02:46:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54409) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTiva-0005s0-HT for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 02:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTiva-0007qY-EJ for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 02:46: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: Mon, 03 Dec 2018 07:46: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.154382315530135 (code B ref 33532); Mon, 03 Dec 2018 07:46:02 +0000 Original-Received: (at 33532) by debbugs.gnu.org; 3 Dec 2018 07:45:55 +0000 Original-Received: from localhost ([127.0.0.1]:58666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTivS-0007pz-Kd for submit@debbugs.gnu.org; Mon, 03 Dec 2018 02:45:54 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:51367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTivQ-0007pm-Ql for 33532@debbugs.gnu.org; Mon, 03 Dec 2018 02:45:53 -0500 Original-Received: from [192.168.1.101] ([46.125.250.96]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAhWl-1gfZPw1byN-00Bve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foPS9AG71UMRuvjiOb85viN8p BRywHgAilj26EsScq/Bs7v8SfBwUYAubYltjPx4ZBmndq062aHh7b9gJ3ERJl2PWR2Nz/N+Y 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:153019 Archived-At: This is a multi-part message in MIME format. --------------040406070109030707050004 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > I still think the problem is in markers dropping to 'point-min'. Due to the buffer erasing part when reverting the buffer. > Shouldn't a marker remember its previous position as a number > and try to restore it when this position becomes available again? I think that Stefan's approach to restore windows' point markers does that in a more sophisticated way. I'll attach a patch. But that patch does not address window configurations and states - simply because it can't access them. We need a different solution for those. And it obviously does not handle non-default reverters like 'dired'. martin --------------040406070109030707050004 Content-Type: text/plain; charset=windows-1252; name="fileio.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="fileio.diff" ZGlmZiAtLWdpdCBhL3NyYy9maWxlaW8uYyBiL3NyYy9maWxlaW8uYwppbmRleCBkOTc5NTcx Li5jNWMyOTVlIDEwMDY0NAotLS0gYS9zcmMvZmlsZWlvLmMKKysrIGIvc3JjL2ZpbGVpby5j CkBAIC0zNTEzLDIzICszNTEzLDc4IEBAIENPTlRFWFQgc2hvdWxkIGJlIGEgbGlzdCAoVVNF UiBST0xFIFRZUEUgUkFOR0UpLCB3aGVyZSB0aGUgbGlzdAogc3RhdGljIExpc3BfT2JqZWN0 CiBnZXRfd2luZG93X3BvaW50c19hbmRfbWFya2VycyAod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KSk7CisJc3RydWN0 IHdpbmRvdyAqdyA9IFhXSU5ET1cgKHdpbmRvdyk7CisJTGlzcF9PYmplY3QgcHJldl9idWZm ZXJzID0gdy0+cHJldl9idWZmZXJzOworCUxpc3BfT2JqZWN0IG5leHRfYnVmZmVycyA9IHct Pm5leHRfYnVmZmVyczsKKworCS8qIExvb2sgYXQgd2luZG93J3MgYnVmZmVyIGZpcnN0LiAg Ki8KKwlpZiAoRVEgKFdJTkRPV19CVUZGRVIgKHcpLCBidWZmZXIpKQorCSAgeworCSAgICBM aXNwX09iamVjdCB3aW5kb3dfbWFya2VyID0gWFdJTkRPVyAoWENBUiAod2luZG93cykpLT5w b2ludG07CisKKwkgICAgd2luZG93X21hcmtlcnMgPQorCSAgICAgIEZjb25zIChGY29ucyAo d2luZG93X21hcmtlciwgRm1hcmtlcl9wb3NpdGlvbiAod2luZG93X21hcmtlcikpLAorCQkg ICAgIHdpbmRvd19tYXJrZXJzKTsKKworCSAgICAvKiBTa2lwIHRoZSBsaXN0cyBvZiBwcmV2 aW91cyBhbmQgbmV4dCBidWZmZXJzLiAgKi8KKwkgICAgY29udGludWU7CisJICB9CisKKwkv KiBTY2FuIHdpbmRvdydzIHByZXZpb3VzIGJ1ZmZlcnMuICAqLworCWZvciAoOyBDT05TUCAo cHJldl9idWZmZXJzKTsgcHJldl9idWZmZXJzID0gWENEUiAocHJldl9idWZmZXJzKSkKKwkg IGlmIChDT05TUCAoWENBUiAocHJldl9idWZmZXJzKSkpCisJICAgIHsKKwkgICAgICBMaXNw X09iamVjdCB0cmlwbGUgPSBYQ0FSIChwcmV2X2J1ZmZlcnMpOworCisJICAgICAgaWYgKEVR IChYQ0FSICh0cmlwbGUpLCBidWZmZXIpKQorCQl7CisJCSAgTGlzcF9PYmplY3QgcHJldl9t YXJrZXIgPSBGbnRoIChtYWtlX2ZpeG51bSAoMiksIHRyaXBsZSk7CisKKwkJICB3aW5kb3df bWFya2VycyA9CisJCSAgICBGY29ucyAoRmNvbnMgKHByZXZfbWFya2VyLCBGbWFya2VyX3Bv c2l0aW9uIChwcmV2X21hcmtlcikpLAorCQkJICAgd2luZG93X21hcmtlcnMpOworCisJCSAg LyogU2tpcCB0aGUgbGlzdCBvZiB3aW5kb3cncyBuZXh0IGJ1ZmZlcnMuICAqLworCQkgIGNv bnRpbnVlOworCQl9CisJICAgIH0KKworCS8qIFNjYW4gd2luZG93J3MgbmV4dCBidWZmZXJz LiAgKi8KKwlmb3IgKDsgQ09OU1AgKG5leHRfYnVmZmVycyk7IG5leHRfYnVmZmVycyA9IFhD RFIgKG5leHRfYnVmZmVycykpCisJICBpZiAoQ09OU1AgKFhDQVIgKG5leHRfYnVmZmVycykp KQorCSAgICB7CisJICAgICAgTGlzcF9PYmplY3QgdHJpcGxlID0gWENBUiAobmV4dF9idWZm ZXJzKTsKKworCSAgICAgIGlmIChFUSAoWENBUiAodHJpcGxlKSwgYnVmZmVyKSkKKwkJewor CQkgIExpc3BfT2JqZWN0IG5leHRfbWFya2VyID0gRm50aCAobWFrZV9maXhudW0gKDIpLCB0 cmlwbGUpOworCisJCSAgd2luZG93X21hcmtlcnMgPQorCQkgICAgRmNvbnMgKEZjb25zIChu ZXh0X21hcmtlciwgRm1hcmtlcl9wb3NpdGlvbiAobmV4dF9tYXJrZXIpKSwKKwkJCSAgIHdp bmRvd19tYXJrZXJzKTsKKwkJfQorCSAgICB9CiAgICAgICB9CisKICAgcmV0dXJuIEZjb25z IChGY29ucyAocHRfbWFya2VyLCBGcG9pbnQgKCkpLCB3aW5kb3dfbWFya2Vycyk7CiB9CiAK QEAgLTM1NDMsNiArMzU5OCw3IEBAIENPTlRFWFQgc2hvdWxkIGJlIGEgbGlzdCAoVVNFUiBS T0xFIFRZUEUgUkFOR0UpLCB3aGVyZSB0aGUgbGlzdAogCUxpc3BfT2JqZWN0IGNhciA9IFhD QVIgKHdpbmRvd19tYXJrZXJzKTsKIAlMaXNwX09iamVjdCBtYXJrZXIgPSBYQ0FSIChjYXIp OwogCUx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