• Re: Correct version of treesit language grammar for Python in Debian 13

    From Loris Bennett@3:633/10 to All on Friday, February 06, 2026 16:30:01
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    David <bouncingcats@gmail.com> writes:

    On Fri, 6 Feb 2026 at 14:15, Loris Bennett <loris.bennett@fu-berlin.de> wrote:

    Hi,

    I am on Debian 13 and am trying to install the Python language grammar for >> tree sitter.

    Hi, it will help people to help you if you describe exactly *how* you
    are doing that.

    Is what you are installing coming from a Debian distribution, or somewhere else?

    Emacs and the tree sitter library are from the Debian repo. The installation of the grammar pulls in an external Github repository and compiles the code to produce a shared library. I am using the standard repository for the Python language grammar.

    So, no, it not actually a Debian problem. I was just was hoping someone else has tried to do the same thing with a Debian stable set up.

    --
    This signature is currently under constuction.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From David@3:633/10 to All on Saturday, February 07, 2026 00:10:02
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    On Fri, 6 Feb 2026 at 15:27, Loris Bennett <loris.bennett@fu-berlin.de> wrote:
    David <bouncingcats@gmail.com> writes:
    On Fri, 6 Feb 2026 at 14:15, Loris Bennett <loris.bennett@fu-berlin.de> wrote:

    Hi,

    I am on Debian 13 and am trying to install the Python language grammar
    for tree sitter.

    Hi, it will help people to help you if you describe exactly *how* you
    are doing that.

    Is what you are installing coming from a Debian distribution, or
    somewhere else?

    Emacs and the tree sitter library are from the Debian repo. The
    installation of the grammar pulls in an external Github repository and compiles the code to produce a shared library. I am using the standard repository for the Python language grammar.

    So, no, it not actually a Debian problem. I was just was hoping someone
    else has tried to do the same thing with a Debian stable set up.

    Hi,

    If you provide sufficient details then maybe some helpful, knowledgeable and curious person (not me) will reproduce your issue and be able to respond
    with a solution.

    So you are talking about installing tree-sitter into Emacs on Debian 13?

    How does that happen?

    Can you describe more *how* you are doing that?

    So that someone else can try it for themselve and experience the issue that
    you are describing.

    Warning (treesit): The installed language grammar for python cannot be located or has problems (version-mismatch): 15

    That message suggests a Python PATH problem. Which should be solveable,
    but I'm not smart enough to suggest how to fix it.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Xiyue Deng@3:633/10 to All on Sunday, February 08, 2026 00:30:01
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    Hi Loris,
    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
    Hi,

    I am on Debian 13 and am trying to install the Python language grammar for tree sitter. IIUC there is some ABI issue regarding the installed version of libtree-sitter (on Debian 13: 0.22.6) and the version of the language grammar one can install.

    However I have tried multiple versions of the grammar, from the very old to the most recent and always get the error:

    Warning (treesit): The installed language grammar for python cannot be located or has problems (version-mismatch): 15

    What am I doing wrong?

    tree-sitter transitioned to ABI 15 since 0.23.x, which explains why you
    are seeing this issue on Trixie which has 0.22.6 as you've discovered.
    This would not be an issue if you regenerate everything in the language
    source code, but Emacs only cares about the generated parser code
    (usually src/parser.c and src/scanner.c), and if the release you use is generated using a newer tree-sitter you'll see this issue.
    A simple fix is to find the last release that was generated with
    tree-sitter on ABI 14. For python, you can add the following to your
    init.el (I'm using boxquote and you can remove the prefixes using `M-x boxquote-unbox-region'):
    ,----[ tree-sitter-python for ABI 14 ]
    | (add-to-list 'treesit-language-source-alist
    | `((python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))))
    `----
    Hopefully we'll have some tree-sitter grammars shipped in Forky so that
    users can use the *-ts-mode without such hassle.
    P.S. For people using treesit-auto, I've been using a treesit-language-source-alist setting that should work with Trixie for
    most of the incompatible grammars that it supports. Hope this is
    useful.
    Note: I have to fork some of the repos as Emacs doesn't seem to support checking out a specific commit and I need to create a branch for it to
    work. Also tree-sitter-latex doesn't ship src/parser.c at all so I just regenerated the source code manually. If you know of a better way to
    handle these do let me know :)
    ,----[ treesit-auto compatible settings for ABI 14 ]
    | (setq treesit-language-source-alist
    | `((bash "https://github.com/tree-sitter/tree-sitter-bash"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.0"
    | "master"))
    | (bibtex "https://github.com/manphiz/tree-sitter-bibtex"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (c "https://github.com/tree-sitter/tree-sitter-c"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.3"
    | "master"))
    | (css "https://github.com/tree-sitter/tree-sitter-css"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.1"
    | "master"))
    | (go "https://github.com/tree-sitter/tree-sitter-go"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.2"
    | "master"))
    | (gomod "https://github.com/camdencheek/tree-sitter-go-mod"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.0"
    | "master"))
    | (janet "https://github.com/manphiz/tree-sitter-janet"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (javascript "https://github.com/tree-sitter/tree-sitter-javascript"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.4"
    | "master"))
    | (julia "https://github.com/tree-sitter/tree-sitter-julia"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (latex "https://github.com/manphiz/tree-sitter-latex" "manual-abi-14")
    | (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.3.0"
    | "master"))
    | (magik "https://github.com/krn-robin/tree-sitter-magik"
    | ,(if (< (treesit-library-abi-version) 15)
    | "0.0.1"
    | "master"))
    | (markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
    | "main")
    | (nu "https://github.com/manphiz/tree-sitter-nu"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (perl "https://github.com/ganezdragon/tree-sitter-perl"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.1"
    | "master"))
    | (python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))
    | (rust "https://github.com/tree-sitter/tree-sitter-rust"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.3"
    | "master"))
    | (sql "https://github.com/manphiz/tree-sitter-sql"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "gh-pages"))
    | (vue "https://github.com/manphiz/tree-sitter-vue"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.7.2"
    | "master"))))
    `----
    Cheers,

    Loris
    --
    Regards,
    Xiyue Deng


    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Loris Bennett@3:633/10 to All on Wednesday, February 11, 2026 17:30:01
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    Hi Xiyue,

    Xiyue Deng <manphiz@gmail.com> writes:

    Hi Loris,

    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:

    Hi,

    I am on Debian 13 and am trying to install the Python language grammar for >> tree sitter. IIUC there is some ABI issue regarding the installed version of
    libtree-sitter (on Debian 13: 0.22.6) and the version of the language grammar
    one can install.

    However I have tried multiple versions of the grammar, from the very old to >> the most recent and always get the error:

    Warning (treesit): The installed language grammar for python cannot be located or has problems (version-mismatch): 15

    What am I doing wrong?


    tree-sitter transitioned to ABI 15 since 0.23.x, which explains why you
    are seeing this issue on Trixie which has 0.22.6 as you've discovered.
    This would not be an issue if you regenerate everything in the language source code, but Emacs only cares about the generated parser code
    (usually src/parser.c and src/scanner.c), and if the release you use is generated using a newer tree-sitter you'll see this issue.

    A simple fix is to find the last release that was generated with
    tree-sitter on ABI 14. For python, you can add the following to your
    init.el (I'm using boxquote and you can remove the prefixes using `M-x boxquote-unbox-region'):

    ,----[ tree-sitter-python for ABI 14 ]
    | (add-to-list 'treesit-language-source-alist
    | `((python "https://github.com/tree-sitter/tree-sitter-python" | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))))
    `----

    Hopefully we'll have some tree-sitter grammars shipped in Forky so that
    users can use the *-ts-mode without such hassle.

    Unfortunately the snippet above doesn't help. I still get the version
    mismatch error. Even if I specify v0.23.6 explicitly when asked for the tag
    or branch, an ABI 15 version of the grammar is still seems to be built. I
    even tried the oldest tag, v0.0.2, but still got the same error.

    I'm not sure what is going on. The shared object files themselves certainly seem to differ (I renamed the file generated with the tag v0.0.2):

    [17:03:16] loris (2021) ~/.emacs.d.work/tree-sitter
    $ ll
    total 1236
    -rwxr-xr-x 1 loris users 777056 Feb 11 16:58 libtree-sitter-python.0.0.2.so
    -rwxr-xr-x 1 loris users 484112 Feb 11 17:01 libtree-sitter-python.so

    Any ideas?

    Cheers,

    Loris

    P.S. For people using treesit-auto, I've been using a treesit-language-source-alist setting that should work with Trixie for
    most of the incompatible grammars that it supports. Hope this is
    useful.

    Note: I have to fork some of the repos as Emacs doesn't seem to support checking out a specific commit and I need to create a branch for it to
    work. Also tree-sitter-latex doesn't ship src/parser.c at all so I just regenerated the source code manually. If you know of a better way to
    handle these do let me know :)

    ,----[ treesit-auto compatible settings for ABI 14 ]
    | (setq treesit-language-source-alist
    | `((bash "https://github.com/tree-sitter/tree-sitter-bash"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.0"
    | "master"))
    | (bibtex "https://github.com/manphiz/tree-sitter-bibtex"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (c "https://github.com/tree-sitter/tree-sitter-c"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.3"
    | "master"))
    | (css "https://github.com/tree-sitter/tree-sitter-css"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.1"
    | "master"))
    | (go "https://github.com/tree-sitter/tree-sitter-go"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.2"
    | "master"))
    | (gomod "https://github.com/camdencheek/tree-sitter-go-mod"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.0"
    | "master"))
    | (janet "https://github.com/manphiz/tree-sitter-janet"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (javascript "https://github.com/tree-sitter/tree-sitter-javascript" | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.4"
    | "master"))
    | (julia "https://github.com/tree-sitter/tree-sitter-julia"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (latex "https://github.com/manphiz/tree-sitter-latex" "manual-abi-14")
    | (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.3.0"
    | "master"))
    | (magik "https://github.com/krn-robin/tree-sitter-magik"
    | ,(if (< (treesit-library-abi-version) 15)
    | "0.0.1"
    | "master"))
    | (markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
    | "main")
    | (nu "https://github.com/manphiz/tree-sitter-nu"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (perl "https://github.com/ganezdragon/tree-sitter-perl"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.1"
    | "master"))
    | (python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))
    | (rust "https://github.com/tree-sitter/tree-sitter-rust"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.3"
    | "master"))
    | (sql "https://github.com/manphiz/tree-sitter-sql"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "gh-pages"))
    | (vue "https://github.com/manphiz/tree-sitter-vue"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.7.2"
    | "master"))))
    `----

    Cheers,

    Loris
    --
    This signature is currently under constuction.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Xiyue Deng@3:633/10 to All on Wednesday, February 11, 2026 19:30:01
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    Hi Loris,
    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
    Hi Xiyue,

    Xiyue Deng <manphiz@gmail.com> writes:

    Hi Loris,

    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:

    Hi,

    I am on Debian 13 and am trying to install the Python language grammar for >>> tree sitter. IIUC there is some ABI issue regarding the installed version of
    libtree-sitter (on Debian 13: 0.22.6) and the version of the language grammar
    one can install.

    However I have tried multiple versions of the grammar, from the very old to >>> the most recent and always get the error:

    Warning (treesit): The installed language grammar for python cannot be located or has problems (version-mismatch): 15

    What am I doing wrong?


    tree-sitter transitioned to ABI 15 since 0.23.x, which explains why you
    are seeing this issue on Trixie which has 0.22.6 as you've discovered.
    This would not be an issue if you regenerate everything in the language
    source code, but Emacs only cares about the generated parser code
    (usually src/parser.c and src/scanner.c), and if the release you use is
    generated using a newer tree-sitter you'll see this issue.

    A simple fix is to find the last release that was generated with
    tree-sitter on ABI 14. For python, you can add the following to your
    init.el (I'm using boxquote and you can remove the prefixes using `M-x
    boxquote-unbox-region'):

    ,----[ tree-sitter-python for ABI 14 ]
    | (add-to-list 'treesit-language-source-alist
    | `((python "https://github.com/tree-sitter/tree-sitter-python" >> | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))))
    `----

    Hopefully we'll have some tree-sitter grammars shipped in Forky so that
    users can use the *-ts-mode without such hassle.

    Unfortunately the snippet above doesn't help. I still get the version mismatch error. Even if I specify v0.23.6 explicitly when asked for the tag or branch, an ABI 15 version of the grammar is still seems to be built. I even tried the oldest tag, v0.0.2, but still got the same error.

    I'm not sure what is going on. The shared object files themselves certainly seem to differ (I renamed the file generated with the tag v0.0.2):

    [17:03:16] loris (2021) ~/.emacs.d.work/tree-sitter
    $ ll
    total 1236
    -rwxr-xr-x 1 loris users 777056 Feb 11 16:58 libtree-sitter-python.0.0.2.so
    -rwxr-xr-x 1 loris users 484112 Feb 11 17:01 libtree-sitter-python.so

    Any ideas?

    If you have previously tried to compile a grammar library of ABI 15, it
    will produce a libtree-sitter-python.so anyway but fails to load in
    Emacs. And after that, if you tried to compile a grammar library of ABI
    14, it will show the same ABI mismatch error, but the produced libtree-sitter-python.so is actually correct and usable (at least this
    is what I observe on my Trixie system: I can enable python-ts-mode on a
    .py file just fine after this.)
    You can also try to remove the libtree-sitter-python.so file first,
    restart Emacs, and install the grammar again, which should then produce
    no errors.
    Let me know if any of these works (or not).
    Cheers,

    Loris

    P.S. For people using treesit-auto, I've been using a
    treesit-language-source-alist setting that should work with Trixie for
    most of the incompatible grammars that it supports. Hope this is
    useful.

    Note: I have to fork some of the repos as Emacs doesn't seem to support
    checking out a specific commit and I need to create a branch for it to
    work. Also tree-sitter-latex doesn't ship src/parser.c at all so I just
    regenerated the source code manually. If you know of a better way to
    handle these do let me know :)

    ,----[ treesit-auto compatible settings for ABI 14 ]
    | (setq treesit-language-source-alist
    | `((bash "https://github.com/tree-sitter/tree-sitter-bash"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.0"
    | "master"))
    | (bibtex "https://github.com/manphiz/tree-sitter-bibtex"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (c "https://github.com/tree-sitter/tree-sitter-c"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.3"
    | "master"))
    | (css "https://github.com/tree-sitter/tree-sitter-css"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.1"
    | "master"))
    | (go "https://github.com/tree-sitter/tree-sitter-go"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.2"
    | "master"))
    | (gomod "https://github.com/camdencheek/tree-sitter-go-mod"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.0"
    | "master"))
    | (janet "https://github.com/manphiz/tree-sitter-janet"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (javascript "https://github.com/tree-sitter/tree-sitter-javascript"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.4"
    | "master"))
    | (julia "https://github.com/tree-sitter/tree-sitter-julia"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (latex "https://github.com/manphiz/tree-sitter-latex" "manual-abi-14")
    | (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.3.0"
    | "master"))
    | (magik "https://github.com/krn-robin/tree-sitter-magik"
    | ,(if (< (treesit-library-abi-version) 15)
    | "0.0.1"
    | "master"))
    | (markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
    | "main")
    | (nu "https://github.com/manphiz/tree-sitter-nu"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (perl "https://github.com/ganezdragon/tree-sitter-perl"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.1"
    | "master"))
    | (python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))
    | (rust "https://github.com/tree-sitter/tree-sitter-rust"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.3"
    | "master"))
    | (sql "https://github.com/manphiz/tree-sitter-sql"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "gh-pages"))
    | (vue "https://github.com/manphiz/tree-sitter-vue"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml" >> | ,(if (< (treesit-library-abi-version) 15)
    | "v0.7.2"
    | "master"))))
    `----

    Cheers,

    Loris
    --
    Regards,
    Xiyue Deng


    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Loris Bennett@3:633/10 to All on Thursday, February 12, 2026 10:00:01
    Subject: Re: Correct version of treesit language grammar for Python in Debian 13?

    Hi Xiyue,

    Xiyue Deng <manphiz@gmail.com> writes:

    Hi Loris,

    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:

    Hi Xiyue,

    Xiyue Deng <manphiz@gmail.com> writes:

    Hi Loris,

    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:

    Hi,

    I am on Debian 13 and am trying to install the Python language grammar for >>>> tree sitter. IIUC there is some ABI issue regarding the installed version of
    libtree-sitter (on Debian 13: 0.22.6) and the version of the language grammar
    one can install.

    However I have tried multiple versions of the grammar, from the very old to
    the most recent and always get the error:

    Warning (treesit): The installed language grammar for python cannot be located or has problems (version-mismatch): 15

    What am I doing wrong?


    tree-sitter transitioned to ABI 15 since 0.23.x, which explains why you
    are seeing this issue on Trixie which has 0.22.6 as you've discovered.
    This would not be an issue if you regenerate everything in the language
    source code, but Emacs only cares about the generated parser code
    (usually src/parser.c and src/scanner.c), and if the release you use is
    generated using a newer tree-sitter you'll see this issue.

    A simple fix is to find the last release that was generated with
    tree-sitter on ABI 14. For python, you can add the following to your
    init.el (I'm using boxquote and you can remove the prefixes using `M-x
    boxquote-unbox-region'):

    ,----[ tree-sitter-python for ABI 14 ]
    | (add-to-list 'treesit-language-source-alist
    | `((python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))))
    `----

    Hopefully we'll have some tree-sitter grammars shipped in Forky so that
    users can use the *-ts-mode without such hassle.

    Unfortunately the snippet above doesn't help. I still get the version
    mismatch error. Even if I specify v0.23.6 explicitly when asked for the tag >> or branch, an ABI 15 version of the grammar is still seems to be built. I >> even tried the oldest tag, v0.0.2, but still got the same error.

    I'm not sure what is going on. The shared object files themselves certainly >> seem to differ (I renamed the file generated with the tag v0.0.2):

    [17:03:16] loris (2021) ~/.emacs.d.work/tree-sitter
    $ ll
    total 1236
    -rwxr-xr-x 1 loris users 777056 Feb 11 16:58 libtree-sitter-python.0.0.2.so
    -rwxr-xr-x 1 loris users 484112 Feb 11 17:01 libtree-sitter-python.so

    Any ideas?


    If you have previously tried to compile a grammar library of ABI 15, it
    will produce a libtree-sitter-python.so anyway but fails to load in
    Emacs. And after that, if you tried to compile a grammar library of ABI
    14, it will show the same ABI mismatch error, but the produced libtree-sitter-python.so is actually correct and usable (at least this
    is what I observe on my Trixie system: I can enable python-ts-mode on a
    .py file just fine after this.)

    You can also try to remove the libtree-sitter-python.so file first,
    restart Emacs, and install the grammar again, which should then produce
    no errors.

    Let me know if any of these works (or not).

    I started Emacs again this morning and now everything works. Thanks! It is somewhat unfortunate that erroneous errors are produced (if indeed this is the case), since the set-up for tree-sitter is already less straight forward than it is for most Emacs packages.

    However, yesterday enabling 'python-ts-mode' failed with the same version of 'libtree-sitter-python.so' that now worked, so maybe the restart is necessary.

    I have a second laptop with essentially the same configuration where I want to install tree-sitter, so I'll see whether the restart really is needed.

    Cheers,

    Loris

    Cheers,

    Loris

    P.S. For people using treesit-auto, I've been using a
    treesit-language-source-alist setting that should work with Trixie for
    most of the incompatible grammars that it supports. Hope this is
    useful.

    Note: I have to fork some of the repos as Emacs doesn't seem to support
    checking out a specific commit and I need to create a branch for it to
    work. Also tree-sitter-latex doesn't ship src/parser.c at all so I just >>> regenerated the source code manually. If you know of a better way to
    handle these do let me know :)

    ,----[ treesit-auto compatible settings for ABI 14 ]
    | (setq treesit-language-source-alist
    | `((bash "https://github.com/tree-sitter/tree-sitter-bash"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.0"
    | "master"))
    | (bibtex "https://github.com/manphiz/tree-sitter-bibtex"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (c "https://github.com/tree-sitter/tree-sitter-c"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.3"
    | "master"))
    | (css "https://github.com/tree-sitter/tree-sitter-css"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.1"
    | "master"))
    | (go "https://github.com/tree-sitter/tree-sitter-go"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.2"
    | "master"))
    | (gomod "https://github.com/camdencheek/tree-sitter-go-mod"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.0"
    | "master"))
    | (janet "https://github.com/manphiz/tree-sitter-janet"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (javascript "https://github.com/tree-sitter/tree-sitter-javascript"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.21.4"
    | "master"))
    | (julia "https://github.com/tree-sitter/tree-sitter-julia"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.1"
    | "master"))
    | (latex "https://github.com/manphiz/tree-sitter-latex" "manual-abi-14")
    | (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua" >>> | ,(if (< (treesit-library-abi-version) 15)
    | "v0.3.0"
    | "master"))
    | (magik "https://github.com/krn-robin/tree-sitter-magik"
    | ,(if (< (treesit-library-abi-version) 15)
    | "0.0.1"
    | "master"))
    | (markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
    | "main")
    | (nu "https://github.com/manphiz/tree-sitter-nu"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (perl "https://github.com/ganezdragon/tree-sitter-perl"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v1.1.1"
    | "master"))
    | (python "https://github.com/tree-sitter/tree-sitter-python"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.6"
    | "master"))
    | (rust "https://github.com/tree-sitter/tree-sitter-rust"
    | ,(if (< (treesit-library-abi-version) 15)
    | "v0.23.3"
    | "master"))
    | (sql "https://github.com/manphiz/tree-sitter-sql"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "gh-pages"))
    | (vue "https://github.com/manphiz/tree-sitter-vue"
    | ,(if (< (treesit-library-abi-version) 15)
    | "last-abi-14"
    | "master"))
    | (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml" >>> | ,(if (< (treesit-library-abi-version) 15)
    | "v0.7.2"
    | "master"))))
    `----

    Cheers,

    Loris
    --
    This signature is currently under constuction.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)