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

From: martin rudalics <[email-masked]>
Date: Sun, 16 Dec 2012 19:12:13 +0100

> 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