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#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Date: Thu, 25 Oct 2018 08:04:16 +0200 Message-ID: <5BD15CE0.7080703@gmx.at> References: <875zyrrhk8.fsf@mail.linkov.net> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> 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 1540447396 3549 195.159.176.226 (25 Oct 2018 06:03:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2018 06:03:16 +0000 (UTC) Cc: 32850@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 25 08:03:11 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 1gFYje-0000nI-4X for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Oct 2018 08:03:10 +0200 Original-Received: from localhost ([::1]:52704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFYlk-0000da-FP for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Oct 2018 02:05:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFYld-0000d5-D2 for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 02:05:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFYlX-00074W-W6 for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 02:05:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFYlS-00073I-Dd for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 02:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFYlR-0006yI-Uz for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 02:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Oct 2018 06:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32850 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32850-submit@debbugs.gnu.org id=B32850.154044747826766 (code B ref 32850); Thu, 25 Oct 2018 06:05:01 +0000 Original-Received: (at 32850) by debbugs.gnu.org; 25 Oct 2018 06:04:38 +0000 Original-Received: from localhost ([127.0.0.1]:41149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFYl4-0006xe-04 for submit@debbugs.gnu.org; Thu, 25 Oct 2018 02:04:38 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:39137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFYl1-0006xQ-Pz for 32850@debbugs.gnu.org; Thu, 25 Oct 2018 02:04:36 -0400 Original-Received: from [192.168.1.101] ([212.95.5.180]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3u86-1fPNo80Dpq-00rcRh; Thu, 25 Oct 2018 08:04:26 +0200 Original-Received: from [192.168.1.101] ([212.95.5.180]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3u86-1fPNo80Dpq-00rcRh; Thu, 25 Oct 2018 08:04:26 +0200 In-Reply-To: <87lg6map8e.fsf@mail.linkov.net> X-Provags-ID: V03:K1:r/BxNo8SCIs6OMXUEQO+TFjB2BT0xUL1y7GUPUDvw0p2UKnVooX mnHZ+PIFg8Oe2/XuM9rMEXxeR31H3M4T+TtBtXAn/oL4YpEbf3HOfXMpOBW4aKwCeF4b5JE +4e+dMaW0MGSp0o7QWN6m2/tjJv75FbnqaB8ss768oKJg5y1uQ3LVDke/UIKmBJjrP2kfzT 2qURolKeJzrXqIX7dHOJg== X-UI-Out-Filterresults: notjunk:1;V01:K0:KtleVJ61Ugw=:b01zLgGl/1tzAA3hWLX2lY DVBE7JEHJ9nYYgFbaNH1lIAvBV6t8KRkSzOZOjXHJ0Tpxwk+a42aBlE+Nc2WD3W/KOz/xpsCm njM1FbZXjh568SR5TS3pjr37B7td2AUCAZl/HY7KqD6A1xIJ4TVBYOCWupy+8/+xFfWP9g+QV /LfdWCbrNBtqtP0SpJX7revGWeuf/cBQrDrrJlWCOAuDjmz1zPf3TiFdAmxcvf7azDc6I2MU0 ANEcQKSKEVfYI3tHyXFpyu/6ohGNIkPsXvDI3iob2FyhvowVQ1Fpf29XCiLklQp3Kdpz7/QM6 B4i9/9A0b0jWzKkwJx/whl4Wvgm2ZGvPxN76GfVO41557kOisfbGIKtHITc7W/Qph4041wHVn YP1mJdM15Rfo61GQOA7r97H4Uy7xADAsQ/jRDNfnMADKamHw3CEecjf+QNcobAUi9EOUe+vvK UqOUO074XogMtj6ePEmUl6ECzrKTrdu5TliT7Z8opKM7FBk9CeMGttnwo0VQuHQLin5IUGOCj O4KmJJRPhVao4IgML/JRQj9cnRq4KO0OihsCzmC0QvMOAB0WI9UwxceZ5lAcisGGXT8ZmCNY3 zJGUV4a8vHHL9TDegxspt36HZKQKQXF5kkhPiZ7J5/2uuGH0LVseEBe1sRISU+9vAlQTbdsrB kFKcxIcQkxFDfRqV8K52Be2TwRe2pb8OH20gyf9dklg6KQShf67DaYxXxsIJNzgkFpi1ibRQg 33eVS2a2WPiFTfJOQ/MAyLEN+LZ4O2ZfQEhKvNx9RRvtlJPKscxUydgOYElIKlNBb+8uBHVw 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:151588 Archived-At: >> (save-window-excursion >> (set-window-configuration configuration) >> (window-state-get nil t)) > > Is it really a good solution for serialization of tens of window configurations? > Is such code suitable to be placed to desktop.el? Which problems do you see in practice? I have no idea about the internals of desktop. If you mean that the windows' states have to be saved too often - maybe to a backup file and as such converted from configurations to states - we can, whenever desktop is active save a configuration immediately to a state whenever it is stored somewhere. That is, add some hook when a window configuration shall be saved to a register and that register should be considered writable and saved somewhere. Is it that what you mean? > While testing without let-binding window-configuration-change-hook to nil, > window-configuration-change-hook was called 50 times, observable with: > > (add-hook 'window-configuration-change-hook > (lambda () (message "window-configuration-change-hook called"))) > > when let-bound to nil, these hooks are not called. Obviously so. The 'window-configuration-change-hook' mechanism is extraordinarily dumb. > But after let-binding window-size-change-functions to nil, > and testing with > > (add-hook 'window-size-change-functions > (lambda (_) (message "window-size-change-functions called"))) > > window-size-change-functions is still called once. > I don't understand why. 'window-size-change-functions' is called by the redisplay mechanism when it detects that at least one window has changed size. This may well happen outside the scope of the let binding. If it happens when restoring the initial configuration which should be identical to the final one, you would have to investigate: Which window changed size and why. Maybe the minibuffer window is involved. martin