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

From: Stefan Kangas <[email-masked]>
Date: Wed, 10 Jan 2024 03:26:04 -0800

Juri Linkov <[email-masked]> writes:

> 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.

Ten years later, is still an issue on a modern version of Emacs?