From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Noah Peart <noah.v.peart@gmail.com>, 71863@debbugs.gnu.org
Subject: bug#71863: 31.0.50; Wrong argument type for treesit-query-range in treesit-update-ranges
Date: Sat, 6 Jul 2024 13:50:10 -0700 [thread overview]
Message-ID: <F3D13ED2-716C-4B32-B280-C74372F18CDD@gmail.com> (raw)
In-Reply-To: <86y16e530r.fsf@gnu.org>
> On Jul 6, 2024, at 1:38 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Noah Peart <noah.v.peart@gmail.com>
>> Date: Sun, 30 Jun 2024 16:12:06 -0400
>>
>> I just noticed this after building latest Emacs. In
>> `treesit-update-ranges`, during redisplay, the first argument to
>> `treesit-query-range` is a tree-sitter language symbol, not a node.
>>
>> At treesit.el:760
>>
>> (let* ((host-lang (treesit-query-language query))
>> (parser (treesit-parser-create language))
>> (old-ranges (treesit-parser-included-ranges parser))
>>>>> host-lang isnt a node
>> (new-ranges (treesit-query-range
>> host-lang query beg end offset))
>>
>> This causes a an error in modes that have set `treesit-range-settings`
>> eg., `js-ts-mode`:
>>
>>> Error muted by safe_call: (treesit--font-lock-mark-ranges-to-fontify
>>> ((1 . 940)) #<treesit-parser for javascript>) signaled
>>> (wrong-type-argument treesit-node-p javascript) Error during
>>> redisplay: (jit-lock-function 1) signaled (wrong-type-argument
>>> treesit-node-p javascript)
>>
>> And in `syntax-propertize-function`, for example in `ruby-ts-mode`,
>>
>>> QuitError muted by safe_call: (internal--syntax-propertize 46)
>>> signaled (wrong-type-argument treesit-node-p ruby)
>
> Yuan, could you please look into this issue?
This is a bug I introduced on emacs-30 and later fixed. So once emacs-30 is merged into master the issue should go away. Sorry for the trouble :-(
Yuan
next prev parent reply other threads:[~2024-07-06 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 20:12 bug#71863: 31.0.50; Wrong argument type for treesit-query-range in treesit-update-ranges Noah Peart
2024-06-30 20:37 ` Noah Peart
2024-07-06 8:38 ` Eli Zaretskii
2024-07-06 20:50 ` Yuan Fu [this message]
2024-07-07 5:35 ` Eli Zaretskii
2024-07-15 6:18 ` Yuan Fu
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=F3D13ED2-716C-4B32-B280-C74372F18CDD@gmail.com \
--to=casouri@gmail.com \
--cc=71863@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=noah.v.peart@gmail.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).