Re:Initial Impressions of WSL 2
by alexhutcheson on Wednesday May 06, 2020 @12:01PM
(#23092564)
> One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.
Tramp[1] does this for Emacs. You can run Windows GUI Emacs and use SSH or another protocol to edit files and run commands within the WSL installation. It's pretty seamless.
[1] https://www.gnu.org/software/emacs/manual/html_node/tramp/in...
Re:Initial Impressions of WSL 2
by cmrdporcupine on Wednesday May 06, 2020 @04:06PM
(#23095671)
that's awesome! thanks
Re:Initial Impressions of WSL 2
by alexhutcheson on Wednesday May 06, 2020 @05:03PM
(#23096262)
The one (big) caveat is that some Emacs commands that start subprocesses will incorrectly try to start the process in your local environment (in this case, on the Windows side), rather than the remote environment (within the WSL VM). This mainly occurs when elisp functions are implemented using call-process or make-process when they should use process-file[1] or start-file-process[2].
This isn't an issue for most code within Emacs itself, but it pops up occasionally when using packages from ELPA or MELPA.
[1] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...
[2] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...
You can run emacs on WSL and just pass the X output to windows using an X server like VcXsrv. This works pretty seamless for me, no noticeable lag or anything.
This works very well. Another thing I do that works well, and I don't really see it brought up anywhere, is to use nomachine to connect to localhost. It's not seamless in the sense that you have linux apps side-by-side with native windows, but it gives you a full linux desktop experience (you need to install a linux desktop and wm in wsl for this to work well). Combining this with windows virtual desktop i can flip back and forth between windows and linux instantly without any vm.
Have you tried using Emacs with an X server for Windows?
Re:Initial Impressions of WSL 2
by cmrdporcupine on Wednesday May 06, 2020 @09:32AM
(#23090719)
Yes... it's not as well integrated as I'd like.
But the piece missing is still first class support for X (or Wayland) Linux applications. Without GUI Emacs, for example, or some way of integrating the Windows Emacs well, I find the WSL experience not as productive as booting into my actual Linux partition. But it's like... 90% there.
One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.