clipetty icon indicating copy to clipboard operation
clipetty copied to clipboard

[BUG] Lag while in tmux via ssh

Open funnell opened this issue 2 years ago • 2 comments

Describe the bug When I copy text in emacs while in a tmux session on a remote machine connected via ssh, there is a ~2 second lag. If I'm doing this outside of tmux, but still on the same remote machine, there is no lag at all.

To Reproduce ssh to remote server start or attach to existing tmux session open file with text in emacs copy text (try to move cursor while this is happening to notice lag)

** System Info (please complete the following information):**

  • OS: Linux
  • Emacs Version: 28.2
  • Terminal program: iTerm2
  • Any terminal multiplexers in play: Tmux
  • Local or remote (over SSH): remote over SSH

Additional context This may have nothing to do with Clipetty, and if so then please forgive me. However, I'm hoping someone might have some advice 😄 Thanks for the help and wonderful package!

funnell avatar Jan 11 '23 23:01 funnell

The delay comes from the invocation of shell-command-to-string here: https://github.com/spudlyo/clipetty/blob/01b39044b9b65fa4ea7d3166f8b1ffab6f740362/clipetty.el#L96

Possibly due to executing my shell's config file each time

funnell avatar Jan 31 '23 23:01 funnell

This is a related issue https://github.com/bbatsov/projectile/issues/1044

funnell avatar Feb 01 '23 00:02 funnell