Emacs: Sync Copy/Paste Clipboards with Linux X11

By Xah Lee. Date: . Last updated: .

In Linux, if copy/paste doesn't work with other apps, you can add this:

;; after copy Ctrl+c in Linux X11, you can paste by `yank' in emacs
(setq x-select-enable-clipboard t)

;; after mouse selection in X11, you can paste by `yank' in emacs
(setq x-select-enable-primary t)

In X11, there are 2 major copy/paste mechanisms:

The primary selection and clipboard are independent.

References:

If you want to sync X11's “primary selection” and “clipboard” always, see: Linux: Sync X11 Primary Selection and Clipboard

Copy/Paste Topic

  1. Emacs: Copy/Paste and kill-ring History
  2. Emacs: Copy/Cut Current Line If No Selection
  3. Emacs: Copy/Cut All or Selection
  4. Emacs: Paste or Paste Previous
  5. Emacs: Show kill-ring
  6. Emacs: Copy to Register
  7. Emacs: 1 Key to Copy/Paste from Register
  8. Emacs: Copy Append
  9. Emacs: Copy Rectangle Region to kill-ring
  10. Emacs: Sync Copy/Paste Clipboards with Linux X11
Liket it? Put $5 at patreon. Or Buy Xah Emacs Tutorial. Thanks.