Upgrading to Emacs 28.2

:: emacs

I upgraded to Emacs 28.2 (MacOS Ventura), and it required a few tweaks, so I’m documenting that here for future reference.

When I first tried the typical build steps, I received a “not found” error for a libxml2 header. I installed libxml2 via brew install libxml2; however, it placed the header files in a location unexpected by the Emacs makefile. So I had to edit the configure script (see below).

  1. Go to http://mirror.keystealth.org/gnu/emacs/
  2. Download emacs–28.2.tar.gz
  3. tar xzf emacs–28.2.tar.gz
  4. cd emacs–28.2
  5. Edit the configure file and make the changes as described below [1].
  6. ./configure --with-ns
  7. make
  8. make install
  9. Drag nextstep/Emacs.app to the Applications directory

Also, with MacOS Ventura, I had to give Emacs full disk access to be able to view directory listings on external drives.

[1] Changes to configure file to properly locate the libxml2 files. Change:

CPPFLAGS="$CPPFLAGS -isystem${xcsdkdir}/usr/include/libxml2"

to:

CPPFLAGS="$CPPFLAGS -i/usr/local/opt/libxml2/include/libxml2"

and change:

LIBXML2_CFLAGS="-isystem${xcsdkdir}/usr/include/libxml2"

to:

LIBXML2_CFLAGS="-i/usr/local/opt/libxml2/include/libxml2"