From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Basil Contovounesios via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64017: Wrong conversion from Emacs to Tree-sitter S-expression syntax Date: Fri, 16 Jun 2023 18:33:28 +0100 Message-ID: <87r0qb1fdj.fsf@epfl.ch> References: <43D49A55-2C3F-4EA4-8DF8-0CD9A516573E@gmail.com> <0CBD145C-0A92-4258-A5F3-6FC616E89ED8@gmail.com> <04C45D03-D49B-4DE4-AD26-2606C94AF260@gmail.com> Reply-To: Basil Contovounesios Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21615"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuan Fu , 64017@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 16 19:34:25 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 1qADL7-0005QV-6w for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Jun 2023 19:34:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qADKn-00034D-4s; Fri, 16 Jun 2023 13:34:05 -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 1qADKk-00033z-QT for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 13:34:03 -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 1qADKk-00057K-HQ for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 13:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qADKk-0007iO-91 for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Basil Contovounesios Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jun 2023 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64017 X-GNU-PR-Package: emacs Original-Received: via spool by 64017-submit@debbugs.gnu.org id=B64017.168693681929624 (code B ref 64017); Fri, 16 Jun 2023 17:34:02 +0000 Original-Received: (at 64017) by debbugs.gnu.org; 16 Jun 2023 17:33:39 +0000 Original-Received: from localhost ([127.0.0.1]:50312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qADKN-0007hj-2p for submit@debbugs.gnu.org; Fri, 16 Jun 2023 13:33:39 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:62536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qADKJ-0007hS-Va for 64017@debbugs.gnu.org; Fri, 16 Jun 2023 13:33:37 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f8ff5fe50aso975595e9.0 for <64017@debbugs.gnu.org>; Fri, 16 Jun 2023 10:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; t=1686936810; x=1689528810; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0T+4sWJ+ZOuzEYtkcgjhJvjnSeoJwTiEIsyCvFRCtJw=; b=T8yz/tlN1QEoKmG0ZspfW90dfK/Mf4W9w4Tkm2EGnGPethIt1xJrGZtjfFZ3iK5d84 +W64sBlS4oopCER6Oe4eTSKk/0lPOrd9ESJBlyb9ibNXrM5WMEuL54QZQRrFUsTWmyMF IN4/kRb5wphwmaI/XKm2E0uA+ALydmtXpD0LsqYn4BlXAxfLZQ6Op+86guOAgF8Ma6Y/ b6DXtXz2U1WykuZwwH9naAU1Wm9EQfjhExUKpgafAukdkq9uCAf2G5I/VEp9q2B+aR0M 9m5e69By1bSBIgKLPnMW6F/5RI/f/vBZpMohhINgJMYi5SuGKtNCN3nzI5UsnUOZtluy Ur7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686936810; x=1689528810; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0T+4sWJ+ZOuzEYtkcgjhJvjnSeoJwTiEIsyCvFRCtJw=; b=j/yKoEWEENZChZ/6ckazAN1dwa3kgDQT5hzQcaMOzqI4nxvZ9PfEBj0D7JSyD3o5pV JQei4iC12YiNeTrdx5pBS6vABEDoWudJ7ffHDT1evmxVVNvYog2IcAYLhetWI7a9pccN 9KAu7ED7/CYKSzIOA42oZejwmdV+VLx+ADE+Nu0hQbRakl2O+oHRAX/inATUJaU4S+ew IFh2TgV69g8lfZ5jskOa+uhBAVBFOlAXM5RT91wtdC/nphypaELW2SP3Xh8S5YPmc/7y eVbopvVz9rKBIwM0OIOwa+dzdg5qDIlSjCazIfLcRKRiE0zDgD3EtLSmHNPAqd97yrRu 2kkg== X-Gm-Message-State: AC+VfDxU4QCYNQOWJ3waIjhpAVt/eZqV5SjK+HkgTYd/jUNT0p3E+7MF SQwpX5y2olYo+v9w38MMkK4Lrw== X-Google-Smtp-Source: ACHHUZ6YhgII2EcaThuq5ueJiUl0wGfBmerQHaYAR8lH/XK2NO3ya4RlVHSgUECIWM/VkgClX0KpDw== X-Received: by 2002:a05:600c:4f96:b0:3f7:f302:161 with SMTP id n22-20020a05600c4f9600b003f7f3020161mr7732454wmq.8.1686936809950; Fri, 16 Jun 2023 10:33:29 -0700 (PDT) Original-Received: from localhost ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id l20-20020a1c7914000000b003f709a7e46bsm2697072wme.46.2023.06.16.10.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 10:33:29 -0700 (PDT) In-Reply-To: <04C45D03-D49B-4DE4-AD26-2606C94AF260@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 16 Jun 2023 19:02:58 +0200") 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:263483 Archived-At: Mattias Engdeg=C3=A5rd [2023-06-16 19:02 +0200] wrote: > Here is a modification of the treesit manual to teach s-expressions first. > It's mostly a matter of straightforward substitution. Generally LGTM, thanks. > diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi > index b0824faaaa2..bd81ee3c535 100644 > --- a/doc/lispref/parsing.texi > +++ b/doc/lispref/parsing.texi > @@ -1132,9 +1132,9 @@ Pattern Matching >=20=20 > @defun treesit-query-capture node query &optional beg end node-only > This function matches patterns in @var{query} within @var{node}. > -The argument @var{query} can be either a string, a s-expression, or a > -compiled query object. For now, we focus on the string syntax; > -s-expression syntax and compiled query are described at the end of the > +The argument @var{query} can be either a s-expression, a string, or a > +compiled query object. For now, we focus on the s-expression syntax; > +string syntax and compiled query are described at the end of the > section. I recently tweaked some of these docs in emacs-29, so you may want to merge into master before respinning your patch. > @@ -1341,22 +1341,23 @@ Pattern Matching > @noindent > tree-sitter only matches arrays where the first element equals to the > last element. To attach a predicate to a pattern, we need to group > -them together. A predicate always starts with a @samp{#}. Currently > -there are three predicates, @code{#equal}, @code{#match}, and > -@code{#pred}. > +them together. Currently > +there are three predicates, @code{:equal}, @code{:match}, and > +@code{:pred}. Do you intend to refill the paragraph before merging? > @itemize > @item > -Anchor @samp{.} is written as @code{:anchor}. > +Anchor @code{:anchor}. is written as @samp{.} ^ Unladen European full stop migrated from eol. --=20 Basil