GNU bug report logs - #13167
24.3.50; C-x right C-x left interferes with buffer order

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Juri Linkov <juri@HIDDEN>; dated Thu, 13 Dec 2012 00:03:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 23 Dec 2012 14:04:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 23 09:04:03 2012
Received: from localhost ([127.0.0.1]:56307 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tmm9r-0006Pu-A9
	for submit <at> debbugs.gnu.org; Sun, 23 Dec 2012 09:04:03 -0500
Received: from mout.gmx.net ([212.227.17.21]:61137)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1Tmm9o-0006PU-HK
	for 13167 <at> debbugs.gnu.org; Sun, 23 Dec 2012 09:04:02 -0500
Received: from mailout-de.gmx.net ([10.1.76.1]) by mrigmx.server.lan
	(mrigmx001) with ESMTP (Nemesis) id 0Lb72N-1TOSsh2lGT-00kg6i for
	<13167 <at> debbugs.gnu.org>; Sun, 23 Dec 2012 15:03:34 +0100
Received: (qmail invoked by alias); 23 Dec 2012 14:03:34 -0000
Received: from 62-47-62-46.adsl.highway.telekom.at (EHLO [62.47.62.46])
	[62.47.62.46]
	by mail.gmx.net (mp001) with SMTP; 23 Dec 2012 15:03:34 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX1+bj40/DZGbK4Pye+6k+YXSFNnseQshYUrfP/8Wl6
	unT/zLwBpv/4RS
Message-ID: <50D70F2D.9050000@HIDDEN>
Date: Sun, 23 Dec 2012 15:03:25 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
	<50C9AE21.40904@HIDDEN>	<8738z9ea1w.fsf@HIDDEN>
	<50CAFE8F.2060903@HIDDEN>	<87bodv1t0j.fsf@HIDDEN>
	<50CCBC3D.3010504@HIDDEN>	<87txrmmzk5.fsf@HIDDEN>
	<50CE0EFD.3010505@HIDDEN>	<87a9tdyqak.fsf@HIDDEN>
	<87fw35vvzf.fsf@HIDDEN>	<50CF205A.50004@HIDDEN>
	<8738yy77gx.fsf@HIDDEN>	<50D5D4C4.9090404@HIDDEN>
	<87pq21drau.fsf@HIDDEN>
In-Reply-To: <87pq21drau.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

 > I don't see something analogous in browsers too, but in Emacs
 > for frame-local buffer lists, burying implies a ring structure
 > (a circular list) where popping the first buffer from the top of
 > the ring pushes it to the bottom.  It seems that reported problems are
 > caused by the fact that window-local buffers don't form a circular ring.

A circular ring doesn't work here.  When I create a new window I have to
feed `switch-to-prev-buffer' and `switch-to-next-buffer' with the
buffers from the frame's and/or the global buffer list.  That's what
users expect from the old behavior which IIRC used `other-buffer' for
this purpose.  And I have to continue to do that whenever I'm at the end
of the lists of a window's previous and next buffers.

 > Firefox's TabMixPlus provides 6 options to focus
 > after closing the current tab:
 >
 > 1. First tab
 > 2. Left tab
 > 3. Right tab
 > 4. Last tab
 > 5. Opener/right tab
 > 6. Last opened tab
 >
 > Currently `q' in Emacs performs the option 3 "Right tab" that means
 > to restore the last buffer in the list of previous buffer (or maybe it's
 > the option 6 "Last opened tab"?).

I think it's 6 which is the only navigation-sensitive option.

All other options remember only the creation time of tabs and disregard
navigation.

 > But I believe that more useful would be
 > the option 5 "Opener/right tab" where Opener means the buffer that
 > initially displayed the current buffer, so `q' should restore it.
 > If you disagree then maybe this should be configurable in Emacs?

This might be a good idea.  BTW I'm using option 5 on Firefox and at
least 20 times a day I'm profoundly unhappy with it.  I already wonder
whether the behavior I'd prefer is "Opener/Last opened tab".

But it's not easy to compare Firefox tabs to our windows' buffer lists.
In particular when you open links in the background like me.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 23 Dec 2012 10:02:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 23 05:02:13 2012
Received: from localhost ([127.0.0.1]:56196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TmiNp-0007I9-9C
	for submit <at> debbugs.gnu.org; Sun, 23 Dec 2012 05:02:13 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:42023
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TmiNn-0007I2-5L
	for 13167 <at> debbugs.gnu.org; Sun, 23 Dec 2012 05:02:11 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 9F2F0451E1FE;
	Sun, 23 Dec 2012 02:01:45 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
	<87bodv1t0j.fsf@HIDDEN> <50CCBC3D.3010504@HIDDEN>
	<87txrmmzk5.fsf@HIDDEN> <50CE0EFD.3010505@HIDDEN>
	<87a9tdyqak.fsf@HIDDEN> <87fw35vvzf.fsf@HIDDEN>
	<50CF205A.50004@HIDDEN> <8738yy77gx.fsf@HIDDEN>
	<50D5D4C4.9090404@HIDDEN>
Date: Sun, 23 Dec 2012 11:49:29 +0200
In-Reply-To: <50D5D4C4.9090404@HIDDEN> (martin rudalics's message of "Sat, 22
	Dec 2012 16:41:56 +0100")
Message-ID: <87pq21drau.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

> The concept of burying does not exist with browsers, IIUC.

I don't see something analogous in browsers too, but in Emacs
for frame-local buffer lists, burying implies a ring structure
(a circular list) where popping the first buffer from the top of
the ring pushes it to the bottom.  It seems that reported problems are
caused by the fact that window-local buffers don't form a circular ring.

> And from my personal experience I can tell that making
> Firefox's TabMixPlus always do what I mean in a specific
> context is virtually impossible.

Firefox's TabMixPlus provides 6 options to focus
after closing the current tab:

1. First tab
2. Left tab
3. Right tab
4. Last tab
5. Opener/right tab
6. Last opened tab

Currently `q' in Emacs performs the option 3 "Right tab" that means
to restore the last buffer in the list of previous buffer (or maybe it's
the option 6 "Last opened tab"?).  But I believe that more useful would be
the option 5 "Opener/right tab" where Opener means the buffer that
initially displayed the current buffer, so `q' should restore it.
If you disagree then maybe this should be configurable in Emacs?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 22 Dec 2012 15:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 22 10:42:31 2012
Received: from localhost ([127.0.0.1]:55656 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TmRDa-0003zA-EJ
	for submit <at> debbugs.gnu.org; Sat, 22 Dec 2012 10:42:30 -0500
Received: from mout.gmx.net ([212.227.17.21]:51856)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TmRDU-0003yw-8B
	for 13167 <at> debbugs.gnu.org; Sat, 22 Dec 2012 10:42:26 -0500
Received: from mailout-de.gmx.net ([10.1.76.69]) by mrigmx.server.lan
	(mrigmx002) with ESMTP (Nemesis) id 0MLDZP-1TmAEE3N33-000JPe for
	<13167 <at> debbugs.gnu.org>; Sat, 22 Dec 2012 16:42:03 +0100
Received: (qmail invoked by alias); 22 Dec 2012 15:42:03 -0000
Received: from 62-47-46-229.adsl.highway.telekom.at (EHLO [62.47.46.229])
	[62.47.46.229]
	by mail.gmx.net (mp069) with SMTP; 22 Dec 2012 16:42:03 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX1+XITAeZq+XPcyZu8Wuc6c+yQPx5mm/xrLKv2t3hQ
	18xlfyCGJJmQZG
Message-ID: <50D5D4C4.9090404@HIDDEN>
Date: Sat, 22 Dec 2012 16:41:56 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
	<50C9AE21.40904@HIDDEN>	<8738z9ea1w.fsf@HIDDEN>
	<50CAFE8F.2060903@HIDDEN>	<87bodv1t0j.fsf@HIDDEN>
	<50CCBC3D.3010504@HIDDEN>	<87txrmmzk5.fsf@HIDDEN>
	<50CE0EFD.3010505@HIDDEN>	<87a9tdyqak.fsf@HIDDEN>
	<87fw35vvzf.fsf@HIDDEN>	<50CF205A.50004@HIDDEN>
	<8738yy77gx.fsf@HIDDEN>
In-Reply-To: <8738yy77gx.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

 > As I see, the list of previous buffers is not empty,
 > but I don't know why it doesn't restore the *scratch* buffer.

Yes, but all buffers on the list of previous buffers including *scratch*
are on the list of next buffers too.  So it takes a buffer from some
global list :-(

If we want to patch this in your sense, whenever all previous buffers are
next we have to take the latest buffer on next instead IIUC.

 > As a general question, do you know a reason why structure and functionality
 > of window-local `prev-buffers' and `next-buffers' should differ from
 > frame-local frame parameters `buffer-list' and `buried-buffer-list'?
 >
 > I have a feeling that adding the handling of window-local counterparts
 > `prev-buffers' and `next-buffers' to the same places in code that currently
 > handle frame-local buffer lists `buffer-list' and `buried-buffer-list'
 > could help to fix all these window-related buffer-order inconsistencies.

The idea of the list of next buffers was to give the user a tool to undo
overshooting navigation of the list of previous buffers.  That is, when
I try to go back to a previous buffer and go too far, I can rescind that
step by going to the next buffer.

I don't know whether windows' buffer lists _should_ be different from
`buffer-list' and `buried-buffer-list'.  Intuitively, I'd agree that
they shouldn't.  For the moment suffice it to say that the global buffer
lists are not updated after `set-window-buffer', hence they are not
suitable for this kind of job.  But if you have an idea how to uniquify
these lists I'd be all ears.

Finally note that I do not consider the current behavior inconsistent.
The behavior of Emacs differs wrt browsers because it can switch to a
previous buffer with and without burying the present one.  The concept
of burying does not exist with browsers, IIUC.  The concept of showing
some reasonably useful buffer instead of a killed one either.  And from
my personal experience I can tell that making Firefox's TabMixPlus always
do what I mean in a specific context is virtually impossible.

Maybe we should really try to implement these lists with the help of
chronologially sortable Tabs and look at how the visual change after
each of the relevant Emacs operation affects the order of these Tabs.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 22 Dec 2012 09:43:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 22 04:43:11 2012
Received: from localhost ([127.0.0.1]:55015 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TmLbr-0002in-Bo
	for submit <at> debbugs.gnu.org; Sat, 22 Dec 2012 04:43:11 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:46781
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TmLbn-0002id-0g
	for 13167 <at> debbugs.gnu.org; Sat, 22 Dec 2012 04:43:08 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 2C2BDAAA49C7;
	Sat, 22 Dec 2012 01:42:45 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
	<87bodv1t0j.fsf@HIDDEN> <50CCBC3D.3010504@HIDDEN>
	<87txrmmzk5.fsf@HIDDEN> <50CE0EFD.3010505@HIDDEN>
	<87a9tdyqak.fsf@HIDDEN> <87fw35vvzf.fsf@HIDDEN>
	<50CF205A.50004@HIDDEN>
Date: Sat, 22 Dec 2012 11:27:50 +0200
In-Reply-To: <50CF205A.50004@HIDDEN> (martin rudalics's message of "Mon, 17
	Dec 2012 14:38:34 +0100")
Message-ID: <8738yy77gx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>> 12. q   the last q doesn't restore the initial buffer *scratch*
>
> Is the list of previous buffers empty in step 12 ?

As I see, the list of previous buffers is not empty,
but I don't know why it doesn't restore the *scratch* buffer.

> Then we could heuristically show the last buffer added to the list of
> next buffers here.  Preferring a buffer which is not on any of this
> window's lists doesn't make much sense in this case, I think.
>
> I guess that this scenario would also break the recipe you proposed
> earlier, namely to keep next and previous buffers as lists built from
> elements of the same type and not choose an element from the next
> buffers when quitting.

Yes, such change will break this scenario.

As a general question, do you know a reason why structure and functionality
of window-local `prev-buffers' and `next-buffers' should differ from
frame-local frame parameters `buffer-list' and `buried-buffer-list'?

I have a feeling that adding the handling of window-local counterparts
`prev-buffers' and `next-buffers' to the same places in code that currently
handle frame-local buffer lists `buffer-list' and `buried-buffer-list'
could help to fix all these window-related buffer-order inconsistencies.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 17 Dec 2012 13:40:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 17 08:40:09 2012
Received: from localhost ([127.0.0.1]:46905 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TkavN-0008C4-C9
	for submit <at> debbugs.gnu.org; Mon, 17 Dec 2012 08:40:08 -0500
Received: from mout.gmx.net ([212.227.15.19]:62918)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TkavI-0008Bc-Bq
	for 13167 <at> debbugs.gnu.org; Mon, 17 Dec 2012 08:40:03 -0500
Received: from mailout-de.gmx.net ([10.1.76.33]) by mrigmx.server.lan
	(mrigmx002) with ESMTP (Nemesis) id 0Lds7x-1TJTgF2SDT-00ixz4 for
	<13167 <at> debbugs.gnu.org>; Mon, 17 Dec 2012 14:38:44 +0100
Received: (qmail invoked by alias); 17 Dec 2012 13:38:44 -0000
Received: from 62-47-51-177.adsl.highway.telekom.at (EHLO [62.47.51.177])
	[62.47.51.177]
	by mail.gmx.net (mp033) with SMTP; 17 Dec 2012 14:38:44 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX18TUnZWk34TtivZ0BoYIV4V11e4evhBaYGr6rbfEh
	oRmFeC1uaLSLgh
Message-ID: <50CF205A.50004@HIDDEN>
Date: Mon, 17 Dec 2012 14:38:34 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
	<50C9AE21.40904@HIDDEN>	<8738z9ea1w.fsf@HIDDEN>
	<50CAFE8F.2060903@HIDDEN>	<87bodv1t0j.fsf@HIDDEN>
	<50CCBC3D.3010504@HIDDEN>	<87txrmmzk5.fsf@HIDDEN>
	<50CE0EFD.3010505@HIDDEN>	<87a9tdyqak.fsf@HIDDEN>
	<87fw35vvzf.fsf@HIDDEN>
In-Reply-To: <87fw35vvzf.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

 > There is one side-effect with overwrapping in next buffers.
 > When `C-x right C-x right' wraps to the first buffer *scratch*,
 > *scratch* is pushed to the list of next buffers.
 >
 > Then `C-x left C-x left' returns to the previous buffers,
 > typing `q' restores the right buffer, another `q' restores
 > another right buffer.  But the last `q' doesn't restore
 > the buffer *scratch*.
 >
 > This is in the following scenario:
 >
 >  1. emacs -Q
 >  2. C-h C-n
 >  3. C-x d RET
 >  4. v
 >  5. C-x right    displays the buffer *Messages*
 >  6. C-x right    displays the buffer *scratch*
 >  7. C-x left
 >  8. C-x left
 >  9. q
 > 10. q
 > 11. q
 > 12. q   the last q doesn't restore the initial buffer *scratch*

Is the list of previous buffers empty in step 12 ?  Then we could
heuristically show the last buffer added to the list of next buffers
here.  Preferring a buffer which is not on any of this window's lists
doesn't make much sense in this case, I think.

I guess that this scenario would also break the recipe you proposed
earlier, namely to keep next and previous buffers as lists built from
elements of the same type and not choose an element from the next
buffers when quitting.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 17 Dec 2012 10:08:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 17 05:08:10 2012
Received: from localhost ([127.0.0.1]:46603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TkXcI-0002My-LS
	for submit <at> debbugs.gnu.org; Mon, 17 Dec 2012 05:08:10 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:60557
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TkXcG-0002Mr-EA
	for 13167 <at> debbugs.gnu.org; Mon, 17 Dec 2012 05:08:08 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id F2560451E191;
	Mon, 17 Dec 2012 02:06:52 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
	<87bodv1t0j.fsf@HIDDEN> <50CCBC3D.3010504@HIDDEN>
	<87txrmmzk5.fsf@HIDDEN> <50CE0EFD.3010505@HIDDEN>
	<87a9tdyqak.fsf@HIDDEN>
Date: Mon, 17 Dec 2012 11:57:52 +0200
In-Reply-To: <87a9tdyqak.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	17 Dec 2012 11:35:31 +0200")
Message-ID: <87fw35vvzf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

> in `switch-to-prev-buffer' into
>
> 		   (not (memq new-buffer next-buffers)))
>
> and it works as expected.  Not sure about possible side-effects,
> have to test this change more.

There is one side-effect with overwrapping in next buffers.
When `C-x right C-x right' wraps to the first buffer *scratch*,
*scratch* is pushed to the list of next buffers.

Then `C-x left C-x left' returns to the previous buffers,
typing `q' restores the right buffer, another `q' restores
another right buffer.  But the last `q' doesn't restore
the buffer *scratch*.

This is in the following scenario:

 1. emacs -Q
 2. C-h C-n
 3. C-x d RET
 4. v
 5. C-x right    displays the buffer *Messages*
 6. C-x right    displays the buffer *scratch*
 7. C-x left
 8. C-x left
 9. q
10. q
11. q
12. q   the last q doesn't restore the initial buffer *scratch*




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 17 Dec 2012 09:43:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 17 04:43:28 2012
Received: from localhost ([127.0.0.1]:46551 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TkXEN-0000sf-BD
	for submit <at> debbugs.gnu.org; Mon, 17 Dec 2012 04:43:28 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:50215
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TkXEJ-0000sO-51
	for 13167 <at> debbugs.gnu.org; Mon, 17 Dec 2012 04:43:24 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 265BD451E191;
	Mon, 17 Dec 2012 01:42:07 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
	<87bodv1t0j.fsf@HIDDEN> <50CCBC3D.3010504@HIDDEN>
	<87txrmmzk5.fsf@HIDDEN> <50CE0EFD.3010505@HIDDEN>
Date: Mon, 17 Dec 2012 11:35:31 +0200
In-Reply-To: <50CE0EFD.3010505@HIDDEN> (martin rudalics's message of "Sun, 16
	Dec 2012 19:12:13 +0100")
Message-ID: <87a9tdyqak.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>> I believe C-x right and C-x left should be special to not affect the
>> logic of "try taking the buffer that has been shown in that window
>> before the present one".
>
> I'm not sure what this means to do instead.  Have `quit-window' not show
> a buffer if it appears on `window-next-buffers'?

Thanks, this sounds right.

> What happens if you turn the form
>
> 		   (or bury-or-kill (not (memq buffer next-buffers))))
>
> in `switch-to-prev-buffer' into
>
> 		   (not (memq buffer next-buffers)))

