Subject: Re: bug#8996: Set PRIMARY from last selection, not last selected window

From: Chong Yidong <[email-masked]>
Date: Sun, 25 Mar 2012 11:42:03 +0800

David De La Harpe Golden <[email-masked]> writes:

> Well, that only catches cases that happen owing to things that trigger
> the <select-window> event that handle-select-window is bound to.
>
> But that event isn't fired when you C-x o - other-window just straight
> calls the select-window function.  So, with your patch applied, it
> probably fixes the visible issue in Stefan's focus-follows-mouse case,
> but my keyboard recipe previously given still yields the "wrong"*
> selection.

OTOH, keyboard commands stealing the selection seems a little less
problematic, because the user is specifically doing an Emacs command
rather than just moving the mouse.  I'm not sure it's wrong for C-x o to
get the selection if the window switched to has an active region.