After setup wslg on my windows11, I use the wsl's emacs as my primay editor, the basic workflow most time is webbrowser(Google Chrome) on windows. Then coding on Emacs. The problem is the clipboard system not really working very well issue #15 github. So I did hack solution:
- create a command in wsl /usr/local/bin/wclip
- inset /mnt/c/path-to-pwsh.exe -NonInteractive -NoLogo -NoProfile -Command "get-clipboard -Raw"
- call wclip after copy something on windows
like for emacs
(defun get-windows-clipboard () (interactive) (insert (s-replace " " "" (shell-command-to-string "wclip"))))
it's slower than native way that for sure, but it works every time.