4

Sometimes emacs takes a very long time (+ 30 seconds) to read from or save to the system (Linux) clipboard. The entire emacs session hangs while it does this and I can't cancel it with C-g or ESC ESC ESC or anything. This seems to happen at random, but whenever it does happen, it tends to happen more frequently until I restart emacs.

What could be causing this behavior? Where should I start? I haven't changed the default values of x-select-enable-clipboard (t) or any other clipboard-related variables (to my knowledge)...

Alex
  • 1,028
  • 5
  • 20
  • If you can repro this starting with `emacs -Q` then please file a bug report for it: `M-x report-emacs-bug`. If not, recursively bisect your init file to find the code that manifests this. – Drew Jun 29 '16 at 16:56
  • I've experienced this as well, but with weeks or months passing between cases. I can't help, sorry, but it's certainly odd and annoying when it occurs. – phils Jun 30 '16 at 10:12
  • Yeah, it seems to happen at random and the intervals between cases can be hours or weeks. I've got no idea how to fix it, and bisecting the init file will be difficult because I don't know if I "solved" the problem or if it's just not getting triggered... – Alex Jun 30 '16 at 12:45
  • At risk of a "me too", I have also experienced this. However, it's only on the Linux instance I run as a VirtualBox virtual machine on Windows. My two dedicated Linux installs have no problems. It is intermittent, but usually a problem within a week of the last restart. Restarting Emacs always fixes it for awhile. For @Drew: if I'm in a long running session, will starting with emacs -Q interfere with the operation? It's not easily reproducible. – Michael Johnson Jul 01 '16 at 14:42
  • @MichaelJohnson: I don't understand the question. But from other comments it sounds like it won't be easy to repro this. – Drew Jul 01 '16 at 15:13
  • For anyone else who has this problem: it was solved for me after removing `undo-tree`. – Alex Jul 18 '16 at 12:45
  • Just to add a voice here: it happens for me too; I have used Emacs (with similar/identical versions and settings) in different environments for ages without this bug, and it happens only in a VirtualBox VM, just like @MichaelJohnson. Maybe a combination of those two. I don't have a package `undo-tree`. – AnoE Jul 06 '17 at 08:21
  • I have this problem using emacs over a VNC session. My issue might be different. It happens when I copy from the host and try to paste into my emacs, it seems the host clipboard isnt always shared correctly (I.e. I cant paste the input from the host into a terminal) so emacs seems to hang waiting for input from the clipboard. This doesnt happen everytime I copy/paste only sometimes. – sp00kyb00g13 Feb 04 '20 at 18:52

0 Answers0