alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
72 stars 12 forks source link

Emacs 29 (current beta) can't load tree sitter grammars #55

Closed endlisnis closed 1 year ago

endlisnis commented 1 year ago

Tree sitter is supposed to be a built-in feature starting with v29, but your snap version is built without that option.

I see

"--prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3 --without-xaw3d --with-modules --with-cairo --with-native-compilation --with-xinput2 'CFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem/build/emacs/stage/usr/include -O2' 'CPPFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem/build/emacs/stage/usr/include' 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib -L/build/emacs/parts/emacs/install/usr/lib -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu -L/build/emacs/stage/usr/lib'"

Without this option, Emacs claims to support treesitter, but can't actually load any grammars.

endlisnis commented 1 year ago

You can look at https://www.reddit.com/r/emacs/comments/131629d/comment/ji0qhvv for some more context if needed.

alexmurray commented 1 year ago

Thanks for filing this issue - I was able to reproduce it and am working on fixing it.

However, I am travelling now so haven't had the bandwidth to test doing a full build locally but I hope the changes in https://github.com/alexmurray/emacs-snap/commit/ba6a87297417d14bc47b83ea18e0e1d80efe355e may be sufficient to solve this issue. I will test it in the next 24 hours and update this issue once I have more information.

endlisnis commented 1 year ago

Great. Thanks. I'll wait for your update.

alexmurray commented 1 year ago

Should be fixed now as 56c91ca238060af3fe6536ac7bcdbce4e27182c8 - I have tested it and it appears to work as expected now but if you could also verify @endlisnis that would be great. Thanks.

endlisnis commented 1 year ago

I tested with "29.0.90-emacs-29-0e52bee" and I'm able to load grammars.

alexmurray commented 1 year ago

Excellent - thanks.