all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 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: Sun, 07 Jul 2024 08:35:21 +0300	[thread overview]
Message-ID: <86ikxh3gti.fsf@gnu.org> (raw)
In-Reply-To: <F3D13ED2-716C-4B32-B280-C74372F18CDD@gmail.com> (message from Yuan Fu on Sat, 6 Jul 2024 13:50:10 -0700)

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 6 Jul 2024 13:50:10 -0700
> Cc: Noah Peart <noah.v.peart@gmail.com>,
>  71863@debbugs.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 :-(

When did you fix it on emacs-30?  The merges to master happen very
frequently lately; the last one was yesterday.  Could it be that this
is already fixed?





  reply	other threads:[~2024-07-07  5:35 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
2024-07-07  5:35     ` Eli Zaretskii [this message]
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=86ikxh3gti.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.