From unknown Wed Jun 18 23:15:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71518 <71518@debbugs.gnu.org> To: bug#71518 <71518@debbugs.gnu.org> Subject: Status: 30.0.50; Errors during redisplay with c++-ts-mode Reply-To: bug#71518 <71518@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:15:28 +0000 retitle 71518 30.0.50; Errors during redisplay with c++-ts-mode reassign 71518 emacs submitter 71518 Eli Zaretskii severity 71518 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 08:33:27 2024 Received: (at submit) by debbugs.gnu.org; 12 Jun 2024 12:33:27 +0000 Received: from localhost ([127.0.0.1]:37826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHNAM-0000s9-UV for submit@debbugs.gnu.org; Wed, 12 Jun 2024 08:33:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:57124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHNAH-0000rx-Gc for submit@debbugs.gnu.org; Wed, 12 Jun 2024 08:33:25 -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 1sHNAH-00053b-NX for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 08:33:21 -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 1sHNAH-0002jE-BZ for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 08:33:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=uIN+ifLWue9suOqBubvljQzQ4DeaqA64s5TpJy7TCmM=; b=qM4rLZGIH+b2qv HnZBMoJxXyvOQ+NQTLCwhC4cjyDFfnC3DNvh94UbuJN7gg9EHpAmO7nKKLKbHg8q5o3lte88gBXOW syZdADRhsBPkXVyz3efpSodt0LG9V3krEvopYCxe5/vGjdJZtxvUXep7XTU/GiEiYg3t/xUNqzGXn 0qvmpym0OQip8kph1NSbzhZw2AxGKK2oER8zs53jH0sqJ9H76FBZhuHeYtXdky3kiQmw6GoDP8/xh 2ziZO1ipJvEjoDATZul4gjIQsnnJaZzoBS5ethhmwifdOXUGKF/SYxRwFitqEC6ZbMhZdECFuuh51 EpGYoWFrkXiQVodA+sZQ==; Date: Wed, 12 Jun 2024 15:33:17 +0300 Message-Id: <865xue1gtu.fsf@gnu.org> From: Eli Zaretskii To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Errors during redisplay with c++-ts-mode X-Debbugs-Cc: Yuan Fu X-Spam-Score: -0.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: -3.3 (---) To reproduce in "emacs -Q", visit some C++ source file (I used breakpoint.c from the GDB sources), then turn on c++-ts-mode. The fontification is all incorrect, and *Messages* has these error messages: Error during redisplay: (jit-lock-function 7286) signaled (treesit-query-error "Node type error at" 575 "[\"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"requires\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") This happens with the latest C++ tree-sitter grammar library. I guess they made some incompatible change in the grammar or something? In GNU Emacs 30.0.50 (build 1390, i686-pc-mingw32) of 2024-06-12 built on ELIZ-PC Windowing system distributor 'Microsoft Corp.', version 10.0.22631 System Description: Microsoft Windows 10 Enterprise (v10.0.2009.22631.3737) Configured using: 'configure -C --prefix=/d/usr --with-wide-int --without-native-compilation --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3'' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: C++// Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq c++-ts-mode c-ts-mode c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel touch-screen dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 77555 16252) (symbols 48 8646 0) (strings 16 23283 3114) (string-bytes 1 664446) (vectors 16 12923) (vector-slots 8 142312 10122) (floats 8 27 167) (intervals 40 3770 136) (buffers 896 12)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 01:23:45 2024 Received: (at submit) by debbugs.gnu.org; 13 Jun 2024 05:23:45 +0000 Received: from localhost ([127.0.0.1]:51688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHcw4-0007G8-Li for submit@debbugs.gnu.org; Thu, 13 Jun 2024 01:23:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:41770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHOQV-000461-HG for submit@debbugs.gnu.org; Wed, 12 Jun 2024 09:54:12 -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 1sHOQT-0000gE-Q4 for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 09:54:11 -0400 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1sHOQP-000286-Eu; Wed, 12 Jun 2024 09:54:09 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4Vzn875CWdz9sxS; Wed, 12 Jun 2024 15:53:59 +0200 (CEST) From: Vincenzo Pupillo To: 71518@debbugs.gnu.org, bug-gnu-emacs@gnu.org Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Wed, 12 Jun 2024 15:53:57 +0200 Message-ID: <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> In-Reply-To: <865xue1gtu.fsf@gnu.org> References: <865xue1gtu.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Rspamd-Queue-Id: 4Vzn875CWdz9sxS Received-SPF: pass client-ip=80.241.59.207; envelope-from=vincenzo.pupillo@lpsd.it; helo=mout-u-107.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 13 Jun 2024 01:23:40 -0400 Cc: Yuan Fu , Eli Zaretskii 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: -2.3 (--) In data mercoled=C3=AC 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha scrit= to: > To reproduce in "emacs -Q", visit some C++ source file (I used > breakpoint.c from the GDB sources), then turn on c++-ts-mode. The > fontification is all incorrect, and *Messages* has these error > messages: >=20 > Error during redisplay: (jit-lock-function 7286) signaled (treesit-quer= y-error "Node type error at" 575 "[\"_Atomic\" \"break\" \"case\" \"const\"= \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"got= o\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"sta= tic\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" \"= and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co= _return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" \"= constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"mut= able\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \= "or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"require= s\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" \"xor= \" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this= ) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") >=20 > This happens with the latest C++ tree-sitter grammar library. I guess > they made some incompatible change in the grammar or something? >=20 >=20 Yes, they changed the grammar.=20 https://github.com/tree-sitter/tree-sitter-cpp/issues/271 V. >=20 > In GNU Emacs 30.0.50 (build 1390, i686-pc-mingw32) of 2024-06-12 built > on ELIZ-PC > Windowing system distributor 'Microsoft Corp.', version 10.0.22631 > System Description: Microsoft Windows 10 Enterprise (v10.0.2009.22631.373= 7) >=20 > Configured using: > 'configure -C --prefix=3D/d/usr --with-wide-int > --without-native-compilation --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 > -gdwarf-4 -g3'' >=20 > Configured features: > ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY > PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS > TREE_SITTER WEBP XPM ZLIB >=20 > Important settings: > value of $LANG: ENU > locale-coding-system: cp1252 >=20 > Major mode: C++// >=20 > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t >=20 > Load-path shadows: > None found. >=20 > Features: > (shadow sort mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util text-property-search time-date subr-x mm-decode > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq > c++-ts-mode c-ts-mode c-ts-common treesit cc-mode cc-fonts cc-guess > cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs > cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric > uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > touch-screen dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars > term/common-win tool-bar dnd fontset image regexp-opt fringe > tabulated-list replace newcomment text-mode lisp-mode prog-mode register > page tab-bar menu-bar rfn-eshadow isearch easymenu timer select > scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors > frame minibuffer nadvice seq simple cl-generic indonesian philippine > cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao > korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech > european ethiopic indian cyrillic chinese composite emoji-zwj charscript > charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure > cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp > files window text-properties overlay sha1 md5 base64 format env > code-pages mule custom widget keymap hashtable-print-readable backquote > threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process > emacs) >=20 > Memory information: > ((conses 16 77555 16252) (symbols 48 8646 0) (strings 16 23283 3114) > (string-bytes 1 664446) (vectors 16 12923) > (vector-slots 8 142312 10122) (floats 8 27 167) > (intervals 40 3770 136) (buffers 896 12)) >=20 >=20 >=20 >=20 =2D-=20 Those who can't write, write manuals. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 02:51:41 2024 Received: (at submit) by debbugs.gnu.org; 13 Jun 2024 06:51:41 +0000 Received: from localhost ([127.0.0.1]:56602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHeJA-0002aX-SW for submit@debbugs.gnu.org; Thu, 13 Jun 2024 02:51:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:42370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHeJ9-0002aN-0P for submit@debbugs.gnu.org; Thu, 13 Jun 2024 02:51: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 1sHeJ9-00017k-E2 for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 02:51:39 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHeJ7-0003Hz-Ol; Thu, 13 Jun 2024 02:51:39 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-6c702226b0aso1268928a12.1; Wed, 12 Jun 2024 23:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718261495; x=1718866295; darn=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=znZcxYZlWsT8em/DfG+FR1Iu6jt0BUT519yYnWV3YX8=; b=CFzVgmdtQVctB1FnptxMe6/mlklVwfxVTx0vUH5jPFqecSTFbkm8/v9MF8ZXbTKu65 TK9fqOCDFQpwqA0DkYyz6/xw+F4Y5X4pV3Ua8SvzTZUkvKqk4t0ZRSHLlsByXn7LYN0Q qEqrBU8h6EkEdvcKZ22y6KU3VDwL+yYDCvz0zT8Y5r6p/SqAuFqTvcHkoycK9aTBzJez HITQr2xjNqrtTRY/ZXyfKgjjfRbxdILcN8WQqQAqXNEE7nbdEa12ux5qwRe9/kTkjc/H CY8pJoDSduWXL12g4PqQD2vc/ZgWzOwSiIutn17OIuqEZdjc/cutZdWz96jgqz7xCkFF EYqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718261495; x=1718866295; 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=znZcxYZlWsT8em/DfG+FR1Iu6jt0BUT519yYnWV3YX8=; b=GLbyn5juDRck9akE0gYzMOb1MPOms1uQaqGee+7Y56d9LCtKCuL70ofxbDpe0noG5u os5j37KrWIGc6XAyaW2bIZgV+UnOi4rQtcc3xeHHCbNrHLEv3ZgKAzbp+bEQt8svqGKX ua03r4CzBJgN5Sx4fQFHL9wo53etnI6AEk0CxfVuqIsL1JRDlVsu0DPWR+yMqwfHOvuO GRMK6wRWZCyCH/weu7DbGqC7hnGhi239Z4iu/7nQ50I8s3H0Q5ZCexni7eOPq77VCJ+2 /21EuiIbvXKRYdtH3IYfZQnX+ry4FFfkrK2BHOU4t136MceA0KA5wPl4KfZO4ClEzlAy D4WA== X-Forwarded-Encrypted: i=1; AJvYcCUj/F0Cmmd0SecQr0RtJKMLlJ35DbX6LKk9Mf9lW+KxcBjYfaQ73gGVmIj0r2Pg7YACofLy8fwZnoZV+wrldN+gZ9HIelc/BMBH1MK6NzMCQD1UZw== X-Gm-Message-State: AOJu0YzWqVyKkmH8HDIeXqerj1hrfIorLXpobF1wUBynIdyfgf676pX1 A1Vq8xc/T3qYaM4QnP09xw65z8Bho1pUtvgPfGBc1RlvkaAVK03f X-Google-Smtp-Source: AGHT+IGEcveeAvzEPET5BF7X8yVrM0D15m7iIBKode9qyTIwYG+UrxaoSB7WXRy1XpG8lv0jdYvslQ== X-Received: by 2002:a17:90a:ca15:b0:2c1:dc60:d933 with SMTP id 98e67ed59e1d1-2c4bd9fc010mr2908863a91.19.1718261494465; Wed, 12 Jun 2024 23:51:34 -0700 (PDT) Received: from smtpclient.apple ([98.47.187.88]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c4a75d207dsm3133617a91.12.2024.06.12.23.51.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jun 2024 23:51:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode From: Yuan Fu In-Reply-To: <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> Date: Wed, 12 Jun 2024 23:51:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> References: <865xue1gtu.fsf@gnu.org> <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> To: Vincenzo Pupillo X-Mailer: Apple Mail (2.3774.600.62) Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=casouri@gmail.com; helo=mail-pg1-x535.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.3 (-) X-Debbugs-Envelope-To: submit Cc: 71518@debbugs.gnu.org, Bug Report Emacs , Eli Zaretskii 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: -2.3 (--) > On Jun 12, 2024, at 6:53=E2=80=AFAM, Vincenzo Pupillo = wrote: >=20 >=20 > In data mercoled=C3=AC 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha = scritto: >> To reproduce in "emacs -Q", visit some C++ source file (I used >> breakpoint.c from the GDB sources), then turn on c++-ts-mode. The >> fontification is all incorrect, and *Messages* has these error >> messages: >>=20 >> Error during redisplay: (jit-lock-function 7286) signaled = (treesit-query-error "Node type error at" 575 "[\"_Atomic\" \"break\" = \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" = \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" = \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" = \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" = \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" = \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" = \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" = \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" = \"override\" \"private\" \"protected\" \"public\" \"requires\" = \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" = \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) = @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query = with `treesit-query-validate'") >>=20 >> This happens with the latest C++ tree-sitter grammar library. I = guess >> they made some incompatible change in the grammar or something? >>=20 >>=20 > Yes, they changed the grammar.=20 > https://github.com/tree-sitter/tree-sitter-cpp/issues/271 >=20 > V. So it seems =E2=80=9Cvirtual=E2=80=9D is now a named node rather than an = anonymous node, which is a little odd. I asked the author about it in = the GitHub issue, let me clear that up before fixing c-ts-mode. And, Eli, we really really should pin tree-sitter grammars. As more = people start using tree-sitter modes, they will found out about the = breakage before we do and the tree-sitter major mode would be unusable = for them before they upgrade their grammar. Most of them will not know = how to do it and which commit to downgrade to. And I really don=E2=80=99t = want to chase the random changes these grammars make all the time. = Fixing for these breakages is arguably a heavier maintenance burden than = pinning tree-sitter grammars. Yuan=20= From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 04:24:39 2024 Received: (at 71518) by debbugs.gnu.org; 13 Jun 2024 08:24:39 +0000 Received: from localhost ([127.0.0.1]:33952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHfl9-0006Vr-6i for submit@debbugs.gnu.org; Thu, 13 Jun 2024 04:24:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHfl7-0006VV-Gr for 71518@debbugs.gnu.org; Thu, 13 Jun 2024 04:24:38 -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 1sHfl1-000319-8W; Thu, 13 Jun 2024 04:24:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rQr/SfeH4Y+OYuxiEORJixfMAEKP3eLqMcqVeRriu+E=; b=Fma78TLruPUBy8FBtAfv iLynNHXtlj9k9VIxsxY92f1SyfAgb6sf+ZC24DfXB9I39DjFbLxGIqdIbO3mc29GXsiL2PzZsQHEJ SgVJ081StoHGmi7AU7oWtD9E4l40hxtTREUSuDW6fexNb7eIHQwe4OkANUBQ4dbvhPgHLJC+ItrMP +vpRT1lZkWXDH5baVLdYyRMOa8KVx5qZWZIDZqxauQS6rZ0f25ymXwy91AqNnKSPXcBrpmb1E6G1d ThU7HfqNPVdguQBoL4aXQeZE4eYOw1zgcCDyYVLSZHAXNNXIOaJ9HoV1+9P8eTmCouplxzcoZEtE4 8zwc8VIHSH9TZg==; Date: Thu, 13 Jun 2024 11:24:27 +0300 Message-Id: <86le39z1vo.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> (message from Yuan Fu on Wed, 12 Jun 2024 23:51:21 -0700) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: vincenzo.pupillo@lpsd.it, 71518@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: Yuan Fu > Date: Wed, 12 Jun 2024 23:51:21 -0700 > Cc: 71518@debbugs.gnu.org, > Bug Report Emacs , > Eli Zaretskii > > So it seems “virtual” is now a named node rather than an anonymous node, which is a little odd. I asked the author about it in the GitHub issue, let me clear that up before fixing c-ts-mode. Thanks. > And, Eli, we really really should pin tree-sitter grammars. As more people start using tree-sitter modes, they will found out about the breakage before we do and the tree-sitter major mode would be unusable for them before they upgrade their grammar. Most of them will not know how to do it and which commit to downgrade to. And I really don’t want to chase the random changes these grammars make all the time. Fixing for these breakages is arguably a heavier maintenance burden than pinning tree-sitter grammars. But we've been through this already: pinning versions is impractical, except for those of us who build their own grammar libraries and can checkout and build the specific pinned revision. The rest of the users, who rely on grammars compiled by someone else, will have no practical way of using the TS modes, unless that someone happens to provide the pinned version. And what is the mechanism of selecting the pinned version? Who and how will determine which version to pin, and how will we indicate those versions in Emacs? This was never finalized, and is not trivial at all. When we discussed that, there was a question of how the various distros handle these libraries, if they at all distribute that. Did we learn something new about this? If nothing has changed since we discussed that, why are you saying now that we "really should pin"? That other editors use pinned versions doesn't mean it's a good solution, for us or in general. It definitely has a disadvantage of preventing users to upgrade the grammar libraries until the next Emacs release (which could be several months or even a year away), and the advantage is quite illusory. yes, without pinning we have a maintenance headache on our hands, but if there's no better alternative, what else can we do? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 04:58:00 2024 Received: (at submit) by debbugs.gnu.org; 13 Jun 2024 08:58:00 +0000 Received: from localhost ([127.0.0.1]:36088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHgHP-0007wz-Ks for submit@debbugs.gnu.org; Thu, 13 Jun 2024 04:58:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:36846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHgHN-0007wq-D6 for submit@debbugs.gnu.org; Thu, 13 Jun 2024 04:57:58 -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 1sHgHN-0007Jr-JY for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 04:57:57 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHgHL-0000Q0-Hp; Thu, 13 Jun 2024 04:57:57 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a6f0dc80ab9so116129266b.2; Thu, 13 Jun 2024 01:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718269072; x=1718873872; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aHwJmHfwzaOKRWDc1q4GFNRg/4aIQaOjbPUnu5yABQw=; b=fn4/yHOP7WqTuwIzfNQcsSE48M2IFxR1nTrxFeoIaZyWPsl7nwNJ60daiBmjmpGRb4 yRlw+cj3CX8rt5wny90KCFBYjc/0keesXTFFQAljVJZOIoesui4BzS6znGnVWle/o6bf XMLM8c69ZYyq02LgU3h0C6IB0h1abTLhyHsE2FCxD3LtCIK2zWzY1VVNK8BRwY8wxhDH PdA/fK2b9O6CGdjJfNSO/XUr/gTsxL2x6gcUh0lQvqVUT5z79gWj8peiVWuh8KEq1oDw EI0NZt2xjit4A5NLsOKQ8rN6SH/zDR+p00vyuo2/UA8yfQhzzAEovHeeLUGmN+vzCV+V LbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718269072; x=1718873872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aHwJmHfwzaOKRWDc1q4GFNRg/4aIQaOjbPUnu5yABQw=; b=Wb3nHrwD57NrtbReomLE46qSci2OB4ax5kapVNHmIIGQCaPaxFQm+drRr3/rJJXA22 +Ip0QZ4pNwlZf9XK+6sdAmJ3BXQww8mjwUQ5Y4qLNyF5V6AvnGkxA4iSvMBnOkMmiG4I xWFbZgUEae/9QH7g68XWeaC5t9GqZstUvx8aAQfKpag2spJr/5EFWeHfU25+o8bjD0qD vRWatrhfDlzO77CGRqn2IoRTOPVuvOFa4hqnMrcuHI65tJmEeaQMKj4J9zZc+B0EjA2G F1XmVxnNRxIE+lMFET7leYgeL39quuNI47Zpe1tEpVmEEhThe1TtGnGTAd9ZxlmnGI62 iBDA== X-Forwarded-Encrypted: i=1; AJvYcCUL4E5rUH88wPK7uZm4NChv0op4ZRIm0mcEyLf5f63/buX4Wz+KX4ZtJwLABl9EcqAKy2QUo8WbIOVkt0E= X-Gm-Message-State: AOJu0YxThnBQ+EMGU4m3kjIgRJaxY/H29DatGO717+aGDqYYXj8KroA/ 4lUuGyldOqvOQABTRhg9GC/LKYyUShW/VHqJml2x5C96tZdWzRVHQjTF0cJ8 X-Google-Smtp-Source: AGHT+IHnFKrNOHnuCj+Qxe5FgCpX2WzCSJXp1dqHAycb71U+fl8toaUPfNBDaE0nEfdNScAuIk7RPA== X-Received: by 2002:a17:906:c14a:b0:a6f:1951:5755 with SMTP id a640c23a62f3a-a6f47c7d735mr292935066b.11.1718269071880; Thu, 13 Jun 2024 01:57:51 -0700 (PDT) Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f9c84csm48615066b.222.2024.06.13.01.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:57:51 -0700 (PDT) From: Vincenzo Pupillo To: bug-gnu-emacs@gnu.org Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Thu, 13 Jun 2024 10:57:50 +0200 Message-ID: <2461821.9o76ZdvQCi@3-191.divsi.unimi.it> In-Reply-To: <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> References: <865xue1gtu.fsf@gnu.org> <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=v.pupillo@gmail.com; helo=mail-ej1-x635.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.3 (-) X-Debbugs-Envelope-To: submit Cc: 71518@debbugs.gnu.org, eliz@gnu.org, Yuan Fu 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: -2.3 (--) In data gioved=C3=AC 13 giugno 2024 08:51:21 CEST, Yuan Fu ha scritto: >=20 > > On Jun 12, 2024, at 6:53=E2=80=AFAM, Vincenzo Pupillo wrote: > >=20 > >=20 > > In data mercoled=C3=AC 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha s= critto: > >> To reproduce in "emacs -Q", visit some C++ source file (I used > >> breakpoint.c from the GDB sources), then turn on c++-ts-mode. The > >> fontification is all incorrect, and *Messages* has these error > >> messages: > >>=20 > >> Error during redisplay: (jit-lock-function 7286) signaled (treesit-qu= ery-error "Node type error at" 575 "[\"_Atomic\" \"break\" \"case\" \"const= \" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"g= oto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"s= tatic\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" = \"and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"= co_return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" = \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"m= utable\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\"= \"or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"requi= res\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" \"x= or\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (th= is) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'= ") > >>=20 > >> This happens with the latest C++ tree-sitter grammar library. I guess > >> they made some incompatible change in the grammar or something? > >>=20 > >>=20 > > Yes, they changed the grammar.=20 > > https://github.com/tree-sitter/tree-sitter-cpp/issues/271 > >=20 > > V. >=20 > So it seems =E2=80=9Cvirtual=E2=80=9D is now a named node rather than an = anonymous node, which is a little odd. I asked the author about it in the G= itHub issue, let me clear that up before fixing c-ts-mode. >=20 > And, Eli, we really really should pin tree-sitter grammars. As more peopl= e start using tree-sitter modes, they will found out about the breakage bef= ore we do and the tree-sitter major mode would be unusable for them before = they upgrade their grammar. Most of them will not know how to do it and whi= ch commit to downgrade to. And I really don=E2=80=99t want to chase the ran= dom changes these grammars make all the time. Fixing for these breakages is= arguably a heavier maintenance burden than pinning tree-sitter grammars. +1.=20 This is why php-ts-mode has a feature just for installing specific versions= of grammars (unfortunately phpdoc has no tags on the repository :-( ) Vincenzo >=20 > Yuan=20 >=20 >=20 >=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 20 12:39:59 2024 Received: (at control) by debbugs.gnu.org; 20 Jun 2024 16:39:59 +0000 Received: from localhost ([127.0.0.1]:35891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKKpL-0007Gm-F5 for submit@debbugs.gnu.org; Thu, 20 Jun 2024 12:39:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKKpI-0007GO-R4; Thu, 20 Jun 2024 12:39:57 -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 1sKKp8-0005gv-Kr; Thu, 20 Jun 2024 12:39:46 -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=28rCFtfUpq7AOn/PG+jBt6pVX7VS5Q3LcLNY7PTKZbc=; b=Xm5swiW8WN0q 6JaSYDcUTwvN78x6uT5S5vXRZVmeXYi2rYf5j8TYF1L4Ea96XHrlmR5yejP6LZ13yOvfMhTKSaEVV gk5E2FgicJOwOT41R1MH9gjVU8OqbTFLYe1H1BMWf9I5zgO6wuv9l4wRXZRM3pKfRWeKzUFUDUlQx QEtH5uotIcErlc66bVSq58BinCOaTrLKjwp2AUt/1JM+bGtLos7ejsSsVm8WB3Q6iC28g12PcP9A8 B+0xzigIg/KzZBTXlqspm9PzfnKDFGacVZnJXTJpDy7e0rLj2h90t8fJ5ugns5aaXaxiTte2dkYx1 zWwoFJNVDZ16baocDg5Orw==; Date: Thu, 20 Jun 2024 19:39:43 +0300 Message-Id: <86tthnmuuo.fsf@gnu.org> From: Eli Zaretskii To: Daniel Colascione , Yuan Fu In-Reply-To: <87frt7vaji.fsf@dancol.org> (message from Daniel Colascione on Thu, 20 Jun 2024 12:33:37 -0400) Subject: Re: bug#71680: c++-ts-mode with latest tree-sitter-cpp grammar barfs on "virtual" References: <87frt7vaji.fsf@dancol.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 71680@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 (---) merge 71680 71518 thanks > From: Daniel Colascione > Date: Thu, 20 Jun 2024 12:33:37 -0400 > > When using latest master Emacs with latest release tree-sitter and > latest version of tree-sitter-cpp, we get an error redisplay in > redisplay complaining that the "virtual" keyword in c-ts-mode--keywords > is an invalid query. Removing "virtual" from the list in c-ts-mode.el > resolves the problem, but of course, results in the "virtual" keyword > not being fontified as a keyword. Yes, this is a known bug#71518. Yuan, could we please fix it soon? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 04:27:02 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 08:27:02 +0000 Received: from localhost ([127.0.0.1]:44231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKw5N-00084v-97 for submit@debbugs.gnu.org; Sat, 22 Jun 2024 04:27:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKw5K-00084c-MR for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 04:27:00 -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 1sKw5F-0002Vv-0r; Sat, 22 Jun 2024 04:26:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OSlk+NRhMVPU0DL+9s3hiC7xzvXSLyT7WJop82w6NvM=; b=f4yriUAfCcwOdX7v5NYp eedn2iDommq8CCW2sS4CO/GxY6CNPej94ed1qsuycOcmrYFLTShl6CVg5JW+n/Gst61fNqSIfdxLE aZFaMSIycQ/JdYNWfHYCI9MZh+CFXRpVI6eeP/8E+BHdVCM7hTuGZ3cOVoWEkgQ16C1RjnXzRIP9u AcQm8nxrck+zMYOPWt3LaUvTAlFoe7xf81sPKK4kExSsmGkT3eLk/1slYdIN+iIDAGk1H5KKHKUgt xi9QuwKvS34Idx3bMWhR4IKqlGUHhbu2c0wJhw26IBmKj2K2PEfBNmhp1rUCX8utdz6sSeOwqnpDN FeSkjpQZBLMGaw==; Date: Sat, 22 Jun 2024 11:26:43 +0300 Message-Id: <86wmmhidrw.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> (message from Yuan Fu on Wed, 12 Jun 2024 23:51:21 -0700) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: vincenzo.pupillo@lpsd.it, 71518@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 (---) Ping! Any progress with this bug? > From: Yuan Fu > Date: Wed, 12 Jun 2024 23:51:21 -0700 > Cc: 71518@debbugs.gnu.org, > Bug Report Emacs , > Eli Zaretskii > > > > > On Jun 12, 2024, at 6:53 AM, Vincenzo Pupillo wrote: > > > > > > In data mercoledì 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha scritto: > >> To reproduce in "emacs -Q", visit some C++ source file (I used > >> breakpoint.c from the GDB sources), then turn on c++-ts-mode. The > >> fontification is all incorrect, and *Messages* has these error > >> messages: > >> > >> Error during redisplay: (jit-lock-function 7286) signaled (treesit-query-error "Node type error at" 575 "[\"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"requires\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") > >> > >> This happens with the latest C++ tree-sitter grammar library. I guess > >> they made some incompatible change in the grammar or something? > >> > >> > > Yes, they changed the grammar. > > https://github.com/tree-sitter/tree-sitter-cpp/issues/271 > > > > V. > > So it seems “virtual” is now a named node rather than an anonymous node, which is a little odd. I asked the author about it in the GitHub issue, let me clear that up before fixing c-ts-mode. > > And, Eli, we really really should pin tree-sitter grammars. As more people start using tree-sitter modes, they will found out about the breakage before we do and the tree-sitter major mode would be unusable for them before they upgrade their grammar. Most of them will not know how to do it and which commit to downgrade to. And I really don’t want to chase the random changes these grammars make all the time. Fixing for these breakages is arguably a heavier maintenance burden than pinning tree-sitter grammars. > > Yuan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 10:43:20 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 14:43:20 +0000 Received: from localhost ([127.0.0.1]:48447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL1xX-0007rf-IP for submit@debbugs.gnu.org; Sat, 22 Jun 2024 10:43:20 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:44116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL1xV-0007rL-4C for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 10:43:18 -0400 Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-57d203d4682so3549026a12.0 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 07:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719067331; x=1719672131; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y6bG0PyOdQtUvPR3lEh8d1mv/gXrE6zFvXMyxQKpa70=; b=jKUSy2iuJ8zGpDjrutWo2HoRQu3gBoh0N0k8GkAYGqSFplf3alF4iciBlhPcBnECTO Dq3EVp7ZA6GUV/JICVSQaGCH+IEHVSGK2UM02BS/QKqJ0UH81R8yruiX5fI6Rd27tuEK /vOputgTgm1AEKYOqmV7yyoGj1d9k40gYcjzZU3YNQo5BBiAFrPk/Lui03Dh6qrICi5x uBmybLWNUHOD2CY3XPVBvCKnClYHpUFiqMjbV4WApLDFrPDjtRiiiRDama/OQrQiIrcB KXuy8dhmqp0qk1ULptjlL6V0ulDmQUM6qnm2cGfdWzpNgHn1/uJU1iTKVIcNjXx7V8SD /n+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719067331; x=1719672131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y6bG0PyOdQtUvPR3lEh8d1mv/gXrE6zFvXMyxQKpa70=; b=sUmLvKUSkjUXP/2V3zzrD7RceN527Fu+nsodkjXQOM+bo3SxUmYd0PvjOsAgwOjIJr RPx/XZ3LUFOVk3R8RXSvdw3czJXlEZpeQ0R891sKHBb1C/8Ox/6v8UlJcZfIQhVLsPd3 5sVt5p9QI+06K65X0+kyLRTztSb5hxcZHIIBLSMCuw751Ote5DRF7sK8GR5acypxWU1B bXykgUafTgsN+2hZO3OvF7/EnYc/vnWdxTCCZvAxX6L223myl4HyiDZ5NnL6gd9ChAax TUr920XA4Ingrb77OPo2e6nflBO5OSq8RZs3lrvq9fEjJg4HMCR078mL2YkSOP6uQkHf 49wg== X-Gm-Message-State: AOJu0Yy5XHUJaZO+OhoIJblCK4v19ZXR+0Gk4ikKVgr/NSpdvK/vI1CE RAxk29I7KNPhUqWUHVrfaZZMQf8SjDDLavvWa+hYl8Gv1aNX9TNuZrfq85jz9QQ= X-Google-Smtp-Source: AGHT+IG4J4xZVpV7+/3OMB8h7qgr9nrfZz9hIndt33Za+PPY5DoEaRBoINFLFlgalkO9hRyX9X9vVg== X-Received: by 2002:a50:aadc:0:b0:57d:5c0:9dc0 with SMTP id 4fb4d7f45d1cf-57d4580b023mr695992a12.38.1719067330847; Sat, 22 Jun 2024 07:42:10 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d30427f8fsm2447172a12.34.2024.06.22.07.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 07:42:10 -0700 (PDT) From: Vincenzo Pupillo X-Google-Original-From: Vincenzo Pupillo To: Yuan Fu , Eli Zaretskii Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 16:42:09 +0200 Message-ID: <4884041.OV4Wx5bFTl@fedora> In-Reply-To: <86wmmhidrw.fsf@gnu.org> References: <865xue1gtu.fsf@gnu.org> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> <86wmmhidrw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart26461351.1r3eYUQgxm" Content-Transfer-Encoding: 7Bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71518 Cc: 71518@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: -1.0 (-) This is a multi-part message in MIME format. --nextPart26461351.1r3eYUQgxm Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi Eli, fortunately, this time it was easier than usual! Ciao. Vincenzo In data sabato 22 giugno 2024 10:26:43 CEST, Eli Zaretskii ha scritto: > Ping! Any progress with this bug? >=20 > > From: Yuan Fu > > Date: Wed, 12 Jun 2024 23:51:21 -0700 > > Cc: 71518@debbugs.gnu.org, > >=20 > > Bug Report Emacs , > > Eli Zaretskii > > =20 > > > On Jun 12, 2024, at 6:53=E2=80=AFAM, Vincenzo Pupillo > > > wrote:> >=20 > > > In data mercoled=C3=AC 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha= =20 scritto: > > >> To reproduce in "emacs -Q", visit some C++ source file (I used > > >> breakpoint.c from the GDB sources), then turn on c++-ts-mode. The > > >> fontification is all incorrect, and *Messages* has these error > > >>=20 > > >> messages: > > >> Error during redisplay: (jit-lock-function 7286) signaled > > >> (treesit-query-error "Node type error at" 575 "[\"_Atomic\" \"break= \" > > >> \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" > > >> \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" > > >> \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" > > >> \"typedef\" \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" > > >> \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co_return\" > > >> \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" > > >> \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" > > >> \"friend\" \"mutable\" \"namespace\" \"new\" \"noexcept\" \"not\" > > >> \"not_eq\" \"operator\" \"or\" \"or_eq\" \"override\" \"private\" > > >> \"protected\" \"public\" \"requires\" \"template\" \"throw\" \"try\" > > >> \"typename\" \"using\" \"virtual\" \"xor\" \"xor_eq\"] > > >> @font-lock-keyword-face (auto) @font-lock-keyword-face (this) > > >> @font-lock-keyword-face" "Debug the query with > > >> `treesit-query-validate'")> >>=20 > > >> This happens with the latest C++ tree-sitter grammar library. I gue= ss > > >> they made some incompatible change in the grammar or something? > > >=20 > > > Yes, they changed the grammar. > > > https://github.com/tree-sitter/tree-sitter-cpp/issues/271 > > >=20 > > > V. > >=20 > > So it seems =E2=80=9Cvirtual=E2=80=9D is now a named node rather than a= n anonymous node, > > which is a little odd. I asked the author about it in the GitHub issue, > > let me clear that up before fixing c-ts-mode. > >=20 > > And, Eli, we really really should pin tree-sitter grammars. As more peo= ple > > start using tree-sitter modes, they will found out about the breakage > > before we do and the tree-sitter major mode would be unusable for them > > before they upgrade their grammar. Most of them will not know how to do > > it and which commit to downgrade to. And I really don=E2=80=99t want to= chase the > > random changes these grammars make all the time. Fixing for these > > breakages is arguably a heavier maintenance burden than pinning > > tree-sitter grammars. > >=20 > > Yuan --nextPart26461351.1r3eYUQgxm Content-Disposition: attachment; filename="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" >From 84c0c0c821b82d59874996cb7bb78e8205fa1377 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Sat, 22 Jun 2024 16:22:16 +0200 Subject: [PATCH] Fix for grammar change of keyword "virtual" in tree-sitter-cpp * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. --- lisp/progmodes/c-ts-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index f453392ff7f..7bfb84baecb 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -572,7 +572,7 @@ c-ts-mode--keywords "not" "not_eq" "operator" "or" "or_eq" "override" "private" "protected" "public" "requires" "template" "throw" - "try" "typename" "using" "virtual" + "try" "typename" "using" "xor" "xor_eq")) (append '("auto") c-keywords)))) @@ -632,7 +632,8 @@ c-ts-mode--font-lock-settings :language mode :feature 'keyword - `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face + `((virtual) @font-lock-keyword-face + [,@(c-ts-mode--keywords mode)] @font-lock-keyword-face ,@(when (eq mode 'cpp) '((auto) @font-lock-keyword-face (this) @font-lock-keyword-face))) -- 2.45.2 --nextPart26461351.1r3eYUQgxm-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 11:57:31 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 15:57:31 +0000 Received: from localhost ([127.0.0.1]:50664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL37L-0002Lu-9P for submit@debbugs.gnu.org; Sat, 22 Jun 2024 11:57:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL37J-0002Lc-1A for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 11:57:29 -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 1sL37D-0007BL-S6; Sat, 22 Jun 2024 11:57:23 -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=Y3llR/5d8v0o6t+M/WvNXdOwToLqTrD9W+/JaoNfTBI=; b=jDTLiP6wZTmH 4afcaLYlyyNBqMLcrUWVqe8juvXugyMYwuc2ir1AFeAShnaqIjSrqc0UY4LL3BoLsA4SKHC3zmsgV Pp6tmkVCukv5yyzSmezN791iMeeyhcKAxqkWpsNc0e+DvFkpWWntZ/HuMbJIT/h/LVxSFwqL4XGiO wuQ7xX+0i5pZ1esiVOhsCBvY8RecJd9Up3BZzK0FP4dcfK8fOO07EBHYHJpCJGPcfX8Qf9E00N3sl URiz5Ndn7O6owuzckogqz5VZ58X97FdUk9Z/AAF9jMx9AAISfNJC84QH7+U9bCmInz+i2xH9ki0vv r3AYUGIwFUHYc7fNxWhV3A==; Date: Sat, 22 Jun 2024 18:57:21 +0300 Message-Id: <86a5jdgece.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <4884041.OV4Wx5bFTl@fedora> (message from Vincenzo Pupillo on Sat, 22 Jun 2024 16:42:09 +0200) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> <86wmmhidrw.fsf@gnu.org> <4884041.OV4Wx5bFTl@fedora> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 > Cc: 71518@debbugs.gnu.org > Date: Sat, 22 Jun 2024 16:42:09 +0200 > > fortunately, this time it was easier than usual! Thanks, but this change will _require_ the new version of the grammar library, right? I think we usually fix these problems in a way that both the old and the new versions are supported, because people could have different versions installed. Could you please amend the fix along these lines? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 12:16:05 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 16:16:05 +0000 Received: from localhost ([127.0.0.1]:51308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL3PI-0002z9-GF for submit@debbugs.gnu.org; Sat, 22 Jun 2024 12:16:04 -0400 Received: from mail-ej1-f49.google.com ([209.85.218.49]:57446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL3PG-0002yc-F7 for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 12:16:03 -0400 Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a6fd4d1c173so190967966b.2 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 09:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719072897; x=1719677697; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IddkAt3+9l7E92wXU+eScgCkYGYKTk8F6xolwfkbRAQ=; b=l2my8wtLc+UQMn/ZSXdMWkKSdq+LhPWTb14hn9e4Q0dqFgJqtiphvvyghWNLbpYwHk yilAp5VAozw8Vv1ChOqXKqVArLINrRcB07+cYRmJ8J38D33xy2w1GXE6cxq7UsOE4Y6w C7QE0UaQIu79r/QidqHQR0qL0dKZQClzRk6pTQtg7C8Bo8r4yKn5K/Y5j6LtqiBaEVMb nC4ubX2EiPSpvs7PVojOf0CjoRI8HG72g7GjXpfk0BAVO9BNneVyAwUIF70RlQssc/XE fwCh00DYj8O5cluzW3u6b60bDDstCJaAb1Bv8lNOzcBwdIQCD3wN0zuZ4nVdcCPFUkgt 9Eew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719072897; x=1719677697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IddkAt3+9l7E92wXU+eScgCkYGYKTk8F6xolwfkbRAQ=; b=JJG1ZdesOP50eCzFDG2Ir2u0iTJNSTeHfJ5feB/bACVIFfjaSJf53LKE8VveS89mMk cmzI7OPKuPNNkBUCTyeGMXGkKNV+6Gy6KTOvz5bNJgNdvy2RTPXIJznFjIjfxED03d2x JpX9UG99yoJyVxgc5ZKU5UFcrwK9fnlSeMlKaNw4Vxx17xcdslgeQFe3GyT3hV9WC3pg DL+jMjZTh1phQiDSpmCNbXA74gzycrr4LJoymitugbN/zhzUlW4OIFLBGCayDHkVZyNx TvIvrm8+fszvg7GXSfwCLRi6tWJOzwXICVtP9iQHVcEcTTmCX3CUXhSDtegwfYiYtbPf FEdg== X-Forwarded-Encrypted: i=1; AJvYcCWs6FdlGj+Y204+xC0moD3ao06mSd0zeHv3Ntk3BNuEEhVRZSkMQxqbh2zNvWsY2VOG5X97xhdtsyj4lAogwIFenRdFZR0= X-Gm-Message-State: AOJu0YwsS3zPMz8ivvHHKAy4deeNLfzVxIBjNiN7PJOu9lMBVTwsBEqH Ysodc8hlrv+4N45MngGkucKLBMnuCG9HgQSp73YhQgHH/5CKGSwC X-Google-Smtp-Source: AGHT+IFVBMHaTCYYrDFDbMLw2SW+CHTMn0KsFSTQm1JjiXu8n2UZeqfHjGAHkn036ExE5d4BEjQByQ== X-Received: by 2002:a17:906:2650:b0:a72:40aa:3a8e with SMTP id a640c23a62f3a-a7245b85710mr11625766b.43.1719072896397; Sat, 22 Jun 2024 09:14:56 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf48a220sm212540966b.60.2024.06.22.09.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 09:14:56 -0700 (PDT) From: Vincenzo Pupillo To: Eli Zaretskii Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 18:14:54 +0200 Message-ID: <7030786.9J7NaK4W3v@fedora> In-Reply-To: <86a5jdgece.fsf@gnu.org> References: <865xue1gtu.fsf@gnu.org> <4884041.OV4Wx5bFTl@fedora> <86a5jdgece.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart9726438.eNJFYEL58v" Content-Transfer-Encoding: 7Bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 (-) This is a multi-part message in MIME format. --nextPart9726438.eNJFYEL58v Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" In data sabato 22 giugno 2024 17:57:21 CEST, Eli Zaretskii ha scritto: > > From: Vincenzo Pupillo > > Cc: 71518@debbugs.gnu.org > > Date: Sat, 22 Jun 2024 16:42:09 +0200 > > > > fortunately, this time it was easier than usual! > > Thanks, but this change will _require_ the new version of the grammar > library, right? I think we usually fix these problems in a way that > both the old and the new versions are supported, because people could > have different versions installed. In the tests I have done, it works with both the new and the old grammar. > > Could you please amend the fix along these lines? Okay, done. Can this be okay? Thanks. Vincenzo --nextPart9726438.eNJFYEL58v Content-Disposition: attachment; filename="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" >From 5f88ff0001e8c4edb7519d1a85ebb13390d1a285 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Sat, 22 Jun 2024 16:22:16 +0200 Subject: [PATCH] Fix for grammar change of keyword "virtual" in tree-sitter-cpp The new rule works with both the new (>= 0.22.1) and the old (<= 0.22.0) grammar. * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. (Bug#71518) --- lisp/progmodes/c-ts-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index f453392ff7f..7bfb84baecb 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -572,7 +572,7 @@ c-ts-mode--keywords "not" "not_eq" "operator" "or" "or_eq" "override" "private" "protected" "public" "requires" "template" "throw" - "try" "typename" "using" "virtual" + "try" "typename" "using" "xor" "xor_eq")) (append '("auto") c-keywords)))) @@ -632,7 +632,8 @@ c-ts-mode--font-lock-settings :language mode :feature 'keyword - `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face + `((virtual) @font-lock-keyword-face + [,@(c-ts-mode--keywords mode)] @font-lock-keyword-face ,@(when (eq mode 'cpp) '((auto) @font-lock-keyword-face (this) @font-lock-keyword-face))) -- 2.45.2 --nextPart9726438.eNJFYEL58v-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 12:56:53 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 16:56:54 +0000 Received: from localhost ([127.0.0.1]:52607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL42n-0004Km-JN for submit@debbugs.gnu.org; Sat, 22 Jun 2024 12:56:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL42l-0004KQ-DV for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 12:56:52 -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 1sL42f-00025M-3o; Sat, 22 Jun 2024 12:56:45 -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=VZPLSmmI3dP8WVwg9zQVGbvxRlE+HY9os2XFUZl3pbk=; b=rPQu+gqmLtO7 /k/nX0yO5AKDgDwXcJBAaw9xz1xSqSvojNpKiPWPyCbhI1okwzNv+LJ8TwLkspD85NVtcoIF6n27J I5+cPx7h61eyD31ktSqBdW1R0zEQ8rbH4oddNzxNX9u3gKrjvSaiLvl66VsdHOayXdJFMwsLKksWr Ux6N8N/34pEHnHQokZZI8alv8Z6tZCRCe2LKsfsdtRnw48AY5VYC/pUSrVo5hotX43u+AOgZHA/nW kLqsIRuD/j/yuoa2cEUHWWyMflkFdBC6pDfuOAIbu4L7Yx8KljW6LpexoSEA6YghXsTTCfZfbGrHN o2vsHPhX1K1Znwv6phaBxA==; Date: Sat, 22 Jun 2024 19:56:34 +0300 Message-Id: <861q4ohq65.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <7030786.9J7NaK4W3v@fedora> (message from Vincenzo Pupillo on Sat, 22 Jun 2024 18:14:54 +0200) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <4884041.OV4Wx5bFTl@fedora> <86a5jdgece.fsf@gnu.org> <7030786.9J7NaK4W3v@fedora> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 > Cc: casouri@gmail.com, 71518@debbugs.gnu.org > Date: Sat, 22 Jun 2024 18:14:54 +0200 > > > > fortunately, this time it was easier than usual! > > > > Thanks, but this change will _require_ the new version of the grammar > > library, right? I think we usually fix these problems in a way that > > both the old and the new versions are supported, because people could > > have different versions installed. > > In the tests I have done, it works with both the new and the old grammar. > > > > > Could you please amend the fix along these lines? > Okay, done. Can this be okay? Hmm... I still see an error message in *Messages* after installing this (I have grammar library version 0.22.2): Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 2 "(virtual) @font-lock-keyword-face [\"auto\" \"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\"] @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") Any ideas or suggestions? "virtual" is highlighted, though, so I guess this is a matter of suppressing the errors or something? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 13:03:52 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 17:03:52 +0000 Received: from localhost ([127.0.0.1]:52874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL49Y-0004gc-Fy for submit@debbugs.gnu.org; Sat, 22 Jun 2024 13:03:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL49X-0004gN-Lc for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 13:03:51 -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 1sL49S-0003ah-B9; Sat, 22 Jun 2024 13:03:46 -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=x1uc2yUcfHK1WOmwXjMgvjQ9ADGaFAM68ereYR2U6QY=; b=S8AMUKvLMqAk Zs3aJYckWpBorJg1Opgb879FzPm5PBlFMC14tShetm+4RkdbaPquJrO4EBCqB0Q10RdHUZg0QJkm0 +OvNaEs+J26qDmBKNT+KKKSIrzwlHSBDknJECg5vh9hsiU1tx/QEkrgL0jrKlzHsevzmpxP6rp6Nx bF24EFcC6+U4bchA0MKeLJoDHSdLU9+x4o0rRzUzxknjzw0evVYJKwGnIZFjG90na8k3ZwJT8150y 04xvm1cV35r+NX393c1TE92dbouyAbjtpLKajKMCT5XkNrVpDdBmqiv4xiXJDfwaAq62fQpf7Hjbz V8gi01boRP/TfF1W1WpWrg==; Date: Sat, 22 Jun 2024 20:03:43 +0300 Message-Id: <86zfrcgb9s.fsf@gnu.org> From: Eli Zaretskii To: v.pupillo@gmail.com In-Reply-To: <861q4ohq65.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Jun 2024 19:56:34 +0300) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <4884041.OV4Wx5bFTl@fedora> <86a5jdgece.fsf@gnu.org> <7030786.9J7NaK4W3v@fedora> <861q4ohq65.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 (---) > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > Date: Sat, 22 Jun 2024 19:56:34 +0300 > From: Eli Zaretskii > > Hmm... I still see an error message in *Messages* after installing > this (I have grammar library version 0.22.2): > > Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 2 "(virtual) @font-lock-keyword-face [\"auto\" \"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\"] @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") > > Any ideas or suggestions? "virtual" is highlighted, though, so I > guess this is a matter of suppressing the errors or something? E.g., you can see in go-ts-mode.el how the code probes whether a certain query is supported, and uses it only if it is. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 14:00:52 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 18:00:52 +0000 Received: from localhost ([127.0.0.1]:54796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL52h-0006gT-SZ for submit@debbugs.gnu.org; Sat, 22 Jun 2024 14:00:52 -0400 Received: from mail-ej1-f44.google.com ([209.85.218.44]:42352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL52g-0006g6-5c for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 14:00:50 -0400 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a7245453319so22476666b.1 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 11:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719079184; x=1719683984; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0wRHOzdOW/vRzi1l2PmR/A+Di1cf40ZPUdxg6OFbfTA=; b=k+xTw3kAlfdMtoZCP4FwQ7Xn505mEB2OjZLOvdY6LbQptGAMz7lc1kFf0xLvtxhbHh 1t0FtnqrbYLmYMAxOZOlk1ZjxzqcCHXMP9BSfI6QKKDm70e/ASDm7D23Dts/ywBFk6Ub X/cUSwgAYR3D8KL/ggtRTzeCQBU8FLA+oe1Dcl8ypzq3EoxVDIWkxzufYz+nYF3cXfsf 0m9pfDNLD9K6PEppVZCjKobKvwZ7MVP28cEJWRhBY9P5nRWIeSXlpKSlXcjtjknSsh8f G6d6UYYUHyPPIBFNslB8xiIV5zYYq9swjWMKSI2Z5MqNIwGL+Ih2JshgNCRU0If2wxy6 +Nrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719079184; x=1719683984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0wRHOzdOW/vRzi1l2PmR/A+Di1cf40ZPUdxg6OFbfTA=; b=JNFxA3eIuKwErvFQ8r7H51iD5beCB/GNBQQWu8ZDr7HYIxCYSmTLBKgJ+xgGPVcwTh YfBVuiGjH/tKMAFYLJOT5e2p9Qq38FEcBcI26S7rsERmc1DjKUclYjjAaQRW7Cx6d6cL r34EfmJeOcarVVi9t5e893ykRpEQ4wXdR/x2c2IXYm+CVf7uYxtC4J+RczIxzYnhw8+R Gu5DvYxvC4QI7JiwESHyUvgDuZUAakNx5IvCu3OG7+cCBncQljc2D8IKpGx6ghKHV6oK lqmcDjW4knEv8DRSJGCB8xuwtKFf3j7U7E6kxT3Yo9MvHmw65dcGH9NFvqke5ewMSxUh Licg== X-Gm-Message-State: AOJu0YzALViYBPOX7+NMy+LpQq2BEtkBdE4bu7O3QbbLaNMOUuLyfe9l tmneoUiuH9E2wrXLttBTUpTmGABACDayucIr2fDif7nBNeBwevzF X-Google-Smtp-Source: AGHT+IGGGNDlo24zKj3Ok3ajiB+jkHHfCMF+4OoP3Dao+Giz0YWjOBWvhZednRlK+YuK3OU5Pm5FIw== X-Received: by 2002:a17:907:1610:b0:a6e:f53c:8da0 with SMTP id a640c23a62f3a-a70275ea4e9mr156908066b.8.1719079184079; Sat, 22 Jun 2024 10:59:44 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7245c37d9esm16815966b.154.2024.06.22.10.59.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 10:59:43 -0700 (PDT) From: Vincenzo Pupillo To: Eli Zaretskii Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 19:59:42 +0200 Message-ID: <2832324.DJkKcVGEfx@fedora> In-Reply-To: <86zfrcgb9s.fsf@gnu.org> References: <865xue1gtu.fsf@gnu.org> <861q4ohq65.fsf@gnu.org> <86zfrcgb9s.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart19549152.fSG56mABFh" Content-Transfer-Encoding: 7Bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 (-) This is a multi-part message in MIME format. --nextPart19549152.fSG56mABFh Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" In data sabato 22 giugno 2024 19:03:43 CEST, Eli Zaretskii ha scritto: > > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > > Date: Sat, 22 Jun 2024 19:56:34 +0300 > > From: Eli Zaretskii > > > > Hmm... I still see an error message in *Messages* after installing > > > > this (I have grammar library version 0.22.2): > > Error during redisplay: (jit-lock-function 1) signaled > > (treesit-query-error "Node type error at" 2 "(virtual) > > @font-lock-keyword-face [\"auto\" \"_Atomic\" \"break\" \"case\" > > \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" > > \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" > > \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" > > \"volatile\" \"while\"] @font-lock-keyword-face" "Debug the query with > > `treesit-query-validate'")> > > Any ideas or suggestions? "virtual" is highlighted, though, so I > > guess this is a matter of suppressing the errors or something? > > E.g., you can see in go-ts-mode.el how the code probes whether a > certain query is supported, and uses it only if it is. Sorry, I only tested with .cpp files. The rule had to be protected by (when (eq mode 'cpp)... Now I have tested this with *.c and *.h as well, with old and new grammar. Thanks Vincenzo --nextPart19549152.fSG56mABFh Content-Disposition: attachment; filename="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" >From f518a28117c0418dc11bc4d9312df6609272813b Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Sat, 22 Jun 2024 16:22:16 +0200 Subject: [PATCH] Fix for grammar change of keyword "virtual" in tree-sitter-cpp The new rule works with both the new (>= 0.22.1) and the old (<= 0.22.0) grammar. * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. (Bug#71518) --- lisp/progmodes/c-ts-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index f453392ff7f..e7f74fc53f2 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -572,7 +572,7 @@ c-ts-mode--keywords "not" "not_eq" "operator" "or" "or_eq" "override" "private" "protected" "public" "requires" "template" "throw" - "try" "typename" "using" "virtual" + "try" "typename" "using" "xor" "xor_eq")) (append '("auto") c-keywords)))) @@ -635,7 +635,8 @@ c-ts-mode--font-lock-settings `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face ,@(when (eq mode 'cpp) '((auto) @font-lock-keyword-face - (this) @font-lock-keyword-face))) + (this) @font-lock-keyword-face + (virtual) @font-lock-keyword-face))) :language mode :feature 'operator -- 2.45.2 --nextPart19549152.fSG56mABFh-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 14:15:14 2024 Received: (at 71518-done) by debbugs.gnu.org; 22 Jun 2024 18:15:14 +0000 Received: from localhost ([127.0.0.1]:55312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5Gc-0007B3-3V for submit@debbugs.gnu.org; Sat, 22 Jun 2024 14:15:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5Ga-0007Ao-L6 for 71518-done@debbugs.gnu.org; Sat, 22 Jun 2024 14:15:13 -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 1sL5GV-0001NG-6r; Sat, 22 Jun 2024 14:15:07 -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=ubfFom5lbwcHz4zXZhBzWjPNdCcrqYMUM+xl8WLn/48=; b=d6NEOZgXgiNR r6RHtI/D5CeKPs3VLcW3Wrpm6tmZvmghJs8fnv/QXzZfnrcW6It/i4JaMvsak+vXsQq3LNnoGXBHL 6sP7cV6dDoHsduHEvsfJUChtP33I7sU4BWEpWAxqKBbtqvJSPBbqWFhY0ZP0xAiATtsvcBnKCX1eT p4hO0FZZbFMrFAVoeG9CxsIQxRZUOhAIEyzunXEIv6jLlNRQ8hcaT59/79YojQ6DFnydHK+fA8JW6 X5Bve19oYsShYYZGOvV73EcPNLWn+PFr8LDskcrhQcg70FyFY9PZH3h1/jzcVEq5YkvEnsd6UJR/S L/3FJfEfSZ/ikOIs55aUkA==; Date: Sat, 22 Jun 2024 21:15:04 +0300 Message-Id: <86y16wg7yv.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <2832324.DJkKcVGEfx@fedora> (message from Vincenzo Pupillo on Sat, 22 Jun 2024 19:59:42 +0200) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <861q4ohq65.fsf@gnu.org> <86zfrcgb9s.fsf@gnu.org> <2832324.DJkKcVGEfx@fedora> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518-done Cc: casouri@gmail.com, 71518-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: Vincenzo Pupillo > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > Date: Sat, 22 Jun 2024 19:59:42 +0200 > > In data sabato 22 giugno 2024 19:03:43 CEST, Eli Zaretskii ha scritto: > > > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > > > Date: Sat, 22 Jun 2024 19:56:34 +0300 > > > From: Eli Zaretskii > > > > > > Hmm... I still see an error message in *Messages* after installing > > > > > > this (I have grammar library version 0.22.2): > > > Error during redisplay: (jit-lock-function 1) signaled > > > (treesit-query-error "Node type error at" 2 "(virtual) > > > @font-lock-keyword-face [\"auto\" \"_Atomic\" \"break\" \"case\" > > > \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" > > > \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" > > > \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" > > > \"volatile\" \"while\"] @font-lock-keyword-face" "Debug the query with > > > `treesit-query-validate'")> > > > Any ideas or suggestions? "virtual" is highlighted, though, so I > > > guess this is a matter of suppressing the errors or something? > > > > E.g., you can see in go-ts-mode.el how the code probes whether a > > certain query is supported, and uses it only if it is. > Sorry, I only tested with .cpp files. > The rule had to be protected by (when (eq mode 'cpp)... > > Now I have tested this with *.c and *.h as well, with old and new grammar. Thanks, installed on master, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 14:16:49 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 18:16:49 +0000 Received: from localhost ([127.0.0.1]:55352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5I8-0007EV-Mj for submit@debbugs.gnu.org; Sat, 22 Jun 2024 14:16:49 -0400 Received: from mail-ej1-f41.google.com ([209.85.218.41]:47462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5I6-0007ED-6w for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 14:16:47 -0400 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a6f21ff4e6dso402674166b.3 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 11:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719080140; x=1719684940; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J9mVeaW9KzQUV2bNkK6iHmrTqxGqz0161T2tKwexAc4=; b=XYN6cJM4CU0Z4H87uVbJZMVhvr7wS16iaWHBslj+2EoNFITwR4rUI7Au/KuzDX/F4d FK7ZCM2uST0EYH7KrcSLjIV+HKfh0HjbUq+oDv/K3oF4zMN55JQha+Qt6YUPGHQzJXp5 EojB/zcbPWxVDNTba7W7AhBD2ZxaHPfVFHbihcww2Imyw6XoT1QQVWOXzfD6YjXoJhfO 1o6X0+WTCQOsfnmxJPbnGqVNOsryVmsFqwR3XboSNyZ203Q7NFnuSxJ2um9Os05Au6am ZVb0R1Z1UvDva8eNyArDAClnnS1DKGfY7USFOFojO0q2eWGM8TJh3n33emYOfq3+hKP0 loQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719080140; x=1719684940; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J9mVeaW9KzQUV2bNkK6iHmrTqxGqz0161T2tKwexAc4=; b=Hfmka7B2kH+mP8TCdEPfJaoF7sNdFmkuqQs6v3vnOBri64ecTpQhU7qJm298zFvgZu Bdv8Oe9KT1u/05WEjWu6Xn6+c+590aLI3BAFjhMV9zfnhQ8WITrZxVMga0pahQAh/0z4 yBV7Z3mbqqKiEeiQ1w8dhRwpb+uHz8GPZG1ZVUeCOsJMP1vYOIgiZtXWgCTEfz0k9+U/ sK0ItvKsx+IqNFgyN2hN7ZbvRDwkibHvqueT4uB8P2d/KEtIpJg6BZGqAPit838eSYIq azPiPb77ZoPPTWxqjKn7JThePVftXQ9EElb+qbbF0GC/Z31F7jQf2n39VioybzE4R7/E CUIA== X-Gm-Message-State: AOJu0YwEtLLbTnrZAv6lB3L6AOh5pBJSFUT+1CDHP35+3O84t/wZENWZ tApiWv0V3Mz7T3nfFPfmSxVtFzlXZemYrR/vX8URZ44XP0YwrJHP X-Google-Smtp-Source: AGHT+IFJlkxsIrgHd/p9O2dFvDlDwBlyhVEMhXEGYDMm9P9sv+7tmD95Tj722ne5HzjjFxiHAuEfDw== X-Received: by 2002:a17:907:c24a:b0:a6f:b34c:76f3 with SMTP id a640c23a62f3a-a7242da69acmr64263966b.55.1719080140072; Sat, 22 Jun 2024 11:15:40 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf56c14fsm219827766b.188.2024.06.22.11.15.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 11:15:39 -0700 (PDT) From: Vincenzo Pupillo To: Eli Zaretskii Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 20:15:39 +0200 Message-ID: <2179250.yiUUSuA9gR@fedora> In-Reply-To: <2832324.DJkKcVGEfx@fedora> References: <865xue1gtu.fsf@gnu.org> <86zfrcgb9s.fsf@gnu.org> <2832324.DJkKcVGEfx@fedora> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 (-) In data sabato 22 giugno 2024 19:59:42 CEST, Vincenzo Pupillo ha scritto: > In data sabato 22 giugno 2024 19:03:43 CEST, Eli Zaretskii ha scritto: > > > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > > > Date: Sat, 22 Jun 2024 19:56:34 +0300 > > > From: Eli Zaretskii > > > > > > Hmm... I still see an error message in *Messages* after installing > > > > > > this (I have grammar library version 0.22.2): > > > Error during redisplay: (jit-lock-function 1) signaled > > > (treesit-query-error "Node type error at" 2 "(virtual) > > > @font-lock-keyword-face [\"auto\" \"_Atomic\" \"break\" \"case\" > > > \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" > > > \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" > > > \"return\" > > > \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" > > > \"volatile\" \"while\"] @font-lock-keyword-face" "Debug the query with > > > `treesit-query-validate'")> > > > > > > Any ideas or suggestions? "virtual" is highlighted, though, so I > > > guess this is a matter of suppressing the errors or something? > > > > E.g., you can see in go-ts-mode.el how the code probes whether a > > certain query is supported, and uses it only if it is. > > Sorry, I only tested with .cpp files. > The rule had to be protected by (when (eq mode 'cpp)... > > Now I have tested this with *.c and *.h as well, with old and new grammar. > > Thanks > Vincenzo I forgot to add that I have another patch that tests the grammar, but it doesn't seem to help in this case. With both the old and the new grammar, the node is identified as (virtual "virtual"). Vincenzo From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 14:19:09 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 18:19:09 +0000 Received: from localhost ([127.0.0.1]:55418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5KP-0007Jc-Ba for submit@debbugs.gnu.org; Sat, 22 Jun 2024 14:19:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL5KO-0007JN-2P for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 14:19:08 -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 1sL5KI-0002PO-MP; Sat, 22 Jun 2024 14:19:02 -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=vNjDKd0pggZFVEGmBMP+K+xOcxfhi4+SvXqTa/T7DvQ=; b=LDikUN5ePWhv noLOVjSLjUW+4tprUGbV1Veyv1NfVKkJRrmg3YyQ53hz7BwplUmRhdBRh/2WTTmnPq9GC/zaOWgJF PYztajk3tP82plOPOn0AnM3HT62D+MMOa7cRPUp6OVNT+/VjCx5rO68D9gUFdE+PLDUKVeLKr6usf elSoH+g/w9ywC1R2OsNaJw1ItvudrjUYqMdYDSlm12Q8iMrJQMHgogWB0Pzz3NHDYuQmokFdBUg0Y KWbHct8CwW+IUeIzRx9KMH+ZAg7wWtIsWGSjpMZAdTwHh6e/Uuby1XxJKzoNAlRCflHGkv/5YfjJu 205xyiP23P19B+BHn+VxCQ==; Date: Sat, 22 Jun 2024 21:19:00 +0300 Message-Id: <86v820g7sb.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <2179250.yiUUSuA9gR@fedora> (message from Vincenzo Pupillo on Sat, 22 Jun 2024 20:15:39 +0200) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode References: <865xue1gtu.fsf@gnu.org> <86zfrcgb9s.fsf@gnu.org> <2832324.DJkKcVGEfx@fedora> <2179250.yiUUSuA9gR@fedora> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, casouri@gmail.com 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 > Cc: 71518@debbugs.gnu.org, casouri@gmail.com > Date: Sat, 22 Jun 2024 20:15:39 +0200 > > I forgot to add that I have another patch that tests the grammar, but it > doesn't seem to help in this case. With both the old and the new grammar, the > node is identified as (virtual "virtual"). OK, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 19:19:59 2024 Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 23:19:59 +0000 Received: from localhost ([127.0.0.1]:35636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLA1W-0008Q1-Mz for submit@debbugs.gnu.org; Sat, 22 Jun 2024 19:19:58 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:49213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLA1V-0008Pg-4D for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 19:19:57 -0400 Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-6c4926bf9baso2589778a12.2 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 16:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719098331; x=1719703131; 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=mf3HC/Xwyky6oWKRsKYj9Ty6LrJ1kXYCJ0D8pAovahs=; b=M9bm1TRe2ZWHJ0thcwawAfl5fAGr+ugf0nSdbHqlBRAw6TH6InXs7UeaeS6hX8cd7B Z36HH5ooY6YpcpH20gfBRcEf0wjaX5LgC7AI0iOQhYBIQqU+77bczC1qX+tZJSumkwI0 9dBTYiu3MV1lbFvYOqy25CIwm7eIx2yRM/I+Rz61He8Fs1XBMM6HWhLWCNrgwktaKWXG Qd20bGB4iP3Nt0eNY8ke/0V2g1BdTIL4HdQAuaHTZ2ZdDZfr/xA3oAKHWGBzKhcjeoXV lXyQQPDUv0RaKslIglx9uSNR+XiuYLmvwvPjZea0e/qn26bVfIxcl3IaiYZVtbrGXcr6 Rgjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719098331; x=1719703131; 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=mf3HC/Xwyky6oWKRsKYj9Ty6LrJ1kXYCJ0D8pAovahs=; b=NOGDD5uTteNYUislA/Nt71H4ZyHhh7cRHnQaItFBAUl4uV5L4QrYmK5+x2O5M8MW4c MsMByIFv0v1XyQ8BdriQTlj+LBGBOBuFHWEwiUQI3532JvJDwfKTbC78vATcQY16ves1 7LoosVfc/8ZsZX2S2+ZfcP7cbrgMSfsrydDG36CUQVe+FsSjy3MfXm1uE9KOqWdD81dm 3/oHJX7iWqz8kHqMwueAcojRmsGWiKFZQLLReBKygiN3EuudsGXXcgFXuhn4devFJkGv 7Qm1h3kJkp61Z0lw4FcP6hR8eJaWhiurwjSpJMjRMRozaK+vO1XTOtfZAIiD1jepxldA XcLw== X-Forwarded-Encrypted: i=1; AJvYcCXenUUGEnmgTQWyJgN0HvJaWkX0PIGUJwY/fSZjZqYf6glVPDFjSmjYepvqyz70yL+//ymufuRm3jm9mVOAhfDds4ZsBi0= X-Gm-Message-State: AOJu0YxlGQWgc8oPXQIKuu/uU6+hpgOFU2uKYczrBVcywU8o2LotU411 u6BAdiGGJk1NUBAhtrS26/NYum9PSUwkuZ/rsfTqB5T887Qk9Btdvj08mQ== X-Google-Smtp-Source: AGHT+IGbsUTxnnlamKrZunNZN3plQWrs4yJvDCvKHxOFS5u95p7ZXmBIwN6CtDaIrzUdpEZr3G1hoQ== X-Received: by 2002:a17:902:d4cd:b0:1fa:18c3:2788 with SMTP id d9443c01a7336-1fa1d51c210mr17146005ad.24.1719098331169; Sat, 22 Jun 2024 16:18:51 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:20fa:247c:4f0e:e2a2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c7e64a1d9esm5930941a91.56.2024.06.22.16.18.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2024 16:18:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode From: Yuan Fu In-Reply-To: <86v820g7sb.fsf@gnu.org> Date: Sat, 22 Jun 2024 16:18:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <87F292ED-DE07-4437-A26E-F57402A665F4@gmail.com> References: <865xue1gtu.fsf@gnu.org> <86zfrcgb9s.fsf@gnu.org> <2832324.DJkKcVGEfx@fedora> <2179250.yiUUSuA9gR@fedora> <86v820g7sb.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71518 Cc: 71518@debbugs.gnu.org, Vincenzo Pupillo 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 Jun 22, 2024, at 11:19=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Vincenzo Pupillo >> Cc: 71518@debbugs.gnu.org, casouri@gmail.com >> Date: Sat, 22 Jun 2024 20:15:39 +0200 >>=20 >> I forgot to add that I have another patch that tests the grammar, but = it=20 >> doesn't seem to help in this case. With both the old and the new = grammar, the=20 >> node is identified as (virtual "virtual"). >=20 > OK, thanks. Thanks to you both, I was a bit busy this week =F0=9F=98=AC Yuan= From unknown Wed Jun 18 23:15:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 21 Jul 2024 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator