GithubHelp home page GithubHelp logo

Comments (12)

ubolonton avatar ubolonton commented on April 20, 2024
  • What is your OS? What is the version?
  • What is your Emacs version? Was it built with dynamic module support? You can check that with (functionp 'module-load)) and module-file-suffix.
  • Does this work: (module-load "full/path/to/tree-sitter-dyn.so")?

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024
  • Linux Mint 19.2 Tessa
  • it evals to nil and the variable is not defined
  • module-load is a void function

gonna re-compile Emacs with the dynamic modules option on and try again

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

With the latest two items:

  • now it evals to t and the suffix is .so
  • the evaluation of that returns t too.

the repository directory is part of the load-path variable, so, at this point I don't know what's wrong:

Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50asymptote.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading cjk-enc...
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...
Loading /etc/emacs/site-start.d/50mu4e.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...
Cannot open load file: No existe el archivo o el directorio, tree-sitter-dyn
Makefile:18: recipe for target 'test' failed
make: *** [test] Error 255

from elisp-tree-sitter.

ubolonton avatar ubolonton commented on April 20, 2024

Sorry I forgot about this. Have you tried using module-load directly, after recompiling Emacs with dynamic module support?

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

from elisp-tree-sitter.

ubolonton avatar ubolonton commented on April 20, 2024

I mean, have you tried (module-load "full/path/to/tree-sitter-dyn.so") after recompiling Emacs?

require uses module-load underneath, and was/is buggy in certain combinations of Emacs+OS.

Cannot open load file looks like an error reported by require.

Using module-load directly would have reported Module could not be opened.

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

I tried exactly that and module-load ((module-load "/home/jorge/code/emacs/emacs-tree-sitter/tree-sitter-dyn.so")) returns t for me.

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

also, running (require 'tree-sitter-dyn) works, too (after evaluating (add-to-list 'load-path "/home/jorge/code/emacs/emacs-tree-sitter")).

from elisp-tree-sitter.

ubolonton avatar ubolonton commented on April 20, 2024

So it's now working in your setup, or am I misunderstanding?

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

it works, but if I run make test the command fails, this has to be something related to my Emacs setup maybe? there is a chance that running make test loads my configuration and because I don't have (add-to-list 'load-path "/home/jorge/code/emacs/emacs-tree-sitter") anywhere in it may be the cause of the failure

So, if I'm right (I will check the code related to the testing right now) this should work differently I think

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

Okay, I think I know what's going on.

in bin/env.bash you have an export for EMACS with the name of the emacs command, if I do which emacs this name points to /usr/bin/emacs but this is wrong because I use Emacs from Snapcraft, the Emacs provided by Snapcraft is the one with the dynamic module turned on.

Gonna test something and provide a pull request if my experiment works

from elisp-tree-sitter.

shackra avatar shackra commented on April 20, 2024

PR made, please review it

from elisp-tree-sitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.