Emacs in WSL and opening links

Published September 16, 2017 #windows #emacs #wsl

Using Emacs on Windows got a little bit easier with the latest Creator Update to Windows 10. First great improvement allows to run unpatched Emacs and connect it to X Server like an opensource VcXsrv. Copying and pasting between Emacs and Windows apps now works like a charm, and resizing Emacs (gtk) window also works as expected. It become a really pleasant experience and it feels it have better performance than a natively compiled one.

You can symlink your contents of NTFS drives to have them easily accessible inside your WSL’s home directory. And finally you can run Windows binaries from inside WSL which makes using Guillaume Knispel’s cbwin largely obsolete.

To have Emacs open links in your Windows web browser of choice you just need to add to your init.el file the code below:

(let ((cmd-exe "/mnt/c/Windows/System32/cmd.exe")
      (cmd-args '("/c" "start")))
    (when (file-exists-p cmd-exe)
      (setq browse-url-generic-program  cmd-exe
            browse-url-generic-args     cmd-args
            browse-url-browser-function 'browse-url-generic)))


Read next

See also

Emacs 25 on Windows (x64)

Today whole sourceforge site wasn’t reachable from my home network and suspecting the worst I have decided to make my own Emacs build environment for Windows. Using instructions of bburns.km from https://emacs.stackexchange.com/a/19202 which in turn are based on work of Chris Zheng (emacsbinw64 project) I have created a set of simple shell scripts to automate building of Emacs straight from it’s git repository. If you would like to use them, here are instructions on how to do so:

Read more

Installing Elixir and Phoenix framework on Windows 10

Since December I’m using a Windows 10 based tablet/convertible Asus T100HAN. It is small and neat device and my first tablet I can sensibly code on while commuting, waiting at doctor’s office and the like. Which is great, you know :-) Below I wrote all the steps required to get Elixir and Phoenix framework running on such low-end device or any other with Windows 10. First install Chocolatey if you haven’t already.

Read more