Re:Emacs 29.1 Released
by ladyanita22 on Sunday July 30, 2023 @09:26AM
(#36930953)
It's a shame modern distros don't ship with it...
[ Parent
| on HN ]
Yes! I have Ubuntu at my office and is difficult to get the latest emacs. I found a PPA but it has a bit of lagging behind..
* * *
There's a snap that's updated very quickly:
https://github.com/alexmurray/emacs-snap/
In fact, it's already updated
Does this have native-comp enabled? Or do you still have to build from source for that?
No, it's enabled by default. Last I built Emacs, it took me more than an hour to build.
The default branch has native-compilation, tree-sitter, and json enabled. See here for the enabled flags:
https://github.com/alexmurray/emacs-snap/blob/master/snapcra...
It would definitely be nice to have an updated PPA, but compared to some apps, Emacs is simple and fast to compile - just a ./configure followed by make. (The first time, you need to install a few dependencies, but that's automated too, something like apt-get build-dep emacs).
> fast to compile
Last I tried building Emacs, it took me more than hour. I now use a snap that's updated very quickly and is already updated to 29.1:
It takes under a minute with an ancient i5 for me, so I'm not sure what would cause yours to be so slow.
I have a script to build it myself, took a little but of time to get right, but now it works nicely and I can stay at the bleeding edge.
All these answers got me inspired. Might as well try this. But for the sake of not reinventing the wheel, Would you mind sharing? Maybe as a github gist or any pastebin would suffice. (PS. I'm already afraid the GCC version of my Ubuntu 20 throws issues hehe! Let's see!!)
Sure, here's the gist of it with some unrelated stuff removed. This was made for Ubuntu 18.04, but the deb will work on 20.04 as well.
apt-get update
apt-get install -y git software-properties-common make checkinstall autoconf texinfo
add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-10 g++-10 libgccjit0 libgccjit-10-dev libjansson4 libjansson-dev libgtk-3-dev
apt-get install -y libjpeg-dev libxpm-dev libgif-dev libtiff-dev libgnutls28-dev libncurses-dev
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
git clone --depth=1 git://git.sv.gnu.org/emacs.git --branch=master # or use emacs-28.1 or whatever tag
cd emacs || exit
./autogen.sh
./configure \
--with-cairo \
--with-gnutls \
--with-harfbuzz \
--with-jpeg \
--with-json \
--with-mailutils \
--with-modules \
--with-native-compilation \
--with-pgtk \
--with-png \
--with-rsvg \
--with-tiff \
--with-wide-int \
--with-x-toolkit=gtk3 \
--with-xft \
--with-xml2 \
--with-xpm \
--without-compress-install \
--without-gconf \
--without-gsettings \
--without-imagemagick \
--without-toolkit-scroll-bars \
--without-xaw3d \
--without-xwidgets \
CFLAGS="-O3 -mtune=native -march=native -fomit-frame-pointer" \
prefix=/usr/local
make -j"$(nproc)" NATIVE_FULL_AOT=1
checkinstall -y -D --install=no \
--pkgname=${pkgname}-nativecomp \
--pkgversion=1"$(git rev-parse --short HEAD)" \
--requires="libjansson-dev,libharfbuzz-dev,libgccjit-10-dev" \
--pkggroup=emacs \
--gzman=yes \
make install-stripThe core issue is there isn't a 'emacs.tiny' package that contains a small subset of emacs features.
This makes it difficult to install emacs on a resource constrainted environment like a embedded system, and hard to justify installing on a server. (Yes we can use tramp but it's not always a option)
It's a real shame and why I still need to know vi and vim.
Re:Emacs 29.1 Released
by globular-toast on Sunday July 30, 2023 @11:01AM
(#36931824)
Most emacs users I know retain a modicum of vi/vim knowledge for those situations where emacs isn't available. It's more because of the ubiquity of vi/vim, though. There are mini versions of emacs available like MicroEmacs and mg, the latter being more compatible with GNU Emacs.
Debian (and derivatives, like Ubuntu) have the “emacs-nox” package, which should qualify for your needs, I think?
Re:Emacs 29.1 Released
by LanternLight83 on Sunday July 30, 2023 @02:19PM
(#36934291)
It's a step in the right direction, but the issue is that there's so much that can't be removed from Emacs with build flags, eg. `lisp/play/`. Even setting the `-games` USE flag in Gentoo only removes cross-user score sharing[1], because (although less likely with games) you never know what modules might depend on within the standard distribution. Emacs is a big ball of stuff that no one's been willing to tease apart, even when it comes to modules that are probably not going to be loaded at runtime.
1: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/e...
One option is uEmacs (or one of its many forks such as mg). It’s tiny.
Re:Emacs 29.1 Released
by globular-toast on Sunday July 30, 2023 @10:54AM
(#36931743)
Built it this morning on Gentoo!