hubisan / emacs-wsl

Install and run Emacs with the Windows Subsystem for Linux (WSL 2) in Windows 10 or 11.
572 stars 42 forks source link

Alternative Ubuntu versions and other ways to install Emacs #46

Closed dalanicolai closed 3 years ago

dalanicolai commented 3 years ago

Thanks for this great guide.

I tried, with succes, a little variant to yours to get a newer version of Emacs (it only gives me version 27.1 but that is already sufficient for me). Just sharing the info here for anybody interested.

To get there I just used an Ubuntu upgrade (to 21.04) and then installed Emacs in the usual (apt) way.

For that we can just install the Ubuntu version (instead of Ubuntu 20.04) from the Microsoft store. Then follow this very brief guide to upgrade to Ubuntu 21.04 (it says 20.10 because the guide is a little older). THE GUIDE DOES NOT MENTION that snapd should be removed first, otherwise the upgrade will fail because it can not check snap package versions.

Then finally, change the two Ubuntu-20.04 in wsl-2_4-emacs.ps1 to simply Ubuntu.

The rest will work like explained in this emacs-wsl guide.

Another "advantage" of this approach is that you can keep upgrading Ubuntu when a new version is released. I think with the Ubuntu-20-04 app you must reinstall everything when a new LTS is released (not sure though)

hubisan commented 3 years ago

Thanks for your input. To summarize, this and also an input from another issue:

Ubuntu Versions

If using another version, make sure to remove or change the hard-coded versions in the scripts.

Should probably remove the hard-coded version of Ubuntu in the scripts. Will have a look at it when the next LTS is released ;-)

Ways to install Emacs

  1. Install the latest version from source as described in this guide.
  2. Use the personal package archive ppa:kelleyk/emacs (installs 27.1 instead of 27.2 last time I checked):
    sudo add-apt-repository ppa:kelleyk/emacs
    sudo apt update
    sudo apt install emacs27
  3. With Ubuntu 21.04 (see above) one can install Emacs 27.1 by running sudo apt install emacs.

    I prefer to just install it from source as it is straight-forward and doesn't take long.