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:

Compiling emacs was a bit of a hassle, but this post had the specifics:

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.