Subject: Re: bug#6637: 24.0.50; kill ring being seriously polluted

From: Tim Van Holder <[email-masked]>
Date: Sat, 17 Jul 2010 17:32:36 +0200

On 16 July 2010 17:57, Chong Yidong <[email-masked]> wrote:
> Tim Van Holder <[email-masked]> writes:
>
>> 1) emacs -Q
>> 2) Holding the shift key, press the up arrow until you're at the top
>> of the buffer
>> 3) Release the shift key and press the down arrow until you're back at
>> the bottom of the buffer
>> 4) Press C-y
>>
>> This yanks in the comment lines, even though I at no point requested a
>> kill or copy-as-kill.
>
> Go to any X application (firefox, etc) with a text field.
> Holding shift, press the arrow keys and select some text.
> Release shift, and press another down arrow to deselect it.
>
> In Emacs 23 (in the absence of latest changes):
>
> Run `emacs -Q'.
> C-y
>
> The text you selected is yanked into the buffer.  This is because the
> other X application put your selected text in the primary selection.
> How is the behavior of Emacs' new shift selection different from the
> other X application's shift selection?

I generally spend all my time in Emacs, so I don't know/care very much
about the behaviour of other X applications (especially with the way
I'm running Emacs these days, it tends to be the only X app running).
All I know is I have been selecting text in Emacs for a long time and
it has never appeared in the kill ring (maybe because of
pc-selection-mode, I don't know).
I do expect to be able to yank text copied from other applications,
and I do expect to be able to paste stuff elsewhere that I've
copied/killed in Emacs; and this has so far always been the case.

The following is something I do a lot as part of code editing:
 1) copy/kill something
 2) yank the copied/kill text
 3) select certain portions and replace them as needed for that copy
 4) go back to step 2) if needed
The new behaviour interferes with this (and I don't see how it can do
anything but interfere when pc-selection-mode is active).

Look, if most people are happy with the new behaviour then fine, make
it the default. But I'd still want a customizable option to disable it
(or for it to be automatically disabled when pc-selection-mode is
active).
Given that there is a pc-selection-mode, perhaps this new behaviour
could be made an x-selection-mode, giving people the choice of which
behaviour they want.