From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Treesit says grammar is unavailable when it Date: Fri, 10 Mar 2023 14:32:33 +0200 Message-ID: <83ilf8zt0e.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3842"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: mprodrigues@posteo.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 10 13:33:41 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pabwL-0000me-5Y for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Mar 2023 13:33:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pabva-0002yI-R7; Fri, 10 Mar 2023 07:32:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pabvY-0002x7-6z for emacs-devel@gnu.org; Fri, 10 Mar 2023 07:32:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pabvX-00015x-RS; Fri, 10 Mar 2023 07:32:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RXhJrxk66t4Q3OqlYYlOKEYlu2G6ynvJlGvgDrPqBx0=; b=kxM4+8hD0wyY SaGj0bx+tg7sGgnj3zFPZErrGpXrO/S0JZC8Gmxds7kCDIiTFS0nDIaiwbPJ5UhWJMDpzOoVQT4C8 zak6+FFgquePRjX8uhXoIgIv2qxZQ0j3M37ePEhE34S8ZNR461xGpbJ9HHwySpkj9e4bZWFCJeFZq IG4NLEI8Mh15lEIJrVxWCiVzlhMZiMbPNheoeZ6mqRvc7zcBrHGKeT4ttAi649kjGWHmU4p89F2XW NWAjaIGUBIERaGCsmr4+zhKHRfmiRdWahon4mhczEU/7aZyJlZ3pobL8nvhUxe9PSUgiIgd+qyaw1 KyWf59z9ZqV5lKtEJYQggw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pabvX-0004zE-Ag; Fri, 10 Mar 2023 07:32:51 -0500 In-Reply-To: (mprodrigues@posteo.net) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304239 Archived-At: > Date: Fri, 10 Mar 2023 09:24:25 +0000 > From: mprodrigues@posteo.net > > I've been trying to test the new tree-sitter modes, but I'm having some > difficulties and would like to debug this. I have tried > dockerfile-ts-mode, > python-ts-mode and yaml-ts-mode, of these only dockerfile worked, for > the other two I get: > > Warning (treesit): Cannot activate tree-sitter, because language grammar > for python is unavailable (not-found): (libtree-sitter-python > libtree-sitter-python.so) > No such file or directory > > but I have yaml and python's grammar under ~/.emacs.d/tree-sitter > I tried compiling the grammars myself and use emacs's own > treesit-install-language-grammar to no avail. How can I debug this? What is the value of user-emacs-directory in your Emacs sessions? Also, please show the full contents of the ~/.emacs.d/tree-sitter directory. To debug this, I'd recommend stepping with a debugger into the function treesit_load_language, and trying to figure out why it fails to find the shared libraries you installed.