The command M-x xclip-mode returns the following info in *Messages*:

Eager macro-expansion failure: (error "Unknown upattern `(quote pbpaste)'") [2 times]
Xclip mode enabled

I cannot yank text from X11 clipboard. If I add (xclip-mode t) to my .emacs file, I get the same message and the killed text cannot be yanked using C-y.

Here is the related content in my .emacs file:

(setq save-interprogram-paste-before-kill t) ;; Save clipboard strings into kill ring before replacing them
;; (setq x-select-enable-primary t) ;; Emacs commands C-w and C-y to use the primary selection.
(setq x-select-enable-clipboard t) ;; Emacs commands C-w and C-y to use the clipboard selection.
(setq select-enable-clipboard t)
(xclip-mode t) ;; the usual kill/yank commands will use the GUI selections according to select-enable-clipboard/primary.

and version info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.6 (stretch)
Release:    9.6
Codename:   stretch
$ emacs -version
GNU Emacs 24.5.1
$ xclip -version
xclip version 0.12
xclip-1.5$ ls
xclip-autoloads.el  xclip.el  xclip-pkg.el  xclip-pkg.elc
  • I don't know why you have this problem. You may want to try updating your Emacs version which is quite outdated. You may also want to try GPastel (gitlab.petton.fr/DamienCassou/gpastel) instead of xclip (I'm the author of GPastel). – Damien Cassou Dec 11 '18 at 9:43
  • @DamienCassou Thanks! I upgraded to emacs25 and the problem has gone. – purplezzh Dec 13 '18 at 2:21

This was a bug in xclip-1.5 which made it signal an error on Emacs<25. I just pushed a new version 1.6 which should fix this problem.

  • Yep! I upgraded to emacs25 using testing repository and the problem solved. – purplezzh Dec 13 '18 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.