Subject: RE: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames

From: Drew Adams <[email-masked]>
Date: Mon, 24 Nov 2014 20:09:22 -0800 (PST)

> > The main reason for the bug report, however, is the inability
> > to choose the two windows, especially when they are in different
> > frames.  Cycling via `other-window' is limited when you have
> > multiple frames (each possibly with multiple windows).  It is
> > even somewhat limited in the typical case of two windows in the
> > same frame.
> 
> Ediff-windows is session-based, whereas compare-windows is
> stateless.
> It would be a major inconvenience to select a window to compare
> before every invocation of compare-windows.

I didn't say before every invocation of compare-windows, did I?

I said that an optional behavior would be to choose the second
window in some way.  IOW, on user request (e.g., via non-positive
prefix arg), a user would be able to choose the second window.

How to choose?  Click the mouse in a window, or choose a window
by name using the keyboard - those are two possibilities I
suggested.

I can code something up as a POC, when I get a moment, if that
helps.

Yes, I realize that things are different for Ediff: `buffer-list'
is ordered wrt access time, and there is no equivalent list for
windows (AFAIK).  For Ediff, you can just click two buffers with
the mouse and they become the defaults, because of the time-ordering
of `buffer-list'.  (Ediff only needs the buffer, regardless of which
window you click in that might be showing the same buffer.)

> Although I'm aware
> of this problem in the single frame with three windows, at least
> the rule of selecting a window is simple, so it's easy to arrange
> windows in the previous-next order for comparison.

I guess I'm not aware of this.  What is the "rule of selecting a
window", so that I can get `compare-windows' to compare the
selected window against any other window that I choose?