Emacs 29 and Eglot!

Emacs 29 will be released later this year, but it's already got a couple of neat additions. Let's try it!

I already ran these when I compiled Emacs 28.

sudo apt build-dep emacs
gcc --version # mine is... 12
sudo apt install libgccjit-12-dev

There's a branch for Emacs 29 in the git repository. We can check out just that branch.

git clone --single-branch --branch=emacs-29 http://git.savannah.gnu.org/r/emacs.git emacs-29

Then we build it just as with Emacs 28.

cd emacs-29
./autogen.sh
./configure --with-native-compilation
make -j16
make -j16 check
src/emacs -Q # try it out!
sudo make install

Looks like it worked!

❯ emacs --version
GNU Emacs 29.0.60
Development version 5a6dfab1e4d5 on emacs-29 branch; build date 2023-02-06.
Copyright (C) 2023 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Again, let's double check that we have native compilation that we asked for.

M-x describe-variable RET system-configuration-features RET

Looks good!

Emacs 29 with native compilation enabled

Emacs 29 has transparency. I've been adjusting the alpha frame parameter for some time. That makes the whole window transparent. Now there is an alpha-background frame parameter, which is more what you expect.

;; For current frame
(set-frame-parameter nil 'alpha-background 90)
;; For all new frames henceforth
(add-to-list 'default-frame-alist '(alpha-background . 90))

Emacs 29 includes eglot! I've been accessing language servers with lsp-mode, which I configure for each language. Eglot will try to guess the language server with no configuration at all. It's amazing!

You can run

M-x eglot RET

from just about anywhere and it will look for an appropriate language server. Of course, you may want to configure languages you use a lot. If nothing else, you can enable it by default. For example, this is my go.el file

(require 'eglot)
(add-hook 'go-mode-hook 'eglot-ensure)

When I open a .go file, it essentially runs M-x eglot RET for me.

Visit a go file in Emacs

Now I can start using the language server immediately.

Use the language server.

Emacs 29 is going to be fantastic!