all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "赵 纪阳" <zjyzhaojiyang@hotmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "65098@debbugs.gnu.org" <65098@debbugs.gnu.org>
Subject: bug#65098: 回复: bug#65098: 29.1.50; treesit-query-capture in an interactive function has no effect?
Date: Sun, 6 Aug 2023 01:20:15 +0000	[thread overview]
Message-ID: <OSZP286MB1417D5034A5F4CEC9FDC3E2EA80FA@OSZP286MB1417.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <83350xsdze.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

Got it. Thanks.
Sorry for the noise, I should've tested more to make sure it's a real bug.
________________________________
发件人: Eli Zaretskii <eliz@gnu.org>
发送时间: 2023年8月5日 23:30
收件人: 赵 纪阳 <zjyzhaojiyang@hotmail.com>
抄送: 65098@debbugs.gnu.org <65098@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@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.

[-- Attachment #2: Type: text/html, Size: 2221 bytes --]

  reply	other threads:[~2023-08-06  1:20 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
2023-08-06  1:20   ` 赵 纪阳 [this message]
2023-08-06  5:05     ` bug#65098: 回复: " 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OSZP286MB1417D5034A5F4CEC9FDC3E2EA80FA@OSZP286MB1417.JPNP286.PROD.OUTLOOK.COM \
    --to=zjyzhaojiyang@hotmail.com \
    --cc=65098@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.