bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65098: 29.1.50; treesit-query-capture in an interactive function has


From: Eli Zaretskii
Subject: bug#65098: 29.1.50; treesit-query-capture in an interactive function has no effect?
Date: Sat, 05 Aug 2023 18:31:01 +0300

tags 65098 notabug
thanks

> From: 赵 纪阳
>  <zjyzhaojiyang@hotmail.com>
> Date: Sat, 5 Aug 2023 13:43:31 +0000
> 
> I have a test function as following:
> 
> (defun treesit-context-test-query ()
>   (interactive)
>   (treesit-query-capture (treesit-buffer-root-node) '((if_statement 
> consequence: (_) @context.end)
> @context)))
> 
> I expected this function would return all =if statement= in a java buffer. 
> 
> But if I invoke it from M-x, it doesn't print anything in *Message* buffer.
> 
> If I call it from M-:(aka. eval-expression), it does print something. 
> 
> Is there a bug here? If not, how should I use it correctly? Thanks.

You need to display the value the function returns, e.g., with
'message'.

There's no bug here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]