[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get emacs to copy/cut/paste from CLIPBOARD selection?

From: Brendan Miller
Subject: Re: get emacs to copy/cut/paste from CLIPBOARD selection?
Date: Fri, 22 Jan 2010 11:34:40 -0800

Aha! With emacs 23 on ubuntu, pasting this into my .emacs makes emacs
have sane clipboard behavior using traditional emacs keybindings! I'm
not sure why this isn't default...

;; try to get clipboard working
; stops selection with a mouse being immediately injected to the kill ring
(setq mouse-drag-copy-region nil)
; stops killing/yanking interacting with primary X11 selection
(setq x-select-enable-primary nil)
; makes killing/yanking interact with clipboard X11 selection
(setq x-select-enable-clipboard t)

;  active region sets primary X11 selection
(setq select-active-regions t)
; make mouse middle-click only paste from primary X11 selection, not
clipboard and kill ring.
(global-set-key [mouse-2] 'mouse-yank-primary)

On Fri, Jan 22, 2010 at 1:22 AM, Torben Knudsen <address@hidden> wrote:
> Brendan Miller <address@hidden> writes:
>> I want emacs to play nice with my other editors, in terms of using the
>> CLIPBOARD selection. What's the easiest way to make this happen? Right
>> now emacs seems to only pay attention to the primary collection. Is
>> there any way to make emacs play nice with other editors and the
>> clipboard manager in this regard?
> I use
> (global-set-key "\C-cw" 'clipboard-kill-ring-save)
> (global-set-key "\C-cy" 'clipboard-yank)
> but there are other ways.  I also have the following in my .emacs wich I
> don't remember what is
> ;; make emacs use the clipboard
> ;(setq x-select-enable-clipboard t)
> ;(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
> --
> Torben Knudsen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]