Subject: bug#13167: 24.3.50; C-x right C-x left interferes with buffer order

From: Juri Linkov <[email-masked]>
Date: Thu, 13 Dec 2012 01:37:03 +0200

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.