GNU bug report logs - #65098
29.1.50; treesit-query-capture in an interactive function has no effect?

Previous Next

Package: emacs;

Reported by: 赵 纪阳 <zjyzhaojiyang <at> hotmail.com>

Date: Sat, 5 Aug 2023 13:49:01 UTC

Severity: normal

Tags: notabug

Found in version 29.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 65098 <at> debbugs.gnu.org (full text, mbox):

From: 赵 纪阳 <zjyzhaojiyang <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "65098 <at> debbugs.gnu.org" <65098 <at> debbugs.gnu.org>
Subject: 回复: bug#65098: 29.1.50; treesit-query-capture in an interactive function has no effect?
Date: Sun, 6 Aug 2023 01:20:15 +0000
[Message part 1 (text/plain, inline)]
Got it. Thanks.
Sorry for the noise, I should've tested more to make sure it's a real bug.
________________________________
发件人: Eli Zaretskii <eliz <at> gnu.org>
发送时间: 2023年8月5日 23:30
收件人: 赵 纪阳 <zjyzhaojiyang <at> hotmail.com>
抄送: 65098 <at> debbugs.gnu.org <65098 <at> debbugs.gnu.org>
主题: Re: bug#65098: 29.1.50; treesit-query-capture in an interactive function has no effect?

tags 65098 notabug
thanks

> From: 赵 纪阳
>  <zjyzhaojiyang <at> 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.
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 291 days ago.

Previous Next


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