Subject: bug#23629: 25.0.94; Calc: Yanking with mouse-2 does not use X primary selection/clipboard

From: Tino Calancha <[email-masked]>
Date: Wed, 11 Jan 2017 19:26:21 +0900

Bastian Beischer <[email-masked]> writes:

> I have customized 'select-enable-primary' to 't' and I'm using it to
> paste the X primary selection with 'mouse-2' often. This invokes
> mouse-yank-primary and that works fine.
>
> It does not work well in calc, though. In calc mouse-2 is bound to
> calc-yank, which takes the thing to be yanked from the kill-ring.
> To reproduce:
>
> 1) emacs -Q
> 2) M-x calc
> 3) Select a number in some other X window (xterm for example) with the
>    mouse
> 4) Go back to emacs *calc* buffer and press mouse-2.
Hi Bastian,

In addition to customize select-enable-primary to t, as you do,
i also like to set select-enable-clipboard to nil.  Then, the kill-ring
uses the primary selection, i.e., `calc-yank' pastes the same text
as `mouse-yank-primary' or `yank'.