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 introduction documentation Date: Fri, 16 Dec 2022 21:37:07 +0200 Message-ID: <83o7s3i1i4.fsf@gnu.org> References: <83edszjslp.fsf@gnu.org> <83v8mbi7b9.fsf@gnu.org> <93595C69-560B-45BA-915C-BA74A9BBA712@easesoftware.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="24345"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Perry Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 16 20:37:56 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 1p6GWq-00064b-IY for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Dec 2022 20:37:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6GWD-0003as-Ah; Fri, 16 Dec 2022 14:37:17 -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 1p6GW1-0003We-B1 for emacs-devel@gnu.org; Fri, 16 Dec 2022 14:37:06 -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 1p6GW0-00057U-QN; Fri, 16 Dec 2022 14:37:04 -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=2HAaGZ/6HNliSDfC8o/HKIyr6IMb77phherZuYiAaD4=; b=ClFBXW3t9TwBF0JShw+u 0a+sROgb6SAQz5m1oUuwXOn856Yg7ZitYh0AgYZCBY+V5IS4eIP+GMuF3vZZImSOaqi22Q4D4gw0k KRDGkhG+TgB3sXoN4+ARBBy/wr2qP4EUZ+lAJjl6TuNyp1at/P1BujkM3OtESFp/5G44fx8rzwcnU qz69I1tdK+huG7SyqxvpIcEtaYuiAIDsqa+tdFuSvmuvlUSnWIVUC1hiGOaCm70kALZZe41pR2udC CFi1IfWSAH4nstu0xg2Ysm5k3lncMIFNtGjjRcuF3nqWo80wu388K+g3KGbMPLSf3xoEOr0osx67G kqQpDjgntTV4PQ==; 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 1p6GW0-0002py-7x; Fri, 16 Dec 2022 14:37:04 -0500 In-Reply-To: <93595C69-560B-45BA-915C-BA74A9BBA712@easesoftware.com> (message from Perry Smith on Fri, 16 Dec 2022 13:08:45 -0600) 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:301520 Archived-At: > From: Perry Smith > Date: Fri, 16 Dec 2022 13:08:45 -0600 > Cc: emacs-devel@gnu.org > > >>> My main problem is where to put this stuff. > >> > >> There are tree sitter Info pages in the ELisp topic but I would add some to Emacs topic as well. Perhaps under > >> Advanced Features > >> Tree Sitter > >> Setup and Getting Started > >> Font lock — describe the “features” concept, treesit-font-lock-level and treesit-font-lock-recompute-features > >> > >> The other topics seem more appropriate in ELisp which already exist. > > > > This is not relevant to ELisp, so the ELisp Reference manual is not an > > appropriate place for this stuff. > > We might be talking about two different things. In > admin/notes/tree-sitter/html-manual are 10 html documents. For > example one is titled "Accessing Node Information". All of those come > from nodes within the ELisp Info doc. e.g. > > https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/parsing.texi#n875 > > That seems like the right place for those nodes since they are rather > low level. > > The higher level user interface concepts I would think would need to > be in the Emacs Info tree as I suggested. This all started (for me, anyway), when you wrote: > Emacs needs to be compiled with tree-sitter enabled > The tree sitter binary needs to be installed > The tree sitter language specific parser needs to be installed > The appropriate major mode needs to be loaded and enabled > > Is there a page either in Info or on the web that contains all these steps? I interpreted "all these steps" as meaning the description of how to do all of the above: compile Emacs with tree-sitter enabled, install the tree-sitter library, install the language grammar libraries. By contrast, the information to which you point is about writing code that accesses parsing results provided by the tree-sitter library, a very different kind of topic. That topic _is_ described in the ELisp manual, see the file doc/lispref/parsing.texi.