I tried to do this but with no effect.  Then I also turned

		   (or bury-or-kill (not (memq new-buffer next-buffers))))

in `switch-to-prev-buffer' into

		   (not (memq new-buffer next-buffers)))

and it works as expected.  Not sure about possible side-effects,
have to test this change more.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 16 Dec 2012 18:13:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 16 13:13:35 2012
Received: from localhost ([127.0.0.1]:45603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TkIiV-0003kU-5g
	for submit <at> debbugs.gnu.org; Sun, 16 Dec 2012 13:13:35 -0500
Received: from mout.gmx.net ([212.227.15.18]:55694)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TkIiT-0003kN-PQ
	for 13167 <at> debbugs.gnu.org; Sun, 16 Dec 2012 13:13:34 -0500
Received: from mailout-de.gmx.net ([10.1.76.70]) by mrigmx.server.lan
	(mrigmx002) with ESMTP (Nemesis) id 0LhQlC-1TOUYI2Qt6-00mYf4 for
	<13167 <at> debbugs.gnu.org>; Sun, 16 Dec 2012 19:12:22 +0100
Received: (qmail invoked by alias); 16 Dec 2012 18:12:22 -0000
Received: from 62-47-44-83.adsl.highway.telekom.at (EHLO [62.47.44.83])
	[62.47.44.83]
	by mail.gmx.net (mp070) with SMTP; 16 Dec 2012 19:12:22 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX1+r1UxPHS+rcVXhddSeTNMygjiCuhfL7wDwRZoPCu
	kIZ0qViZJwc+HP
Message-ID: <50CE0EFD.3010505@HIDDEN>
Date: Sun, 16 Dec 2012 19:12:13 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
	<50C9AE21.40904@HIDDEN>	<8738z9ea1w.fsf@HIDDEN>
	<50CAFE8F.2060903@HIDDEN>	<87bodv1t0j.fsf@HIDDEN>
	<50CCBC3D.3010504@HIDDEN> <87txrmmzk5.fsf@HIDDEN>
In-Reply-To: <87txrmmzk5.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

 > I think that C-x right and C-x left should behave like the "Next" and
 > "Prev" buttons in a browser where clicking the "Next" button adds the
 > current page to the list of previous pages, removes the first page from
 > the list of next pages and displays it.  Clicking the "Prev" button adds
 > the current page to the list of next pages, removes the first page from
 > the list of previous pages and displays it.

Virtually, that's what the code does.

 > It's disturbing that such unobtrusive action can mislead quit-window
 > to restore a buffer that was only temporarily shown in that window
 > with C-x right C-x left.

But the buffer shown via C-x right might have been shown there for quite
some while.

 > I believe C-x right and C-x left should be
 > special to not affect the logic of "try taking the buffer that has been
 > shown in that window before the present one".

I'm not sure what this means to do instead.  Have `quit-window' not show
a buffer if it appears on `window-next-buffers'?  What happens if you
turn the form

		   (or bury-or-kill (not (memq buffer next-buffers))))

in `switch-to-prev-buffer' into

		   (not (memq buffer next-buffers)))

