clipetty
clipetty copied to clipboard
[BUG] Lag while in tmux via ssh
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!
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
This is a related issue https://github.com/bbatsov/projectile/issues/1044