emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107639: * lisp/window.el (switch


From: martin rudalics
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107639: * lisp/window.el (switch-to-prev-buffer): Do not switch to a visible
Date: Fri, 23 Mar 2012 11:34:41 +0100

Thanks for reverting!

> I don't think "useless" is the right word here, but I see what you are
> saying - what I thought of as a bug is actually a feature.

It would be useless because when the buffer is _not_ shown in another
window it might be more resonable to go to the buffer's `point' instead
of the saved position of point in that window.  I even wanted to do that
by default once.

> Can we introduce a user option show-visible-buffer?

First of all I would have to know a practical use case where this would
be better.  Showing the same buffer in two windows simultaneously is
practically always the result of C-x 2 or C-x 3 (buffer display
functions usually do not display the same buffer twice).  Now if you
"quit" one of these windows via `quit-window', the buffer should be
removed from that window's buffer list (or at least moved to its end) so
it shouldn't be so easy to show it twice via `switch-to-prev-buffer'.
If you do not quit the window but simply show another buffer in it,
`switch-to-prev-buffer' should be allowed to show it even if some other
window shows it already.

If you come up with one or two scenarios, we can decide which option
would be best.  Since we're talking about a regresssion wrt Emacs 23.4
here we should be able to incorporate such an option in Emacs 24.1.

> It should be either
> - t for the current behavior or
> - nil to disallow two windows with the same buffers completely, so that
> switching to a visible buffer deletes the other window which shows it.

I'm afraid we'd have a hard time if we allowed switching to a buffer in
one window delete another window.  I recall someone telling me that
killing a window's buffer should never cause the deletion of the window.

> Or something like this...

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]