purcell / emacs.d

An Emacs configuration bundle with batteries included
BSD 2-Clause "Simplified" License
6.82k stars 2.04k forks source link

treesit-extra-load-path error when start emacs #849

Closed kungelee closed 7 months ago

kungelee commented 11 months ago

let: Symbol’s value as variable is void: treesit-extra-load-path

purcell commented 11 months ago

Which Emacs version do you have?

purcell commented 11 months ago

Maybe the change in 7b174a5d helps?

kungelee commented 11 months ago

Warning

■ Warning (initialization): An error occurred while loading ‘c:/HOME/.emacs.d/init.el’:

Symbol's value as variable is void: treesit-extra-load-path

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace.

Emacs Version

GNU Emacs 29.1 (build 5, x86_64-w64-mingw32) of 2023-08-01

Sysmtem version

Microsoft Windows [Version 10.0.19045.3324]

Version Windows 10 Enterprise Version number 22H2 Installation date 2023-03-28 Operating System Internal Version 19045.3324 Experience Windows Feature Experience Pack 1000.19041.1000.0

purcell commented 11 months ago

Okay, thanks, and is that with the latest commit? I would hope that it would have fixed the issue for you.

kungelee commented 11 months ago

Maybe the change in 7b174a5 helps?

■ Warning (initialization): An error occurred while loading ‘c:/HOME/.emacs.d/init.el’:

End of file during parsing: c:/HOME/.emacs.d/init.el

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace.

D:\emacs-29.1-src\bin\runemacs.exe --debug-init

kungelee commented 11 months ago

01 02

kungelee commented 11 months ago

for %i in (*) do ren "%i" "libtree-sitter-%i"

purcell commented 11 months ago

"End of file during parsing: ../init.el" is the problem you should investigate. You must have invalid lisp in there somewhere, as a result of local editing.

kungelee commented 11 months ago

Compile again with: --with-tree-sitter

./autogen.sh PKG_CONFIG_PATH=/mingw64/lib/pkgconfig ./configure --host=x86_64-w64-mingw32 \ --target=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --with-wide-int \ --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2 \ --with-gnutls --without-imagemagick --with-tree-sitter make -j make install prefix=/d/emacs-29.1

image

kungelee commented 11 months ago

Thank you very much. I found the problem. I missed a parenthesis when copying the code, but the tree-sitter still does not work. In addition, the hard line on the right does not display properly

image

kungelee commented 11 months ago

image

purcell commented 11 months ago

Okay, but that code in init.el isn't the same as the code in my repo.

Re. the line on the right, see init-editing-utils.el: display-fill-column-indicator-character is set to a unicode character that appears to be missing in your font. You can either change that code, or try a different font, but I can't offer advice for Emacs on Windows sorry.

gwijayas commented 7 months ago

@kungelee try download this instead. I think, your emacs build, not support tree-sitter (the message: cannot activate tree-sitter.....). After running emacs, try Ctrl + h and put treesit-extra-load-path. if is supported, the message buffer will like treesit-extra-load-path is a variable defined in ‘C source code’. (I tested from zip version and exe running on Windows 10)

As for me, I have succesfully build emacs 29.1 with tree-sitter supported, on windows using this recipe. But, unless you are curious about building emacs(master) on windows or want to use msys2 toolkit/environment on windows for building C/C++ application/learning, the one from GNU's repo is sufficient (I will choose zipped version).

purcell commented 7 months ago

Closing as the issue is resolved in this repo.