From: Eli Zaretskii <eliz@gnu.org>
To: 赵 =?UTF-8?Q?=E7=BA=AA=E9=98=B3 <zjyzhaojiyang@hotmail.com>
Cc: 65098@debbugs.gnu.org
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 [thread overview]
Message-ID: <83350xsdze.fsf@gnu.org> (raw)
In-Reply-To: <OSZP286MB14177C83F32068F06A197862A80EA@OSZP286MB1417.JPNP286.PROD.OUTLOOK.COM> (zjyzhaojiyang@hotmail.com)
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.
next prev parent reply other threads:[~2023-08-05 15:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 13:43 bug#65098: 29.1.50; treesit-query-capture in an interactive function has no effect? 赵 纪阳
2023-08-05 15:31 ` Eli Zaretskii [this message]
2023-08-06 1:20 ` bug#65098: 回复: " 赵 纪阳
2023-08-06 5:05 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83350xsdze.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65098@debbugs.gnu.org \
--cc=zjyzhaojiyang@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).