From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2023 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 64922@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169057798125647 (code B ref -1); Fri, 28 Jul 2023 21:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jul 2023 20:59:41 +0000 Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPUYm-0006fa-J3 for submit@debbugs.gnu.org; Fri, 28 Jul 2023 16:59:41 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPUYk-0006fM-ER for submit@debbugs.gnu.org; Fri, 28 Jul 2023 16:59:39 -0400 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 1qPUYe-0007xt-UR for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 16:59:32 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPUYd-0001hy-2b for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 16:59:32 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso25745125e9.0 for ; Fri, 28 Jul 2023 13:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690577969; x=1691182769; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=h/D9aikAIZgg7gi/MdcMvz5aTJGQ4DoRA9hb8c2S+Ts=; b=pTa2sawB3kG9kqus+28wkRqOh8N4aqPQcx+GE/VERJwmaz6EQbFqFRiZyvyKjsou8N TIERFtsosLqrg2S3w3Rc3ELniiPqL77pMQtDvBfUC3zr8SN4wZT6te6ZHPhOEdqtKKot 6DBoCfAutCUe54MLKB+E7Wlr0T5JoPFqh/izCddyRotXFbvTdkUWe5dBWp/fFvT/uNxW sX+lAKds4fW3sYLWAOCK6Dusfi42jrVVL1vhmlyhD9MP+VwWfruPowIrmFVf5BPZWCCW vfSs/Gu18AUWz56bSPs18qcN5AME+aNASWg3wxXGbsh81TDUe/lYjYRzB6AJNXNH+n6S WgVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690577969; x=1691182769; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h/D9aikAIZgg7gi/MdcMvz5aTJGQ4DoRA9hb8c2S+Ts=; b=arNbjUDvBiuwipaumdITM+bfoFgw9ij1mhMoQgH6+z8zUZSr933TZ3R5dc8DADLA5N TOgh0ClP+wCZMoRSwMOV6vq/mPtIwo8NNXrDuNX3LKVFgCBI0kb7pcEC2cfvWahULc4c Ez7xHgd9PXcZd42omxbnlifnO5loQurUI29DIDddx73DOzH9LN2CaENdmG/gFvuqnTnp ezGIJ9f/vfCPFEB1/EN27hWwqB+nVhrPcMkZ6cVJ+sjTkBuNLSPJ+N997mXxKrpHXSMp 62ubL7+i7mEMaQnjD+AoNApOrUXubyIKIGJbK6vUrzNdqUsHKGfohuI80AApo7PIrvSn ZtAQ== X-Gm-Message-State: ABy/qLaY5j2Y6ZvzBpXNyn8tOg0AzlBYBaQGJy8iRoZxSSDEBMXQM2iv YSmWID0Z5qWEcNcNtbVYFg/fKsTZx1s= X-Google-Smtp-Source: APBJJlHXy5tAsxcTzC64ouvBvNigYMqVFBpHk5wtfdtfXXpZsPfNB0JNsZeiUCW+RxWBjwOl3soYiA== X-Received: by 2002:a5d:608a:0:b0:314:415:cbf5 with SMTP id w10-20020a5d608a000000b003140415cbf5mr2645516wrt.51.1690577968871; Fri, 28 Jul 2023 13:59:28 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id p9-20020a5d48c9000000b0031433443265sm5714474wrs.53.2023.07.28.13.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 13:59:28 -0700 (PDT) From: Vincenzo Pupillo Date: Fri, 28 Jul 2023 22:59:27 +0200 Message-ID: <4516186.LvFx2qVVIh@fedora> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2307625.ElGaqSPkdT" Content-Transfer-Encoding: 7Bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=v.pupillo@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multi-part message in MIME format. --nextPart2307625.ElGaqSPkdT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed the definition of the cmake grammar, now there is a new node argument_list used to wrap nodes of type argument. This causes the following error: Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant- face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\| ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\ \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\ (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\ \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\ \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\ \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query- validate'") The attached patch supports both the old and the new grammar. Thanks. Vincenzo --nextPart2307625.ElGaqSPkdT Content-Disposition: attachment; filename="0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch" >From 33a53c86b38624dcfe88aca24f6f1f94ab339463 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Fri, 28 Jul 2023 22:37:02 +0200 Subject: [PATCH] Updated CMake support due to changes in tree-sitter-cmake A recent change in tree-sitter-cmake grammar support for CMake (commit fe9b5e0), now put arguments are wrapped in a new argument_list node. To support the old and new version of the grammar, a new function was added on which string syntax highlighting now depends. * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--font-lock-compatibility-fe9b5e0): indent helper function for handle different tree-sitter-cmake version * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--font-lock-settings): use the new function to handle the new argument_list node. --- lisp/progmodes/cmake-ts-mode.el | 54 ++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index 9d35d8077bd..9fcd8a7a2ab 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -31,6 +31,7 @@ (eval-when-compile (require 'rx)) (declare-function treesit-parser-create "treesit.c") +(declare-function treesit-query-capture "treesit.c") (declare-function treesit-induce-sparse-tree "treesit.c") (declare-function treesit-node-child "treesit.c") (declare-function treesit-node-start "treesit.c") @@ -87,6 +88,42 @@ "VERSION_GREATER_EQUAL" "VERSION_LESS" "VERSION_LESS_EQUAL") "CMake if conditions for tree-sitter font-locking.") +(defun cmake-ts-mode--font-lock-compatibility-fe9b5e0 () + "Indent rules helper, to handle different releases of tree-sitter-cmake. +Check if a node type is available, then return the right indent rules." + ;; handle commit fe9b5e0 + (condition-case nil + (progn (treesit-query-capture 'cmake '((argument_list) @capture)) + `(((foreach_command + ((argument_list) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--foreach-options) + eol)) + @font-lock-constant-face)))) + ((if_command + ((argument_list) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--if-conditions) + eol)) + @font-lock-constant-face)))))) + (error + `(((foreach_command + ((argument) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--foreach-options) + eol)) + @font-lock-constant-face)))) + ((if_command + ((argument) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--if-conditions) + eol)) + @font-lock-constant-face)))))))) + (defvar cmake-ts-mode--font-lock-settings (treesit-font-lock-rules :language 'cmake @@ -95,21 +132,8 @@ :language 'cmake :feature 'builtin - `(((foreach_command - ((argument) @font-lock-constant-face - (:match ,(rx-to-string - `(seq bol - (or ,@cmake-ts-mode--foreach-options) - eol)) - @font-lock-constant-face)))) - ((if_command - ((argument) @font-lock-constant-face - (:match ,(rx-to-string - `(seq bol - (or ,@cmake-ts-mode--if-conditions) - eol)) - @font-lock-constant-face))))) - + (cmake-ts-mode--font-lock-compatibility-fe9b5e0) + :language 'cmake :feature 'comment '([(bracket_comment) (line_comment)] @font-lock-comment-face) -- 2.41.0 --nextPart2307625.ElGaqSPkdT-- From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 07:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vincenzo Pupillo , Theodor Thornhill , Yuan Fu Cc: 64922@debbugs.gnu.org Received: via spool by 64922-submit@debbugs.gnu.org id=B64922.16906170346998 (code B ref 64922); Sat, 29 Jul 2023 07:51:01 +0000 Received: (at 64922) by debbugs.gnu.org; 29 Jul 2023 07:50:34 +0000 Received: from localhost ([127.0.0.1]:46396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPeig-0001oo-3Z for submit@debbugs.gnu.org; Sat, 29 Jul 2023 03:50:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPeid-0001oZ-VS for 64922@debbugs.gnu.org; Sat, 29 Jul 2023 03:50:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPeiY-0003U5-2q; Sat, 29 Jul 2023 03:50:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0jeVIpImiWhGhcffWqR4PifN4/6zSby2hST1ViSSxI8=; b=d4GEgsxVcGwY FrBCHwPvnFdexr3Kr3OitXnwZIwVBnLTIKXCjrpxIdaRTRjLWnceyDgDyHGYVwHWNjZJjuBrOCD0/ GoAJ8szM1fS1gZ1PNI5TOX24GaPrCOVl7tVZqG9hWx45a2fbBQvUZ9CJl2GuDkaN7qScSqQZBVVyB RUHF1JrVrZfiSYWt55QfmTZkQEPE730T9ekJus+w/pmivTWZ5dV6My9RVsa35KenSYtepoggcM0Lp 7HJk+BDgUfoRE93CID7fL/1XYG2WFJ9xfcq8Lzq1/+T3tLha1HHs4JNZAli69N3x83vcYuMkqn4W0 3y/XQP4Nvoj5ch4HrSd1ww==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPeiX-0007uF-59; Sat, 29 Jul 2023 03:50:25 -0400 Date: Sat, 29 Jul 2023 10:51:19 +0300 Message-Id: <83o7jvi2a0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <4516186.LvFx2qVVIh@fedora> (message from Vincenzo Pupillo on Fri, 28 Jul 2023 22:59:27 +0200) References: <4516186.LvFx2qVVIh@fedora> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Vincenzo Pupillo > Date: Fri, 28 Jul 2023 22:59:27 +0200 > > Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed > the definition of the cmake grammar, now there is a new node argument_list used > to wrap nodes of type argument. > This causes the following error: > Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error > "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant- > face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\| > ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) > @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\ > \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\ > (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\ > \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\ > \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\ > \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query- > validate'") > > The attached patch supports both the old and the new grammar. Thanks. Theo, yuan: any comments to the patch? If okay, I'd like to install this on the release branch ASAP. From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Vincenzo Pupillo , Yuan Fu Cc: 64922@debbugs.gnu.org Received: via spool by 64922-submit@debbugs.gnu.org id=B64922.169062200114665 (code B ref 64922); Sat, 29 Jul 2023 09:14:02 +0000 Received: (at 64922) by debbugs.gnu.org; 29 Jul 2023 09:13:21 +0000 Received: from localhost ([127.0.0.1]:46436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPg0m-0003oT-TW for submit@debbugs.gnu.org; Sat, 29 Jul 2023 05:13:21 -0400 Received: from out-64.mta1.migadu.com ([2001:41d0:203:375::40]:44003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPg0k-0003oJ-CG for 64922@debbugs.gnu.org; Sat, 29 Jul 2023 05:13:20 -0400 Date: Sat, 29 Jul 2023 11:13:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1690621996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lT8nvFt9vUVchb2XUKHuXbhn7W3pQ/4nePBPW9QmPzQ=; b=AFUg7y0ZI56zb8gnI6e3zuLtDoGbA/weRfr8jWMUgSLkBfykNEYIr8RFp1dfWLbMRoWJqa HLv1lcmDChb08O9PTkW9Cx7dJ4iVd3+vBFWDPCJAq6bij4qx/XO57qXrzsSY/r+yRSTJOH LnIulNAx7fIbu1U+3tLv4tB/GMpv9Naor7hJkqNzl2l9X/OdZADR2GW4jClzLJtnkgUhxd h4bszNjxrEIMRDtR+WGE0zl6Nzb1dcNmi7a6rsVq6yzqJpyUsROHDsaq1wgi/WmoItp4M3 W9JAS+F5zKne4G/VcyCGCighdiPhmTRNWi8W0GIxL4tH02Kn/2p7JOF/a4YezQ== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill In-Reply-To: <83o7jvi2a0.fsf@gnu.org> References: <4516186.LvFx2qVVIh@fedora> <83o7jvi2a0.fsf@gnu.org> Message-ID: <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 29 July 2023 09:51:19 CEST, Eli Zaretskii wrote: >> From: Vincenzo Pupillo >> Date: Fri, 28 Jul 2023 22:59:27 +0200 >>=20 >> Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) c= hanged=20 >> the definition of the cmake grammar, now there is a new node argument_l= ist used=20 >> to wrap nodes of type argument=2E=20 >> This causes the following error: >> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-e= rror=20 >> "Structure error at" 19 "((foreach_command ((argument) @font-lock-const= ant- >> face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RAN= GE\\\\| >> ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argu= ment)=20 >> @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|D= EFINED\ >> \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS= \\\\ >> (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?= :EQUAL\ >> \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VER= SION_\\ >> \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\= \\)\\\ >> \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit= -query- >> validate'") >>=20 >> The attached patch supports both the old and the new grammar=2E > >Thanks=2E > >Theo, yuan: any comments to the patch? If okay, I'd like to install >this on the release branch ASAP=2E I'm not able to look at it until tonight, which is in 8-9 hours=2E If that= 's not asap enough, I trust your judgement more than mine anyways ;-) If that's not too late I'll take a look then and install if ok=2E Theo From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 10:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: casouri@gmail.com, v.pupillo@gmail.com, 64922@debbugs.gnu.org Received: via spool by 64922-submit@debbugs.gnu.org id=B64922.169062736124244 (code B ref 64922); Sat, 29 Jul 2023 10:43:01 +0000 Received: (at 64922) by debbugs.gnu.org; 29 Jul 2023 10:42:41 +0000 Received: from localhost ([127.0.0.1]:46484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPhPF-0006Ix-8B for submit@debbugs.gnu.org; Sat, 29 Jul 2023 06:42:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPhPD-0006Il-GQ for 64922@debbugs.gnu.org; Sat, 29 Jul 2023 06:42:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPhP7-000223-Vx; Sat, 29 Jul 2023 06:42:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qBabc/WbDg+pJIh/AImJDr9F+D3f2qZfmNekFn//Ulw=; b=kydh0exR4P1r FBIn+QQu+cL+kns9ZEr1BzqPb0bgWnRDAaJVrIXCX71pEQGr/CAKUQ+BeMM18ccSGGWvAIoFVohrp bbbZyKYXJUHlZlcJQksz9YFPJuzha5hRZclfiS3SUrxa4F9qiF9onvOuCccpd+05IT5XeP3YnsCg0 fVDGWJeg+MajsHeEkU5xiBFbvyowdSiVSYuR2zMDHTSoa8JPOBdoHSSEGNxYsFWUGbid8IREaUV1g c/CSDE9ns2XocMYC5ejZ9vSmr9oFrgwWcFrsF3XcORuOCXB7UFwXX9o5fSgitaStVfF4xpyR2+A1m 1Vsj7Zu9VpFBz4n+92MfdA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPhP7-0007gw-E2; Sat, 29 Jul 2023 06:42:33 -0400 Date: Sat, 29 Jul 2023 13:42:31 +0300 Message-Id: <83a5vfm220.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> (message from Theodor Thornhill on Sat, 29 Jul 2023 11:13:10 +0200) References: <4516186.LvFx2qVVIh@fedora> <83o7jvi2a0.fsf@gnu.org> <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 29 Jul 2023 11:13:10 +0200 > From: Theodor Thornhill > CC: 64922@debbugs.gnu.org > > On 29 July 2023 09:51:19 CEST, Eli Zaretskii wrote: > > > >Theo, yuan: any comments to the patch? If okay, I'd like to install > >this on the release branch ASAP. > > I'm not able to look at it until tonight, which is in 8-9 hours. I guess it's okay, as I'll need to postpone the decision about releasing Emacs 29.1 till tomorrow anyway. Thanks. From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 12:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: casouri@gmail.com, v.pupillo@gmail.com, 64922@debbugs.gnu.org Received: via spool by 64922-submit@debbugs.gnu.org id=B64922.169063333112950 (code B ref 64922); Sat, 29 Jul 2023 12:23:01 +0000 Received: (at 64922) by debbugs.gnu.org; 29 Jul 2023 12:22:11 +0000 Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPixX-0003Mn-83 for submit@debbugs.gnu.org; Sat, 29 Jul 2023 08:22:11 -0400 Received: from out-74.mta0.migadu.com ([2001:41d0:1004:224b::4a]:41252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPixU-0003Me-Ha for 64922@debbugs.gnu.org; Sat, 29 Jul 2023 08:22:10 -0400 Date: Sat, 29 Jul 2023 14:22:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1690633326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=moqm85heLhIT4XcSFFwN/iuoalkJjXlKWuWKtr4sw/w=; b=SKmRnfAI2v24IPIsmcLCoiKH1wXep859TRZ3Qa4qfL9Xo021IdQ8AQfORQX5T1OxQeOmHg W1x0U+9jqMw2ogkYMgauI+DcMNpqr03pXSO9Ma1CWl9FkiEX6VuJdsr6wWGbID05l9hq9C 5IvFGXWcug6xzQtbayReHI0xp1L24duidDJny8w4oFq+CmWM7qOj1mEl0PDNj897b9sxyG LJJZm4bQ2Qy5naIoa9tXLK6l2KB1ahPYGafDQLr9FMj95l9hiV1gi+JWK9nRscFwPUQMr0 UWNLGbMA+eqBb61OKBG+2yDoMn7tuHXcMMSTBGnDPjoK3GkpUsMCMb5TRyl3uw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill In-Reply-To: <83a5vfm220.fsf@gnu.org> References: <4516186.LvFx2qVVIh@fedora> <83o7jvi2a0.fsf@gnu.org> <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> <83a5vfm220.fsf@gnu.org> Message-ID: <7D2AFB54-84BE-44CF-BE30-AC3DC7E4EE53@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 29 July 2023 12:42:31 CEST, Eli Zaretskii wrote: >> Date: Sat, 29 Jul 2023 11:13:10 +0200 >> From: Theodor Thornhill >> CC: 64922@debbugs=2Egnu=2Eorg >>=20 >> On 29 July 2023 09:51:19 CEST, Eli Zaretskii wrote: >> > >> >Theo, yuan: any comments to the patch? If okay, I'd like to install >> >this on the release branch ASAP=2E >>=20 >> I'm not able to look at it until tonight, which is in 8-9 hours=2E > >I guess it's okay, as I'll need to postpone the decision about >releasing Emacs 29=2E1 till tomorrow anyway=2E > >Thanks=2E Ok thanks, I'll be swift Theo From unknown Sat Sep 20 23:20:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 19:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: casouri@gmail.com, v.pupillo@gmail.com, 64922@debbugs.gnu.org Received: via spool by 64922-submit@debbugs.gnu.org id=B64922.16906583862296 (code B ref 64922); Sat, 29 Jul 2023 19:20:01 +0000 Received: (at 64922) by debbugs.gnu.org; 29 Jul 2023 19:19:46 +0000 Received: from localhost ([127.0.0.1]:49032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPpTd-0000ay-Lt for submit@debbugs.gnu.org; Sat, 29 Jul 2023 15:19:45 -0400 Received: from out-108.mta0.migadu.com ([2001:41d0:1004:224b::6c]:16198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPpTZ-0000an-FP for 64922@debbugs.gnu.org; Sat, 29 Jul 2023 15:19:44 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1690658379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TZV8LS3IuXoHw4cpnCRlbgjNf7ZpPIMq5pCeO6dd198=; b=Hm+qgWkPk316254HYYOcz/sCdF3iRPZM9TsVEzaGzM9q3FGnmRevGna5zvQA52C5DogX79 RiXbJlQU18Et3GW/Mfaiy/3S1dBbb+LeekL0qn5yym6FGtYWiriV9OIe7NoIaromH3ZGCK 7BB6gx7cSpf/4ZDS7Cj8sj0h3YSkhPG3wVE6bpBcbQL4eRyr5U61yEpu3obTwj0H1R+tgq PNDJsp1O48TxKsuM9hA96PTrMxlEpWg/CYf7aBtD1gRk9Kl1mN55mbWzwRTxvmcpioI+we kM+YWGWzTfX1QyEL5eZGfs2fd9K5t8Y4Sadc0tNiCgRNvn3mscMq5K+rOzySbg== From: Theodor Thornhill In-Reply-To: <7D2AFB54-84BE-44CF-BE30-AC3DC7E4EE53@thornhill.no> References: <4516186.LvFx2qVVIh@fedora> <83o7jvi2a0.fsf@gnu.org> <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> <83a5vfm220.fsf@gnu.org> <7D2AFB54-84BE-44CF-BE30-AC3DC7E4EE53@thornhill.no> Date: Sat, 29 Jul 2023 21:19:38 +0200 Message-ID: <874jlm5xv9.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: > On 29 July 2023 12:42:31 CEST, Eli Zaretskii wrote: >>> Date: Sat, 29 Jul 2023 11:13:10 +0200 >>> From: Theodor Thornhill >>> CC: 64922@debbugs.gnu.org >>> >>> On 29 July 2023 09:51:19 CEST, Eli Zaretskii wrote: >>> > >>> >Theo, yuan: any comments to the patch? If okay, I'd like to install >>> >this on the release branch ASAP. >>> >>> I'm not able to look at it until tonight, which is in 8-9 hours. >> >>I guess it's okay, as I'll need to postpone the decision about >>releasing Emacs 29.1 till tomorrow anyway. >> >>Thanks. > > Ok thanks, I'll be swift > > Theo Installed. @Vincenzo - thanks for the patch! For the next one, please make sure the commit message conforms with the directions in CONTRIBUTE, in particular line length :) Theo From unknown Sat Sep 20 23:20:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vincenzo Pupillo Subject: bug#64922: closed (Re: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition) Message-ID: References: <831qgqmsfo.fsf@gnu.org> <4516186.LvFx2qVVIh@fedora> X-Gnu-PR-Message: they-closed 64922 X-Gnu-PR-Package: emacs Reply-To: 64922@debbugs.gnu.org Date: Sat, 29 Jul 2023 19:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1690658762-2854-1" This is a multi-part message in MIME format... ------------=_1690658762-2854-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64922: treesit-query-error due to a recent change to tree-sitter-cmake gra= mmar definition which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64922@debbugs.gnu.org. --=20 64922: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64922 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1690658762-2854-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64922-done) by debbugs.gnu.org; 29 Jul 2023 19:25:19 +0000 Received: from localhost ([127.0.0.1]:49038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPpZ1-0000j7-Gc for submit@debbugs.gnu.org; Sat, 29 Jul 2023 15:25:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPpYz-0000it-VV for 64922-done@debbugs.gnu.org; Sat, 29 Jul 2023 15:25:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPpYu-0002Yd-IY; Sat, 29 Jul 2023 15:25:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=plovhv8whEZN6LheCEtkb55D2mIYVdEYTItRhHBon0c=; b=pNgTtbIpteTc JKbxCeZIsenyBgapk+OQzeoeKoEdmjV8yOdDVypq40qCqS6xZBNY0FwLikXRQliL45sEYROI0mpy4 Ya2G7UMWug/2KsqoUDQ6bY6Jq3uJz7Mk9dD64JqlII8bC0H94VXFDlzkc/rf2/o4Vvcv5DOuHsa9z GHs+WJkQQMDU6XJmZ4E2Qk/wA+EDIRtS6ChpLtZAcKzqQvGdOdhxP2qS0/+gEeMTS6RBAX9eB8H2C 1oGU+tQSjWvYhEWUDAwHV8snbTUXStXLRvP01OAr5YtP5+ZWCQiBFQBFxjNfefKAYDjRfCMIj6m2z T5RmNoyFNwNEbrHVF4Dljg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPpYj-0004EI-9T; Sat, 29 Jul 2023 15:25:12 -0400 Date: Sat, 29 Jul 2023 22:24:59 +0300 Message-Id: <831qgqmsfo.fsf@gnu.org> From: Eli Zaretskii To: Theodor Thornhill In-Reply-To: <874jlm5xv9.fsf@thornhill.no> (message from Theodor Thornhill on Sat, 29 Jul 2023 21:19:38 +0200) Subject: Re: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition References: <4516186.LvFx2qVVIh@fedora> <83o7jvi2a0.fsf@gnu.org> <340B2E06-A04B-40B5-ABE5-4EF9189AC1CC@thornhill.no> <83a5vfm220.fsf@gnu.org> <7D2AFB54-84BE-44CF-BE30-AC3DC7E4EE53@thornhill.no> <874jlm5xv9.fsf@thornhill.no> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64922-done Cc: casouri@gmail.com, v.pupillo@gmail.com, 64922-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Theodor Thornhill > Cc: v.pupillo@gmail.com, casouri@gmail.com, 64922@debbugs.gnu.org > Date: Sat, 29 Jul 2023 21:19:38 +0200 > > Installed. Thanks! ------------=_1690658762-2854-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jul 2023 20:59:41 +0000 Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPUYm-0006fa-J3 for submit@debbugs.gnu.org; Fri, 28 Jul 2023 16:59:41 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPUYk-0006fM-ER for submit@debbugs.gnu.org; Fri, 28 Jul 2023 16:59:39 -0400 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 1qPUYe-0007xt-UR for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 16:59:32 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPUYd-0001hy-2b for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 16:59:32 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso25745125e9.0 for ; Fri, 28 Jul 2023 13:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690577969; x=1691182769; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=h/D9aikAIZgg7gi/MdcMvz5aTJGQ4DoRA9hb8c2S+Ts=; b=pTa2sawB3kG9kqus+28wkRqOh8N4aqPQcx+GE/VERJwmaz6EQbFqFRiZyvyKjsou8N TIERFtsosLqrg2S3w3Rc3ELniiPqL77pMQtDvBfUC3zr8SN4wZT6te6ZHPhOEdqtKKot 6DBoCfAutCUe54MLKB+E7Wlr0T5JoPFqh/izCddyRotXFbvTdkUWe5dBWp/fFvT/uNxW sX+lAKds4fW3sYLWAOCK6Dusfi42jrVVL1vhmlyhD9MP+VwWfruPowIrmFVf5BPZWCCW vfSs/Gu18AUWz56bSPs18qcN5AME+aNASWg3wxXGbsh81TDUe/lYjYRzB6AJNXNH+n6S WgVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690577969; x=1691182769; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h/D9aikAIZgg7gi/MdcMvz5aTJGQ4DoRA9hb8c2S+Ts=; b=arNbjUDvBiuwipaumdITM+bfoFgw9ij1mhMoQgH6+z8zUZSr933TZ3R5dc8DADLA5N TOgh0ClP+wCZMoRSwMOV6vq/mPtIwo8NNXrDuNX3LKVFgCBI0kb7pcEC2cfvWahULc4c Ez7xHgd9PXcZd42omxbnlifnO5loQurUI29DIDddx73DOzH9LN2CaENdmG/gFvuqnTnp ezGIJ9f/vfCPFEB1/EN27hWwqB+nVhrPcMkZ6cVJ+sjTkBuNLSPJ+N997mXxKrpHXSMp 62ubL7+i7mEMaQnjD+AoNApOrUXubyIKIGJbK6vUrzNdqUsHKGfohuI80AApo7PIrvSn ZtAQ== X-Gm-Message-State: ABy/qLaY5j2Y6ZvzBpXNyn8tOg0AzlBYBaQGJy8iRoZxSSDEBMXQM2iv YSmWID0Z5qWEcNcNtbVYFg/fKsTZx1s= X-Google-Smtp-Source: APBJJlHXy5tAsxcTzC64ouvBvNigYMqVFBpHk5wtfdtfXXpZsPfNB0JNsZeiUCW+RxWBjwOl3soYiA== X-Received: by 2002:a5d:608a:0:b0:314:415:cbf5 with SMTP id w10-20020a5d608a000000b003140415cbf5mr2645516wrt.51.1690577968871; Fri, 28 Jul 2023 13:59:28 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id p9-20020a5d48c9000000b0031433443265sm5714474wrs.53.2023.07.28.13.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 13:59:28 -0700 (PDT) From: Vincenzo Pupillo To: bug-gnu-emacs@gnu.org Subject: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition Date: Fri, 28 Jul 2023 22:59:27 +0200 Message-ID: <4516186.LvFx2qVVIh@fedora> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2307625.ElGaqSPkdT" Content-Transfer-Encoding: 7Bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=v.pupillo@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multi-part message in MIME format. --nextPart2307625.ElGaqSPkdT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed the definition of the cmake grammar, now there is a new node argument_list used to wrap nodes of type argument. This causes the following error: Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant- face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\| ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\ \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\ (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\ \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\ \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\ \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query- validate'") The attached patch supports both the old and the new grammar. Thanks. Vincenzo --nextPart2307625.ElGaqSPkdT Content-Disposition: attachment; filename="0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch" >From 33a53c86b38624dcfe88aca24f6f1f94ab339463 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Fri, 28 Jul 2023 22:37:02 +0200 Subject: [PATCH] Updated CMake support due to changes in tree-sitter-cmake A recent change in tree-sitter-cmake grammar support for CMake (commit fe9b5e0), now put arguments are wrapped in a new argument_list node. To support the old and new version of the grammar, a new function was added on which string syntax highlighting now depends. * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--font-lock-compatibility-fe9b5e0): indent helper function for handle different tree-sitter-cmake version * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--font-lock-settings): use the new function to handle the new argument_list node. --- lisp/progmodes/cmake-ts-mode.el | 54 ++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index 9d35d8077bd..9fcd8a7a2ab 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -31,6 +31,7 @@ (eval-when-compile (require 'rx)) (declare-function treesit-parser-create "treesit.c") +(declare-function treesit-query-capture "treesit.c") (declare-function treesit-induce-sparse-tree "treesit.c") (declare-function treesit-node-child "treesit.c") (declare-function treesit-node-start "treesit.c") @@ -87,6 +88,42 @@ "VERSION_GREATER_EQUAL" "VERSION_LESS" "VERSION_LESS_EQUAL") "CMake if conditions for tree-sitter font-locking.") +(defun cmake-ts-mode--font-lock-compatibility-fe9b5e0 () + "Indent rules helper, to handle different releases of tree-sitter-cmake. +Check if a node type is available, then return the right indent rules." + ;; handle commit fe9b5e0 + (condition-case nil + (progn (treesit-query-capture 'cmake '((argument_list) @capture)) + `(((foreach_command + ((argument_list) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--foreach-options) + eol)) + @font-lock-constant-face)))) + ((if_command + ((argument_list) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--if-conditions) + eol)) + @font-lock-constant-face)))))) + (error + `(((foreach_command + ((argument) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--foreach-options) + eol)) + @font-lock-constant-face)))) + ((if_command + ((argument) @font-lock-constant-face + (:match ,(rx-to-string + `(seq bol + (or ,@cmake-ts-mode--if-conditions) + eol)) + @font-lock-constant-face)))))))) + (defvar cmake-ts-mode--font-lock-settings (treesit-font-lock-rules :language 'cmake @@ -95,21 +132,8 @@ :language 'cmake :feature 'builtin - `(((foreach_command - ((argument) @font-lock-constant-face - (:match ,(rx-to-string - `(seq bol - (or ,@cmake-ts-mode--foreach-options) - eol)) - @font-lock-constant-face)))) - ((if_command - ((argument) @font-lock-constant-face - (:match ,(rx-to-string - `(seq bol - (or ,@cmake-ts-mode--if-conditions) - eol)) - @font-lock-constant-face))))) - + (cmake-ts-mode--font-lock-compatibility-fe9b5e0) + :language 'cmake :feature 'comment '([(bracket_comment) (line_comment)] @font-lock-comment-face) -- 2.41.0 --nextPart2307625.ElGaqSPkdT-- ------------=_1690658762-2854-1--