GNU bug report logs - #59633
29.0.50; tree-sitter-bash: Incorrect behaviour of heredocs with expansions

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Sun, 27 Nov 2022 16:32:01 UTC

Severity: normal

Found in version 29.0.50

Done: <miha <at> kamnitnik.top>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: <miha <at> kamnitnik.top>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#59633: closed (29.0.50; tree-sitter-bash: Incorrect behaviour
 of heredocs with expansions)
Date: Wed, 14 Dec 2022 15:06:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 14 Dec 2022 16:07:10 +0100
with message-id <87sfhiaush.fsf <at> miha-pc>
and subject line Re: bug#59633: 29.0.50; tree-sitter-bash: Incorrect behaviour of heredocs with expansions
has caused the debbugs.gnu.org bug report #59633,
regarding 29.0.50; tree-sitter-bash: Incorrect behaviour of heredocs with expansions
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
59633: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59633
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: miha <at> kamnitnik.top
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; tree-sitter-bash: Incorrect behaviour of heredocs with
 expansions
Date: Sun, 27 Nov 2022 17:33:11 +0100
[Message part 3 (text/plain, inline)]
1. Visit empty buffer test in fundamental mode (C-x b test RET)
2. Insert

tee << EOF
text1 $var
text2 $(echo cmd)
text3
$var2
EOF

3. Put point before "text2"
4. M-x load-library RET treesit RET
5. M-: (treesit-node-children (treesit-node-at (point) 'bash))

    => (#<treesit-node (simple_expansion) in 18-22>
        #<treesit-node (command_substitution) in 29-40>)

   Note that this list is incorrect, "$var2" at the end of heredoc is
   missing.

6. M-: (treesit-node-first-child-for-pos (treesit-node-at (point) 'bash) (point))

   => nil

   Expected return value here is #<treesit-node (command_substitution) in 29-40>

I'm not sure if this bug is on Emacs, tree-sitter-bash or even
tree-sitter itself and I don't know how to check.

tree-sitter-bash version: 0.19.0.r19.g77cf8a7-1
tree-sitter version: 0.20.7-1

Thanks and best regards.
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: <miha <at> kamnitnik.top>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 59633-done <at> debbugs.gnu.org
Subject: Re: bug#59633: 29.0.50; tree-sitter-bash: Incorrect behaviour of
 heredocs with expansions
Date: Wed, 14 Dec 2022 16:07:10 +0100
[Message part 6 (text/plain, inline)]
Yuan Fu <casouri <at> gmail.com> writes:

> Seems to be tree-sitter-bash problem, I submitted an issue at
> https://github.com/tree-sitter/tree-sitter-bash/issues/139

Thanks. As this seems to be a tree-sitter-bash problem, I'm closing this
bug.

> Yuan
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.