reddit / emacs

Installing on Ubuntu

_gjm_ · 2022-04-22 08:49
Hi. What's your preferred way of installing Emacs on Ubuntu? The distro still ships with 27.1 and I can't seem to find an up-to-date PPA with the latest stable releases. There's the Emacs snapshot PPA but I'm not really interested in it. I much prefer stability. Any suggestions? Thanks in advance.
JohnathanDee · 2022-04-22 09:16
I always build and install from source, no repo. No reason to wait for the repos. Emacs installs and uninstalls using a Makefile
sunnyata · 2022-04-22 09:18
https://emacsredux.com/blog/2020/07/18/installing-emacs-via-snap/ Don't forget to put /snap/bin near the front of your PATH. E: anyone want to explain what's wrong with doing it this way?
HeyItsLP · 2022-04-22 09:41
This. I couldn't go back to using Emacs without native-comp, the xwidget browser and 29+ pixel scrolling.
itoshkov · 2022-04-22 10:25
Nothing really. You have to be aware of two things with this approach. Snaps tend to start slower than "normal" apps, or flatpaks. They are also updated automatically. As an alternative, you can install it from flathub, but on Ubuntu you'll need to add flatpaks to your system first.
sunnyata · 2022-04-22 10:42
I don't notice any delay, probably because I use the daemon.
thomasfr · 2022-04-22 11:36
I also compile from source but I avoid the master branch. I ran off the emacs-27 branch until 6-7 months ago and then switched to emacs-28. Emacs is one of my most important work tools and I don't want it to stay pretty stable. I typically pull the latest commits from the branch I build from every week or so.
jcarloz · 2022-04-22 12:07
The emacs in the flathub is sandboxed and not available *directly* via the shell, not ideal for a text editor that needs to access various things in the system
_gjm_ · 2022-04-22 14:26
I'm using Doom Emacs. Are you aware of any issues using it with snap (or flatpak btw)?
mauguro_ · 2022-04-22 14:56
I think it's just the first time, when snaps download the dependencies, also people tend to lose their heads when they talk about snaps
tompurl · 2022-04-22 15:01
I use KDE Neon, which is built upon Ubuntu 20.04. The default way to install Emacs for me from the Discover app was the snap, so I tried that and have had good luck. However, it does not include native-comp at this time.
HeyItsLP · 2022-04-22 16:52
I too use it for work, however, I don't mind using the latest branch as it feels like the code is usually pretty well tested and rarely do I encounter many problems. Additionally since I use Doom the fact that I'm running 250 elisp packages most likely contributes to instability considerably more.
thomasfr · 2022-04-22 16:54
I also have a ~10kLloc init.el and 400+ melpa packages so master tends to break things in subtle ways.
HeyItsLP · 2022-04-22 17:05
Fair, with that many points of failure I would assume that upgrading emacs versions would be quite stressful!
thomasfr · 2022-04-22 17:06
Yeah, I wish I could make native compilation work with my init but it is probably too much work to be worth it. Maybe some day if I invest a lot of time.
jacmoe · 2022-04-22 23:33
Compiling Emacs is ridiculously easy and fast, thanks to the very small amount of C in it :) I highly recommend doing that instead of using a snap.
LemonBreezes · 2022-04-23 02:53
I have a script to build Emacs from source on Ubuntu. Check it out and edit it to your liking https://github.com/LemonBreezes/.doom.d/blob/master/misc-files/ubuntu/build-emacs.sh
sjuswede · 2022-04-28 05:19
On my laptop, installing snapd (no packages, just the daemon) leads to over an hour less battery time from it sucking power without doing anything. In addition, snap packages use measurably more power than non-snap versions of the same software. Sometimes much more. I need my battery for working, so snapd is a no-go for me.
sunnyata · 2022-04-28 08:31
Woah didn't know that.