spudlyo / clipetty

Manipulate the system (clip)board with (e)macs from a (tty)
GNU General Public License v3.0
167 stars 13 forks source link

[BUG] Lag while in tmux via ssh #27

Open funnell opened 1 year ago

funnell commented 1 year ago

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):

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 commented 1 year ago

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 commented 1 year ago

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