From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.devel Subject: Re: ***SPAM*** Re: Help needed with query Date: Sat, 10 Dec 2022 11:31:56 -0600 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FA438B5F-B2D4-4815-8FDC-B5B177863E36"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28997"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 10 18:33:00 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 1p43ie-0007Ku-7Q for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Dec 2022 18:33:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p43i4-0006eC-MF; Sat, 10 Dec 2022 12:32:24 -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 1p43i0-0006dm-Qw for emacs-devel@gnu.org; Sat, 10 Dec 2022 12:32:23 -0500 Original-Received: from fly.ash.relay.mailchannels.net ([23.83.222.61]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p43hy-000287-1O for emacs-devel@gnu.org; Sat, 10 Dec 2022 12:32:20 -0500 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C449C8C15B3; Sat, 10 Dec 2022 17:32:11 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 9358F8C13F1; Sat, 10 Dec 2022 17:32:10 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1670693530; a=rsa-sha256; cv=none; b=PRONgH9Ik3T5Pu5wAD+nS+6HQqaXeDdLZ7mosGcJ9D79GNkjn26zQdp7yayLUoFsaswOJG /X8DkdZGnIuGiFeT6fHqJ9Z/CScDELzMy3zLr0VMtrdYnTM+Dv9ulRiQSmxwNvL4Ear8P7 Tdd2iQ/OTEzKUXWPR9qWsDSg3Es+4GHC53Pzd6kWFpd+9gSunNUgu4X7masngSwZ4EIBzk jyBDEFGV7/j6eR1+aAQyLMLutz3YoPM/bJrWBiDz2/2Am4/c/4BWFlboGbPFj3Fi2dYsw5 oSSldQL9zY3j8P9GXH+9AemWHmdwfpy8/WNKSFs8YAiLZ8MZUGlbxLmUZF/4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1670693530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uD9gUaEBmVJt4ZMLN25AKiUPqrYvTDEXALA2oSFALIs=; b=bY9H4p7okAA2gcrMpwqj1FIpWRwC4Wd29HdMHj6btrpkaNTmTWvwSC7bVjmzgqq68e+Hmc NX8kixo3JyGad4pjBuRbI1U0Q7Z5A6M4GRXiMxlqzj/CXCn2GS8i/J+wJuZaKZRiiMdOmg YgnALS6phoZPgTzprrqqQCeRgnoUrDEmYW5DFm0VJ946wQ49MHmWJ5tfjD4c6x35Qnr0+3 ZJ0RLwa9H4WZ47+kz79NNYRoCjHmzT9dZri2vDNfn4MZGwYgX54wRKQFWnKIiRr5GwdeIB asPdLZGa9D1UnhUEsOr21ElfTvwONSAOv1NSNEXSmmXcd0FhNoMEatEYULD+Sw== ARC-Authentication-Results: i=1; rspamd-85f95c7974-rfmhk; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Eyes-Trouble: 5312db8c68138bb3_1670693531474_4009762108 X-MC-Loop-Signature: 1670693531474:3902047121 X-MC-Ingress-Time: 1670693531474 Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.97.48.78 (trex/6.7.1); Sat, 10 Dec 2022 17:32:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=References:To:Cc:In-Reply-To:Date:Subject: Mime-Version:Content-Type:Message-Id:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uD9gUaEBmVJt4ZMLN25AKiUPqrYvTDEXALA2oSFALIs=; b=TcgPNWLZpTMzlY1T+ksD3nxph2 K1bbSLpUSXHzJrVlYlDKi+sZkI6C7XBxvO2drwSliovaC9fQVJDXdeAQsJpnFRr8Dzc6yrwBNEzwk xZnWOArHMSrv4QMZddPFK07+157jtW1N4y7w5bi13yBLjR2C1AFd2S6xF6uS+z48lJc0ZvPrbocCm GGu3QDOow5aBijfipnsQBiF8gzQNPB1oTGc6W9AnQbb8KSE4UqvcZ7UWbvWf4SThzdyRysiGFYoAC fHeE+IXWPrOt8RrgxLC+uahfLZ6bzr4tzRwWKbI1aAuIv44MCmyMbTu8BNo8JbBWHTtoACineqW5O dAK05d4g==; Original-Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:52032 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p43hp-004skO-HM; Sat, 10 Dec 2022 12:32:09 -0500 In-Reply-To: X-Mailer: Apple Mail (2.3731.200.110.1.12) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.222.61; envelope-from=pedz@easesoftware.com; helo=fly.ash.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:301124 Archived-At: --Apple-Mail=_FA438B5F-B2D4-4815-8FDC-B5B177863E36 Content-Type: multipart/alternative; boundary="Apple-Mail=_45CEC9D4-9B2F-4B20-B6EA-DF34FD2DB814" --Apple-Mail=_45CEC9D4-9B2F-4B20-B6EA-DF34FD2DB814 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 10, 2022, at 10:02, Jo=C3=A3o Paulo Labegalini de Carvalho = wrote: >=20 > The capture @indent is used to "mark" the matched initializer for = indentation. >=20 > For instance, when using queries to fontify text, the capture name is = either a font-face or a function that returns a font-face. I knew capture name is used as the face name to fontify text but I = can=E2=80=99t find any reference about @indent when used in an indent = query =E2=80=94 even looking at treesit.el I don=E2=80=99t see anything. = I=E2=80=99m going to try and figure it out empirically. > I can=E2=80=99t recall now but when I was working on the font lock = rules, I needed matching constructs and a type of =E2=80=9Cmatch = anything except=E2=80=9D type of construct. >=20 > I am not versed in tree-sitter enough, but I don't recall such a = construct. You could write a function that first matches general = instances of the construct and then filter out those that have the = "undesired" properties. I=E2=80=99m reading more and more=E2=80=A6 turns out: It is also possible to capture a node that doesn=E2=80=99t have a = certain field, say, a =E2=80=98function_definition=E2=80=99 without a =E2=80=98bod= y=E2=80=99 field. (function_definition !body) @func-no-body As always=E2=80=A6 thank you for your help. --Apple-Mail=_45CEC9D4-9B2F-4B20-B6EA-DF34FD2DB814 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Dec = 10, 2022, at 10:02, Jo=C3=A3o Paulo Labegalini de Carvalho = <jaopaulolc@gmail.com> wrote:

The capture @indent is used to = "mark" the matched initializer for = indentation.
 
For instance, when using = queries to fontify text, the capture name is either a font-face or a = function that returns a = font-face.

I = knew capture name is used as the face name to fontify text but I can=E2=80= =99t find any reference about @indent when used in an indent query =E2=80=94= even looking at treesit.el I don=E2=80=99t see anything.  I=E2=80=99= m going to try and figure it out empirically.

 I can=E2=80=99t recall now but when I = was working on the font lock rules, I needed matching constructs and a = type of =E2=80=9Cmatch anything except=E2=80=9D type of = construct.

I am not versed in tree-sitter enough, but I = don't recall such a construct. You could write a function that first = matches general instances of the construct and then filter out those = that have the "undesired"  = properties.

I=E2=80= =99m reading more and more=E2=80=A6 turns = out:

   It is also = possible to capture a node that doesn=E2=80=99t have a = certain
field, say, a = =E2=80=98function_definition=E2=80=99 without a =E2=80=98body=E2=80=99 = field.

     (function_definition !body) = @func-no-body

As always=E2=80=A6 thank you for your = help.

= --Apple-Mail=_45CEC9D4-9B2F-4B20-B6EA-DF34FD2DB814-- --Apple-Mail=_FA438B5F-B2D4-4815-8FDC-B5B177863E36 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmOUwowACgkQjxzk9yzE +MAAqQ//TcJL+eYB8r9Ml8JyYM/PL7C3SsQpuZzSlyuoig66WKmkyt/k0UGt8L+A yH45gNlOzcCCTC7ojTkFQXIV29GlCd+3V3/1AvAvCdUAA1gpJdfF3C7axuEXmS2o 47ZLd/ZoA+WDAKDVZ2T/AQ4unX7ZJ7T5Th2zxfu/15A/WFb036D9f1wfwTwnB6Yu GhymLXVlfhkyb9khYQ2amlj/0fnDqwjEh1G4UkDB1KTLG+CHmT44ljq01DVPDPKt 6QS7fDjJ+QAEgftPLjMNmTAkSop/Bq3fAM1Dyi9SGekTrxQp99PoPrH5FLsD9+5M WzqgrpQoX6F8G/3kewnKfsixpyYvOb65iC+emrBquKTKbQHiVaRH+zUiPa28IXkn vvo+9yVPZOKW3oGc7BegAYu1LDd94QbVkOlu8zKMmTRjo4Ev0ZfOdGGNIIvQeWE0 3WeAF6dh7ReIZ1XPgtPx2ZvRCgFcRKcXNUPjjM6o+cvdeNQh5mNO4fR8NdVj6Lyp 7DA8+MjcSTrHEziemMapFNG7D1Q7TD/HWu0FBDAKbnPKVi6vxkWxy2N3q0+D+IOJ mLHKujKUF9XKG2tUcCF6+r1RviZPPiQUk2HMoXuGpultnop4W68fJp/SJ0Q99AkY K8BdDqwSx/EplNmeMLURBeHI1Y1aFWMyank3c/R9Ra1oWuiuqMs= =hGaS -----END PGP SIGNATURE----- --Apple-Mail=_FA438B5F-B2D4-4815-8FDC-B5B177863E36--