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: Sun, 30 Sep 2018 23:00:52 +0300 Organization: LINKOV.NET Message-ID: <87o9cepxfv.fsf@mail.linkov.net> References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538337801 992 195.159.176.226 (30 Sep 2018 20:03:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2018 20:03:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32850@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 30 22:03:16 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 1g6hvu-00006f-Uf for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Sep 2018 22:03:15 +0200 Original-Received: from localhost ([::1]:57159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6hxy-0007VY-Kq for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Sep 2018 16:05:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6hxk-0007T3-Te for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 16:05:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6hxg-00036W-SR for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 16:05:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6hxf-00035w-QV for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 16:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6hxf-00043W-KP for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 16:05:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Sep 2018 20:05:03 +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.153833787915540 (code B ref 32850); Sun, 30 Sep 2018 20:05:03 +0000 Original-Received: (at 32850) by debbugs.gnu.org; 30 Sep 2018 20:04:39 +0000 Original-Received: from localhost ([127.0.0.1]:60282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6hxH-00042Z-8X for submit@debbugs.gnu.org; Sun, 30 Sep 2018 16:04:39 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:59734 helo=pdx1-sub0-mail-a9.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6hxF-00042S-LD for 32850@debbugs.gnu.org; Sun, 30 Sep 2018 16:04:37 -0400 Original-Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 3E00980B4E; Sun, 30 Sep 2018 13:04:37 -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=BtzdjUSxJISgb+ayEwQx76xRQm4=; b= VMxuhDfdhVS+usZFtEPkQ4kvbpW53C7fCn+hctt1d+0+RiLDjjHwCUWMuY6Z+BiL LtrNEP66yu/G9siJtjJ3zgwNdeIYgYrRGrbE1I8eBHu344OuLHDcQ5jzhPvUEE3h vXaiTDWtsZFMgjmKijm0AMopWCR2D+gEZubJM1+lIDM= Original-Received: from localhost.linkov.net (m91-129-107-184.cust.tele2.ee [91.129.107.184]) (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-a9.g.dreamhost.com (Postfix) with ESMTPSA id E2FB37E426; Sun, 30 Sep 2018 13:04:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 X-DH-BACKEND: pdx1-sub0-mail-a9 In-Reply-To: <5BB082A6.6040709@gmx.at> (martin rudalics's message of "Sun, 30 Sep 2018 10:00:38 +0200") 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:150841 Archived-At: >> Actually not to change the course of history, but keep it together with >> its window, or rather an imaginary window - when using window-swap-states, >> it looks like windows are swapped: since window's buffer is moved >> to a new location, the feeling is that the whole window is moved to >> a new place, because what defines a window is its state more than >> a location on the screen, so to not break the history of buffers >> in the window, prev/next buffers should be swapped as well, to >> keep the chain of buffers: prev-buffers - current buffer - next-buffer, >> so 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) >> will navigate in the preserved history in the same order it navigated >> in the old window location. > > Swapping the states of two windows does not swap their identities. > That is, the windows themselves remain where they are, only their > buffers change. If we changed their previous and next buffers, we > would tell a lie. And we might introduce some slight inconsistency > because the previous/next buffers of a window are no more elements of > the 'buffer-list' of their respective frames when the windows are on > different frames. I doubt that has any consequences, though ... If a window buffer is part of the window state and not window identity, then prev/next-buffers should be swapped together with the window buffer as part of the window state, and not window identity. IOW, the window buffer is inseparable from the list of prev/next-buffers. For example, in such sequences of buffers: *info*<1> *info*<2> *info*<3> *info*<4> *info*<5> prev buffers current buffer next buffers and *grep*<1> *grep*<2> *grep*<3> *grep*<4> *grep*<5> prev buffers current buffer next buffers window-swap-states currently breaks the list of related buffers, e.g. after swapping only the window buffers, but not window prev/next-buffers: *info*<1> *info*<2> *grep*<3> *info*<4> *info*<5> prev buffers current buffer next buffers and *grep*<1> *grep*<2> *info*<3> *grep*<4> *grep*<5> prev buffers current buffer next buffers 'C-x ' and 'C-x ' become broken. > So if you want this change, please provide an option say > 'window-swap-states-swap-history' and, if that is non-nil, support the > changes from your 'rotate-window-buffers'. Forget 'rotate-window-buffers', it's a bad name and I want to throw it away. What I need is for Emacs to provide a consistent behavior by default.