2

In emacs, there is a feature where if I select text with a mouse, then without pressing ctrl-c I can paste into emacs with ctrl-v if I have cua mode turned on.

I want to turn off this feature while keeping the cua mode on. I mean I want to explicitly press ctrl-c so that the text will get copied to the clipboard.

smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
  • Does it only affect the CUA bindings or the normal yanking (pasting) as well? –  Aug 26 '12 at 17:18

1 Answers1

1

I suspect that you are using a version of Emacs older than version 24? If so, see the last paragraph of this page of the current Emacs manual. You can probably get rid of the behaviour you dislike by setting x-select-enable-primary to nil.

From my quick tests, setting it to T (which isn't the default on Emacs 24) reproduces the problem behaviour, and this happens both in and not in cua-mode.

Rupert Swarbrick
  • 2,793
  • 16
  • 26
  • For future reference: On Unixes the "old-fashioned" way to copy text between applications was the primary selection, which behaved a bit like the clipboard, and was filled by selecting text with a mouse. Once you've switched off yanking from it, you'll still be able to insert its contents with a middle mouse click, which can be very useful! – Rupert Swarbrick Aug 26 '12 at 19:26