When trying to paste into Emacs from my Linux system GUI, I'm getting a 10-15 second Emacs freeze and:

gui-get-selection: (error "Timed out waiting for reply from selection owner")

I would post a bug, except I can't pin-point the condition to reliably reproduce the bug. Has anyone else encountered this? I'm on GNU Emacs

  • Are you using any clipboard manager? Last time I had this, it was Emacs fighting over the selection ownership with the one I was using.
    – wasamasa
    Dec 24 '14 at 11:04
  • No clipboard managers.
    – abo-abo
    Dec 24 '14 at 11:31
  • At least for Emacs builds on WSL, this hack helped! Nov 19 '17 at 3:29

The short answer: yes (also with

This might be related to emacs bug 16737.

Try running (shell-command-to-string "xclip -o"). When I attempt this (once emacs has started misbehaving with respect to any attempt to yank), emacs hangs until I kill xclip.

  • I can reproduce this.
    – abo-abo
    Dec 24 '14 at 16:38
  • It looks like there are actually a few bug reports probably related to this that have been merged: 16737 17026 17101 17172 (see debbugs.gnu.org for some of the details -- doesn't look like there are any happy endings yet...).
    – dat
    Dec 24 '14 at 16:46

The error message indeed seems to come form xclip! If running 'xclip -o' after a fresh reboot, (i.e. when the clipboard is still empty, ) then the error message appears (gui-get-selection: (error "Timed out waiting for reply from selection owner")).

Workaround: Ctrl+C anything

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.