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#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Date: Wed, 17 Oct 2018 01:37:03 +0300 Organization: LINKOV.NET Message-ID: <8736t57jcs.fsf@mail.linkov.net> References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1539729469 19720 195.159.176.226 (16 Oct 2018 22:37:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2018 22:37:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32850-done@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 17 00:37:45 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 1gCXy7-0004wO-Vw for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Oct 2018 00:37:45 +0200 Original-Received: from localhost ([::1]:60451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCY0E-0007mi-2o for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Oct 2018 18:39:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCXzY-0007LX-9a for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:39:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCXzT-0006az-NI for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:39:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCXzT-0006Zd-Em for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCXzT-0006Jv-AT for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 18:39:03 -0400 Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Oct 2018 22:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 32850 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 32850@debbugs.gnu.org, juri@linkov.net, juri@linkov.net Original-Received: via spool by 32850-done@debbugs.gnu.org id=D32850.153972952724245 (code D ref 32850); Tue, 16 Oct 2018 22:39:03 +0000 Original-Received: (at 32850-done) by debbugs.gnu.org; 16 Oct 2018 22:38:47 +0000 Original-Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXzD-0006Iy-0j for submit@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:47 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:38694 helo=pdx1-sub0-mail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXzA-0006Io-Iu for 32850-done@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:44 -0400 Original-Received: from pdx1-sub0-mail-a7.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTP id 14E567F687; Tue, 16 Oct 2018 15:38:44 -0700 (PDT) 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=vBYnMc9xAbu7COHg6atC9fIHYsQ=; b= mrFhxyKxYTKVT3hJZggS/Xf1b8CFUsN0lF0ex5mh6ZwsHYWaBvVZFd9hQ2Z0obpO 3AbXeZvD6vbaAh6/33V3KQEu4HTzk8nRdrz2Ygs8U6/ITMKqmbg0cGEDn3bqe4YL 6nGKPxG+t8vJYNWOSsh8hqskkR1aRgXdhTlUHyNmfSs= Original-Received: from localhost.linkov.net (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a7.g.dreamhost.com (Postfix) with ESMTPSA id 017177F688; Tue, 16 Oct 2018 15:38:42 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a7 In-Reply-To: <5BC5A536.7020603@gmx.at> (martin rudalics's message of "Tue, 16 Oct 2018 10:45:42 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfedugdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu 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:151326 Archived-At: > But if you are sure that it won't harm anyone to make it unconditional > leave it well alone. We can always add a customization later if > someone needs it. Personally, I don't care. I'd like to make it customizable by using the existing customization in the arg WRITABLE of window-state-get and window-persistent-parameters, even though formally prev/next-buffers is not a window parameter (maybe it should be, I don't know). >> This patch handles killed buffers, so it works for desktop saving as well >> (because the desktop restores the frameset only after it reads all buffers): > > Please install so we can see whether there are any problems (in > particular with the desktop which I don't use). Done, with a small change: even though set-marker is idempotent in regard to its POSITION arg (i.e. if POSITION is a marker, it creates an identical marker), I added a check to not create a new one. OTOH, get-buffer is idempotent too, but it seems window-state-put never receives a structure with buffer objects, and I'm not sure why window-state-get should always use buffer-name regardless of the value WRITABLE, i.e. why should it return buffer names as strings instead of buffer objects even when WRITABLE is nil?