Blog: 2023-06-29

From razwiki
Jump to navigation Jump to search

Ok I got emacs compiled

learned about pkg-config, use this to get the flags for c compiler:

gtk-learn $ cat Makefile
all: hello-world-gtk

hello-world-gtk: hello-world-gtk.c
	$(CC) `pkg-config --cflags gtk4` -o hello-world-gtk hello-world-gtk.c -Wall -pedantic `pkg-config --libs gtk4`

Also made a gtk 4 hello-world window, which was pretty hard but fun. Apparently emacs uses gtk 3 for wayland. There's a good writeup on the emacs/wayland situation in the answer here: https://emacs.stackexchange.com/questions/48561/is-there-an-x11-free-build-of-emacs-that-can-run-on-wayland-not-going-through-x

Compiling emacs was a bit of a hassle, but this post had the specifics: https://oylenshpeegul.gitlab.io/blog/posts/20230206/

Here's my final configure command:

./configure --with-json --with-native-compilation --with-pgtk --without-x


But I guess I have emacs _30_ running wayland, and it uses eglot for lsp quite easily. Just had to install the python-lsp-server pip package, with extras:

pipx install python-lsp-server[all]

And emacs is already starting to look like a development environment, right out of the box, without even any external packages. Nice.