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.bugs Subject: bug#64018: 29.0.91; Improve tree-sitter docs Date: Tue, 13 Jun 2023 18:53:15 +0300 Message-ID: <838rcnwe8k.fsf@gnu.org> References: <878rco22cy.fsf@epfl.ch> <837cs8yaxk.fsf@gnu.org> <87a5x3czkr.fsf@epfl.ch> <83fs6vwkt7.fsf@gnu.org> <87ilbra0b4.fsf@epfl.ch> 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="4249"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64018@debbugs.gnu.org, casouri@gmail.com To: Basil Contovounesios Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 13 17:54:10 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q96LR-0000sZ-Tz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jun 2023 17:54:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q96LL-0001sr-EW; Tue, 13 Jun 2023 11:54:03 -0400 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 1q96LK-0001sb-EP for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q96LK-0002Vv-4T for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q96LJ-00038g-Vl for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64018 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64018-submit@debbugs.gnu.org id=B64018.168667158512003 (code B ref 64018); Tue, 13 Jun 2023 15:54:01 +0000 Original-Received: (at 64018) by debbugs.gnu.org; 13 Jun 2023 15:53:05 +0000 Original-Received: from localhost ([127.0.0.1]:42818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96KO-00037X-Hk for submit@debbugs.gnu.org; Tue, 13 Jun 2023 11:53:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96KN-00036w-22 for 64018@debbugs.gnu.org; Tue, 13 Jun 2023 11:53:03 -0400 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 1q96KH-0002Qz-HO; Tue, 13 Jun 2023 11:52:57 -0400 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=fdffsQrf8r7oCUCJydjFCHVk9KcqwL8G4RodxRxHrDI=; b=r6pubM2u9AOtluVrSXZU 3fux+d9BFqwi94Ff7UadsOGk6vkJ9izUQHP2MmzLR+yz1GKUfSk18MREp4fCQejRcKbbXY0UaSCBG tY2158Mle+/vmS905MwgycaULbTgKK74JNPaNXkFJvsoe5lufhP/yTYfeoukqXU6KtvorH5TIjrSJ o0OVSNnmB3qCHPo3Uv7x+XweG71MFV1ogN+824clW8DCdK1IuMvb1MH7TTsWAxLHL24TS328pVFp5 Ip6bA4tBMS1XHQiq8O/d6A8HdRzId8tbwJDrHnbnHJWOEJpQLT9uhBry+M0mJPYDoZ1HG8UAR7fDq ymmWzyr5l4SkUA==; 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 1q96KG-0007a5-7F; Tue, 13 Jun 2023 11:52:57 -0400 In-Reply-To: <87ilbra0b4.fsf@epfl.ch> (message from Basil Contovounesios on Tue, 13 Jun 2023 15:45:03 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263329 Archived-At: > From: Basil Contovounesios > Cc: 64018@debbugs.gnu.org, casouri@gmail.com > Date: Tue, 13 Jun 2023 15:45:03 +0100 > > Eli Zaretskii [2023-06-13 09:31 -0400] wrote: > > > But on second thought: why do you need the colon at all? What does it > > signifiy? If you must say that KEYWORD begins with a colon, just say > > that (although it's pretty clear), or maybe show an example. > > I added a colon in this single instance for consistency with subsequent > paragraphs of the same function definition: > > It takes a series of QUERY-SPECs, where each QUERY-SPEC is a QUERY > preceded by zero or more KEYWORD/VALUE pairs. Each QUERY is a > ^^^^^^^ > tree-sitter query in either the string, s-expression or compiled > form, or a function. > > If QUERY is a tree-sitter query, it should be preceded by two > :KEYWORD/VALUE pairs, where the ‘:embed’ keyword specifies the > ^^^^^^^^ > embedded language, and the ‘:host’ keyword specified the host > language. > > [...] > > If QUERY is a function, it doesn’t need any :KEYWORD and VALUE > ^^^^^^^^ > pair. It should be a function that takes 2 arguments, START and > END, and sets the ranges for parsers in the current buffer in the > region between START and END. It is fine for this function to set > ranges in a larger region that encompasses the region between START > and END. > > The same @var{:keyword}/@var{value} pattern also appears a couple of > times in the related '(elisp) Parser-based Font Lock'. > > I don't mind what we go with, so long as it's used consistently across > paragraphs of the same definition. Which markup/wording do you prefer? I think the colons should removed.