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: tree-sitter and language support Date: Fri, 25 Nov 2022 14:05:48 +0200 Message-ID: <83h6ynutlv.fsf@gnu.org> References: <6C4C266A-BC65-4486-80D1-1337A07CD6CF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, raman@google.com, emacs-devel@gnu.org To: rrudakov@fastmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 25 13:06:53 2022 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 1oyXTp-00045J-5l for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Nov 2022 13:06:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyXSh-0004Tk-8A; Fri, 25 Nov 2022 07:05:43 -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 1oyXSb-0004TH-Jk for emacs-devel@gnu.org; Fri, 25 Nov 2022 07:05:37 -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 1oyXSb-0006oa-42; Fri, 25 Nov 2022 07:05:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Fgi6+jtw6LWfszU9erwV01UY9TiMf5Bf4Ek6D4F6g2o=; b=oebFJX6yTI2w8p2CCRzy EXXk0aOxsx4wdqtPyJJjlqNeEWKO4pu8v3L21uYJ2PrTrkyUuN8XOW/y5ajyj3AtNI6VfEUS3dDf7 QU/2DjXlx3lEOb34hFRxGDU0VMlIEuEkOoz86r+1PKfP2Kew4Lint7zxBxjcGeqO1mhdMgIeYqsdW cBMYIo8KixvItNAtso5bA4YX8hS+9JPKCFB3yD9YVF94eF+8QZIlOIGKfdNS8WsPls2IUbz1T7MTb lbVqY7wJxtu7LMk4jXaOzeO44XZT+eLUtB6uOrleLhEGnGPhrPwhl/+oN1ae0F3eJioM9sdAuSiR/ wH03gnvqerPzCA==; 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 1oyXSR-0006P5-2J; Fri, 25 Nov 2022 07:05:33 -0500 In-Reply-To: (message from Roman Rudakov on Fri, 25 Nov 2022 11:41:47 +0100) 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:300477 Archived-At: > From: Roman Rudakov > Cc: "T.V Raman" , emacs-devel@gnu.org > Date: Fri, 25 Nov 2022 11:41:47 +0100 > > > We are just starting to work on tree-sitter’s user-facing > > documentation, including the (emacs) manual and NEWS file. I’ll > > definitely improve the error message. In the meantime, find files > > that > > looks like libtree-sitter-xxx.so and put them under > > ~/.emacs.d/tree-sitter (or a standard library location like > > /usr/local/lib), and Emacs should be able to find them. > > > > Yuan > > Hi Yuan! > > I have a question. Are these paths hardcoded? This is Emacs; how can you assume such hard-coded paths are even possible? Of course, they aren't hard-coded! Emacs looks in the standard directories for shared libraries, then in user-emacs-directory, then in the directories mentioned in treesit-extra-load-path. > I can fix it by adding /opt/homebrew/lib to treesit-extra-load-path, > but I'm wondering how to install grammar properly to avoid setting > this variable. Adding this to treesit-extra-load-path is fine. Alternatively, install the shared library where you have the other shared libraries on your system (a.k.a. "standard places").