all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noah Peart <noah.v.peart@gmail.com>, Yuan Fu <casouri@gmail.com>
Cc: 71863@debbugs.gnu.org
Subject: bug#71863: 31.0.50; Wrong argument type for treesit-query-range in treesit-update-ranges
Date: Sat, 06 Jul 2024 11:38:12 +0300	[thread overview]
Message-ID: <86y16e530r.fsf@gnu.org> (raw)
In-Reply-To: <CAPVBTSfmAZuhu4mLBUTsOCZiVke0Ewcd4wVwE7YP4ttABfOEew@mail.gmail.com> (message from Noah Peart on Sun, 30 Jun 2024 16:12:06 -0400)

> 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?





  parent reply	other threads:[~2024-07-06  8:38 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 [this message]
2024-07-06 20:50   ` Yuan Fu
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

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

  git send-email \
    --in-reply-to=86y16e530r.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71863@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --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 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.