From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <86y16e530r.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25821"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Noah Peart , 71863@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 06 22:52:07 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sQCO7-0006Zw-1M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jul 2024 22:52:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQCO0-0002Ll-RB; Sat, 06 Jul 2024 16:52:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQCNz-0002LA-PI for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 16:51:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQCNy-0004KL-TM for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 16:51:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQCO2-0003z4-Ac for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 16:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2024 20:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71863 X-GNU-PR-Package: emacs Original-Received: via spool by 71863-submit@debbugs.gnu.org id=B71863.172029909415278 (code B ref 71863); Sat, 06 Jul 2024 20:52:02 +0000 Original-Received: (at 71863) by debbugs.gnu.org; 6 Jul 2024 20:51:34 +0000 Original-Received: from localhost ([127.0.0.1]:46821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQCNa-0003yL-Cw for submit@debbugs.gnu.org; Sat, 06 Jul 2024 16:51:34 -0400 Original-Received: from mail-oi1-f176.google.com ([209.85.167.176]:60699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQCNY-0003y8-Cf for 71863@debbugs.gnu.org; Sat, 06 Jul 2024 16:51:32 -0400 Original-Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3d92aa0ade0so116290b6e.1 for <71863@debbugs.gnu.org>; Sat, 06 Jul 2024 13:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720299023; x=1720903823; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+K8QEcHGcVlYeVS0NFge06iGibBwpKnH9V93Ptt2mFw=; b=moWleIjzsgQtEkM1LYnAIsurX4vgw6ieSXzZLx0Efy/i2fcnKz7pptauisjUFkTqIq 79UdC+jDQU+ievAybbfajtFf9gC4+a+GvJw9QtSQdhGr1jM/+gG224OQYDipk1BQsTzz uYcmBJHmUirC6KXSClUhnRuAKOwT89/GLZu8gTxe7EwrKh/jNUxOeNFGwqSaUGMCP6iu a68rJjRbX5r7l1MHKjyKcEQMXHbk744OEtBko28XhAKiKN4A/Ix2v9rnl9NjysX6fNEE jh+Hu0CaaDvGxNRwxJ2tmT1OdAL1hyGYTYC/sfYEM7YizigINoDAvauSIO8mk04JvTcn AQtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720299023; x=1720903823; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+K8QEcHGcVlYeVS0NFge06iGibBwpKnH9V93Ptt2mFw=; b=EJJSCW1z93t9vPyKVwRPqeSIPt15hDAQ9JTfwlNvCgATVwUaM7YNSf3Ry/iUueH+Un e7b+RLRUrwBfja27Bf5pInyLwnHnsf8m6e+ahE4+Y6ciRc7qTLmBFUf3WAHt9O6yNO1L 2LlcUeNCTRKUVlKoP8pdQ0aH+trOSJCNmJd5IRJ9ELLWO5Chk1es8WoUbZrDBEenRRUP Fh9p0tIiG3MMhpcHU0JtrW9RXyWl4jRnvwVtiV9k+RI2k1y0tTFq581j0ys/E7X5wfeq SLWENnM962z9nc9ZP3MvHNMgPliIkZi8pIqDIHS4TBSmPTEesECs46ywgsOt5wOFaf0+ xZ/A== X-Forwarded-Encrypted: i=1; AJvYcCVXQ+f5Ufyg6fJFzZloFZbiofk8aJ7GIhmK8ivJfHEpC8jiFE7iWrEjEYXRCWxw8+BmBaEgLjwXAeaALGXQpO46kZ2S/oI= X-Gm-Message-State: AOJu0Yy3WR1qUwwx6TDaX90KD1tRfM32qYtLZBX5g93aoNqzO1h2ZGVC jwlZ+yqj7JhYvzn7i/H4DaxWViNriopLYuthbjmSfZ4F2+mHmYlL X-Google-Smtp-Source: AGHT+IE22ikVaDjVrnoBdRNKTEe8XVFMUu9+Wz3ZFQT9ueszx/30TdyG0CWN2PUdy+z8xbAuDtwDhg== X-Received: by 2002:a05:6808:211c:b0:3d9:20c3:cd99 with SMTP id 5614622812f47-3d920c3d1f2mr6019196b6e.5.1720299022882; Sat, 06 Jul 2024 13:50:22 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:84a4:5f24:8a3e:a909]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70801e63abcsm16161571b3a.2.2024.07.06.13.50.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jul 2024 13:50:22 -0700 (PDT) In-Reply-To: <86y16e530r.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288521 Archived-At: > On Jul 6, 2024, at 1:38=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Noah Peart >> Date: Sun, 30 Jun 2024 16:12:06 -0400 >>=20 >> 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. >>=20 >> At treesit.el:760 >>=20 >> (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)) >>=20 >> This causes a an error in modes that have set = `treesit-range-settings` >> eg., `js-ts-mode`: >>=20 >>> Error muted by safe_call: (treesit--font-lock-mark-ranges-to-fontify >>> ((1 . 940)) #) signaled >>> (wrong-type-argument treesit-node-p javascript) Error during >>> redisplay: (jit-lock-function 1) signaled (wrong-type-argument >>> treesit-node-p javascript) >>=20 >> And in `syntax-propertize-function`, for example in `ruby-ts-mode`, >>=20 >>> QuitError muted by safe_call: (internal--syntax-propertize 46) >>> signaled (wrong-type-argument treesit-node-p ruby)=20 >=20 > 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