From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59633: 29.0.50; tree-sitter-bash: Incorrect behaviour of heredocs with expansions Date: Sat, 03 Dec 2022 08:25:38 +0100 Message-ID: <87lenpaqz1.fsf@miha-pc> References: <871qpocq7s.fsf@miha-pc> <90FF5B60-A9AB-4101-9FE3-8FCAD8B9DCE8@gmail.com> <87o7slbwls.fsf@miha-pc> <6767DDE2-911D-487F-A4B6-13DE8A0D0915@gmail.com> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59633@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 03 08:25:19 2022 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 1p1Mti-0000u5-4h for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Dec 2022 08:25:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1MtU-0000H2-64; Sat, 03 Dec 2022 02:25:04 -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 1p1MtS-0000Gs-OP for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 02:25:03 -0500 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 1p1MtS-0002E1-FC for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 02:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1MtR-0005rL-Qb for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 02:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Dec 2022 07:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59633 X-GNU-PR-Package: emacs Original-Received: via spool by 59633-submit@debbugs.gnu.org id=B59633.167005225722511 (code B ref 59633); Sat, 03 Dec 2022 07:25:01 +0000 Original-Received: (at 59633) by debbugs.gnu.org; 3 Dec 2022 07:24:17 +0000 Original-Received: from localhost ([127.0.0.1]:51324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Msj-0005r1-5M for submit@debbugs.gnu.org; Sat, 03 Dec 2022 02:24:17 -0500 Original-Received: from kamnitnik.top ([209.250.245.214]:55082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Msd-0005qu-Gy for 59633@debbugs.gnu.org; Sat, 03 Dec 2022 02:24:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1670052249; bh=GtAwezd/sDVY6F/B/C9lwg4SfFXvk1tq5CZteGDgw/g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Jdqvl0MtLbGaUjYcdW5W0zHfbY1KovTvsK7/gyIJXn/x3B0RaXTDdCF5tTeVCFCn0 ctEZSZvcuwXlk4a1uu9YtSjUjVykoui7yjXqgu4f4fcOlObzbFFFEL2d5Go1BmvE1+ Zu6WF/R5cEhI/G2/CQEGGpE1enPW/ENeNuTYp9JRwACiibyexY5uzWLoCTVkoAfXfY u9pqsEuWIqImmnX/YF9BaCBJDfk+8c8RXRldXQpis4UFETO2PynIB7xFFnz6jqU7KH 5psoI1pOm9DFyKkmpdMM7JoMXuKYrHHUK4ttS+2+9dNTRK+SxqAqa04fGJilhpKzfd sUeFBqLa+UQww== In-Reply-To: <6767DDE2-911D-487F-A4B6-13DE8A0D0915@gmail.com> 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:249813 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yuan Fu writes: > What=E2=80=99s the return value of (treesit-node-at (point)) at that poin= t? > Probably the command_substitution node, and since it doesn=E2=80=99t have= any > children, treesit-node-first-child-for-pos would return nil. (treesit-node-at (point) 'bash) =3D> # I forgot to say that point is before "text2", outside of the command_substitution node. > Yuan tee << EOF text1 $var text2 $(echo cmd) text3 $var2 EOF Filling a test buffer with these contents and placing point before "text2", we get (treesit-node-at (point) 'bash) =3D> # (treesit-node-children (treesit-node-at (point) 'bash)) =3D> (# # #) This is now expected. (point) =3D> 23 (treesit-node-first-child-for-pos (treesit-node-at (point) 'bash) (poin= t)) =3D> nil This is not expected. One would expect this to return command_substitution node, since it follows the position 23. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmOK+fITHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP6ICD/9SOspNmHn+GWN/qUerxqiBNdloX4+4 CvSnIZe2gSlaYdaTjvbUyPUoP4i/lk2NvxbFdhEgT5jZRK36GbUHG45y28Az6iAT oPRr0WArM4Tc38LgqK+NuYYaA9meueDw9/TyH/eOKAZB5kT2XT9uogCAI2u+L8Rx K7kyHO7WMBVlUzHBk6vjR80GP4alOFfjXVONNoocU0jvqLtMTn4I6x3Q2GQ7PmoI Esh/MLQ1Jhfrh3vaCwZPVJRAy207aNad8r/FwIzWl/WfDLV/ks0NAHbY9W4GMlvO Gof11Io205umUXxoD8h6DMaytS99q5jAihLQTrOA8+xeBVYT2JC8vKinYxqL093i piCJblxj/f1/i1K99Yu6+CElfAfgZ//PiBzSGKhRlJv/vm6mfVVMrO7nxR8e7C3A 2OuRke24zntMwQ12eH6qFV8k6WynbRkKnibFLU+I1zmeLGotxwHebSYHhYxrQ/cW ntfCCpD+1SOFP0U1ygh7/DlDb7hsW94dHDrfkjZO2E9XfllwMIlp04TWUheNwL9m xZEJaJtWEXwF0bT+j7IO+znhNGgk69NjjP/gBvrllbw0DDQ4w2LmF/YJizU6QWz/ VCWimtj8dlbTKiG8m4upCnNOjYWDV+E+OrNvmFc/Ahrb2ZedYcTCX7/xEGIkQwr7 nr5+ymct0BRFUQ== =5HLf -----END PGP SIGNATURE----- --=-=-=--