I have no idea what else this could affect, though.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 16 Dec 2012 09:35:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 16 04:35:02 2012
Received: from localhost ([127.0.0.1]:44651 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TkAcg-0007zH-Ad
	for submit <at> debbugs.gnu.org; Sun, 16 Dec 2012 04:35:02 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:39449
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TkAce-0007yn-Pq
	for 13167 <at> debbugs.gnu.org; Sun, 16 Dec 2012 04:35:01 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 7AB68451E1CA;
	Sun, 16 Dec 2012 01:33:51 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
	<87bodv1t0j.fsf@HIDDEN> <50CCBC3D.3010504@HIDDEN>
Date: Sun, 16 Dec 2012 11:17:54 +0200
In-Reply-To: <50CCBC3D.3010504@HIDDEN> (martin rudalics's message of "Sat, 15
	Dec 2012 19:06:53 +0100")
Message-ID: <87txrmmzk5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>> To not maintain the same markers twice, `C-x left' could add the
>> current buffer with markers only once to the list of next buffers,
>> but not to the list of previous buffers.  Do I miss something
>> why this won't work?
>
> If we did that, we'd probably get rid of the behavior you started this
> thread with.  But the current semantics is "when we have to replace a
> buffer in a window with another one, try taking the buffer that has been
> shown in that window before the present one".  I'm not quite sure how to
> describe what you want to do instead.

I think that C-x right and C-x left should behave like the "Next" and
"Prev" buttons in a browser where clicking the "Next" button adds the
current page to the list of previous pages, removes the first page from
the list of next pages and displays it.  Clicking the "Prev" button adds
the current page to the list of next pages, removes the first page from
the list of previous pages and displays it.

It's disturbing that such unobtrusive action can mislead quit-window
to restore a buffer that was only temporarily shown in that window
with C-x right C-x left.  I believe C-x right and C-x left should be
special to not affect the logic of "try taking the buffer that has been
shown in that window before the present one".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 15 Dec 2012 18:08:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 13:08:10 2012
Received: from localhost ([127.0.0.1]:44344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tjw9h-00031p-Sk
	for submit <at> debbugs.gnu.org; Sat, 15 Dec 2012 13:08:10 -0500
Received: from mout.gmx.net ([212.227.15.18]:56558)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1Tjw9e-00031h-9X
	for 13167 <at> debbugs.gnu.org; Sat, 15 Dec 2012 13:08:07 -0500
Received: from mailout-de.gmx.net ([10.1.76.20]) by mrigmx.server.lan
	(mrigmx001) with ESMTP (Nemesis) id 0MaXIN-1TQTRl3SOX-00KAZD for
	<13167 <at> debbugs.gnu.org>; Sat, 15 Dec 2012 19:07:00 +0100
Received: (qmail invoked by alias); 15 Dec 2012 18:07:00 -0000
Received: from 62-47-49-60.adsl.highway.telekom.at (EHLO [62.47.49.60])
	[62.47.49.60]
	by mail.gmx.net (mp020) with SMTP; 15 Dec 2012 19:07:00 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX187exAS8zM7D0SgxNEymdOwpGxeLtBjyXY9vjxA0I
	sRl2A+r074bKjY
Message-ID: <50CCBC3D.3010504@HIDDEN>
Date: Sat, 15 Dec 2012 19:06:53 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
	<50C9AE21.40904@HIDDEN>	<8738z9ea1w.fsf@HIDDEN>
	<50CAFE8F.2060903@HIDDEN> <87bodv1t0j.fsf@HIDDEN>
In-Reply-To: <87bodv1t0j.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

 > A good C-x binding for quit-window is `C-x q'.  Its current command
 > does nothing normally and already has an alternative keybinding
 > `C-x C-k q' while recording a macro.

It's easy to convince me ...

 >> this loop finds a buffer to switch to, it retrieves the start and point
 >> positions from the buffer's association in the window's _previous_
 >> buffers.  I didn't want to maintain the same markers twice.
 >
 > To not maintain the same markers twice, `C-x left' could add the
 > current buffer with markers only once to the list of next buffers,
 > but not to the list of previous buffers.  Do I miss something
 > why this won't work?

If we did that, we'd probably get rid of the behavior you started this
thread with.  But the current semantics is "when we have to replace a
buffer in a window with another one, try taking the buffer that has been
shown in that window before the present one".  I'm not quite sure how to
describe what you want to do instead.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 15 Dec 2012 11:10:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 06:10:37 2012
Received: from localhost ([127.0.0.1]:43367 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tjpdc-0000b3-DO
	for submit <at> debbugs.gnu.org; Sat, 15 Dec 2012 06:10:37 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:50414
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1Tjpda-0000ar-0O
	for 13167 <at> debbugs.gnu.org; Sat, 15 Dec 2012 06:10:35 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 47A41451CBE4;
	Sat, 15 Dec 2012 03:09:29 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN> <50CAFE8F.2060903@HIDDEN>
Date: Sat, 15 Dec 2012 12:49:36 +0200
In-Reply-To: <50CAFE8F.2060903@HIDDEN> (martin rudalics's message of "Fri, 14
	Dec 2012 11:25:19 +0100")
Message-ID: <87bodv1t0j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>>> Why do you never quit the *Messages* buffer in your scenario?
>>
>> I can't quit the *Messages* buffer.  Typing `q' inserts the character
>> `q' to the *Messages* buffer.  But it's good that *Messages* is writable.
>> The same problem can occur with any other writable buffer.
>
> You can always do M-x quit-window.  Isn't there some C-x binding we
> could use for this?

A good C-x binding for quit-window is `C-x q'.  Its current command
does nothing normally and already has an alternative keybinding
`C-x C-k q' while recording a macro.

> this loop finds a buffer to switch to, it retrieves the start and point
> positions from the buffer's association in the window's _previous_
> buffers.  I didn't want to maintain the same markers twice.

To not maintain the same markers twice, `C-x left' could add the
current buffer with markers only once to the list of next buffers,
but not to the list of previous buffers.  Do I miss something
why this won't work?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 14 Dec 2012 10:26:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 05:26:28 2012
Received: from localhost ([127.0.0.1]:41928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TjSTM-0004l1-2b
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2012 05:26:28 -0500
Received: from mout.gmx.net ([212.227.15.19]:57578)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TjSTK-0004kv-FH
	for 13167 <at> debbugs.gnu.org; Fri, 14 Dec 2012 05:26:27 -0500
Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan
	(mrigmx001) with ESMTP (Nemesis) id 0MZic4-1TQ7r72Gbe-00LY4W for
	<13167 <at> debbugs.gnu.org>; Fri, 14 Dec 2012 11:25:27 +0100
Received: (qmail invoked by alias); 14 Dec 2012 10:25:27 -0000
Received: from 62-47-53-23.adsl.highway.telekom.at (EHLO [62.47.53.23])
	[62.47.53.23]
	by mail.gmx.net (mp019) with SMTP; 14 Dec 2012 11:25:27 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX188Tad8ogw8qSkCtTn3N1VFaWdbO9640iSa9jNWT9
	ggHMzj3TQ4XM8l
Message-ID: <50CAFE8F.2060903@HIDDEN>
Date: Fri, 14 Dec 2012 11:25:19 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
	<8738z9ea1w.fsf@HIDDEN>
In-Reply-To: <8738z9ea1w.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

 >> Why do you never quit the *Messages* buffer in your scenario?
 >
 > I can't quit the *Messages* buffer.  Typing `q' inserts the character
 > `q' to the *Messages* buffer.  But it's good that *Messages* is writable.
 > The same problem can occur with any other writable buffer.

You can always do M-x quit-window.  Isn't there some C-x binding we
could use for this?

 >> The semantics of C-x left and C-x right is that you want (or
 >> at least don't mind) to switch back to the old buffer.
 >
 > Typing `C-x left' in the *Messages* buffer in the aforementioned scenario adds
 > the *Messages* buffer to both (window-prev-buffers) and to (window-next-buffers).
 > This looks doubtful.  Is this intentional?

Yes.  When in `switch-to-next-buffer'

       (dolist (buffer next-buffers)
	(when (and (or (buffer-live-p buffer)
		       (not (setq killed-buffers
				  (cons buffer killed-buffers))))
		   (not (eq buffer old-buffer))
                    (or (null pred) (funcall pred buffer))
		   (setq entry (assq buffer (window-prev-buffers window))))
	  (setq new-buffer buffer)
	  (set-window-buffer-start-and-point
	   window new-buffer (nth 1 entry) (nth 2 entry))
	  (throw 'found t)))

this loop finds a buffer to switch to, it retrieves the start and point
positions from the buffer's association in the window's _previous_
buffers.  I didn't want to maintain the same markers twice.

 > I thought that when a buffer is displayed for the first time
 > (e.g. with `C-h C-n', or `v' in Dired mode), it sets up `quit-window',
 > so `q' will be able to return to the buffer that initiated its display.

The dichotomy striking here is rooted in the history of `quit-window'
which was used (via "q") for getting rid of temporary, typically
read-only buffers, but also for generally getting rid of a window's
contents.

 > I didn't expect that `C-x right C-x left' affects `quit-window'.

They both affect each other.  If there's no explicit `quit-restore'
parameter, `quit-window' uses whatever `window-prev-buffers' provides.
And quitting a window should make its buffer move to the far ends of its
previous and next buffers.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 14 Dec 2012 01:05:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 20:05:46 2012
Received: from localhost ([127.0.0.1]:41522 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TjJik-0004WB-Ga
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2012 20:05:46 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:54039
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TjJih-0004Vs-3e
	for 13167 <at> debbugs.gnu.org; Thu, 13 Dec 2012 20:05:43 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 10C0C451E1F3;
	Thu, 13 Dec 2012 17:04:46 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#13167: 24.3.50;
	C-x right C-x left interferes with buffer order
Organization: JURTA
References: <878v92n7sg.fsf@HIDDEN> <50C9AE21.40904@HIDDEN>
Date: Fri, 14 Dec 2012 02:45:15 +0200
In-Reply-To: <50C9AE21.40904@HIDDEN> (martin rudalics's message of "Thu, 13
	Dec 2012 11:29:53 +0100")
Message-ID: <8738z9ea1w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

> Why do you never quit the *Messages* buffer in your scenario?

I can't quit the *Messages* buffer.  Typing `q' inserts the character
`q' to the *Messages* buffer.  But it's good that *Messages* is writable.
The same problem can occur with any other writable buffer.

> The semantics of C-x left and C-x right is that you want (or
> at least don't mind) to switch back to the old buffer.

Typing `C-x left' in the *Messages* buffer in the aforementioned scenario adds
the *Messages* buffer to both (window-prev-buffers) and to (window-next-buffers).
This looks doubtful.  Is this intentional?

> The semantics of `quit-window' is that you don't want to switch back
> to the old buffer soon.

I thought that when a buffer is displayed for the first time
(e.g. with `C-h C-n', or `v' in Dired mode), it sets up `quit-window',
so `q' will be able to return to the buffer that initiated its display.
I didn't expect that `C-x right C-x left' affects `quit-window'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at 13167 <at> debbugs.gnu.org:


Received: (at 13167) by debbugs.gnu.org; 13 Dec 2012 10:30:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 05:30:58 2012
Received: from localhost ([127.0.0.1]:40113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tj649-0000ht-9P
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2012 05:30:58 -0500
Received: from mailout-de.gmx.net ([213.165.64.22]:51747)
	by debbugs.gnu.org with smtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1Tj645-0000hf-CV
	for 13167 <at> debbugs.gnu.org; Thu, 13 Dec 2012 05:30:54 -0500
Received: (qmail invoked by alias); 13 Dec 2012 10:30:00 -0000
Received: from 62-47-56-185.adsl.highway.telekom.at (EHLO [62.47.56.185])
	[62.47.56.185]
	by mail.gmx.net (mp016) with SMTP; 13 Dec 2012 11:30:00 +0100
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX18Jo/o9J6oJ6yxd2a3DSpWyAJ0w7uYk0LeAGAObV5
	MPDBppHOWrOtup
Message-ID: <50C9AE21.40904@HIDDEN>
Date: Thu, 13 Dec 2012 11:29:53 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#13167: 24.3.50; C-x right C-x left interferes with buffer
	order
References: <878v92n7sg.fsf@HIDDEN>
In-Reply-To: <878v92n7sg.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13167
Cc: 13167 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

 > 1. emacs -Q
 > 2. C-h C-n
 > 3. C-x d RET
 > 4. v
 > 5. C-x right   (or C-h e for the same effect)

`next-buffer' picks a buffer that's not in the window's list of previous
buffers.

 > 6. C-x left

`previous-buffer' picks the buffer that was shown in the window before
the current buffer.

 > 7. q
 >
 > Then `q' displays the buffer `*Messages*' instead of the expected
 > previous Dired buffer `etc'.

This is from the doc-string of `quit-window':

   (3) restore the buffer previously displayed in WINDOW,

which is *Messages*.

 > Typing `C-x left' displays it,
 > but then another `q' displays the buffer `*Messages*' again.
 >
 > 8. C-x left
 > 9. q
 >
 > Again `*Messages*' instead of the expected NEWS.

Again according to the doc-string.

 > 10. C-x left
 > 11. q
 >
 > And again `*Messages*' instead of the expected *scratch*.
 >
 > So the question is why `*Messages*' gets in the way
 > in the list of previous buffers.

Simply because it is the last buffer displayed in that window before the
one you quit.  That's how it was designed and I'm not sure whether we
can do much better.  Why do you never quit the *Messages* buffer in your
scenario?  The semantics of C-x left and C-x right is that you want (or
at least don't mind) to switch back to the old buffer.  The semantics of
`quit-window' is that you don't want to switch back to the old buffer
soon.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Dec 2012 00:02:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 12 19:02:56 2012
Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TiwGL-0007MS-44
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2012 19:02:56 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47504)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1TiwGF-0007MI-Fs
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2012 19:02:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1TiwFR-0005pM-HW
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2012 19:01:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, USER_IN_WHITELIST
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:39791)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1TiwFR-0005pH-Ef
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2012 19:01:57 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58866)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1TiwFQ-00044y-Ha
	for bug-gnu-emacs@HIDDEN; Wed, 12 Dec 2012 19:01:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1TiwFP-0005nk-C9
	for bug-gnu-emacs@HIDDEN; Wed, 12 Dec 2012 19:01:56 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:52219
	helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1TiwFP-0005nN-6H
	for bug-gnu-emacs@HIDDEN; Wed, 12 Dec 2012 19:01:55 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 1678C451E1B6
	for <bug-gnu-emacs@HIDDEN>; Wed, 12 Dec 2012 16:01:52 -0800 (PST)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; C-x right C-x left interferes with buffer order
Organization: JURTA
Date: Thu, 13 Dec 2012 01:37:03 +0200
Message-ID: <878v92n7sg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
	timestamps) [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

There is something in quit-window and the buffer order
that looks like a regression, but I'm not sure what.
Please dismiss this bug report if there is nothing wrong.

1. emacs -Q
2. C-h C-n       visits NEWS
3. C-x d RET     visits Dired in the directory `etc'
4. v             visits first file in the directory `etc'
5. q
6. q
7. q

Every subsequent `q' restores the previous buffer.
This is correct.

But when this sequence is interspersed with seemingly idempotent
`C-x right C-x left', the buffer order becomes broken:

1. emacs -Q
2. C-h C-n
3. C-x d RET
4. v
5. C-x right   (or C-h e for the same effect)
6. C-x left
7. q

Then `q' displays the buffer `*Messages*' instead of the expected
previous Dired buffer `etc'.  Typing `C-x left' displays it,
but then another `q' displays the buffer `*Messages*' again.

8. C-x left
9. q

Again `*Messages*' instead of the expected NEWS.

10. C-x left
11. q

And again `*Messages*' instead of the expected *scratch*.

So the question is why `*Messages*' gets in the way
in the list of previous buffers.




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#13167; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.