From unknown Sun Jun 22 00:05:29 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#64830 <64830@debbugs.gnu.org> To: bug#64830 <64830@debbugs.gnu.org> Subject: Status: 29.1; C++ treesitter mode no coloration Reply-To: bug#64830 <64830@debbugs.gnu.org> Date: Sun, 22 Jun 2025 07:05:29 +0000 retitle 64830 29.1; C++ treesitter mode no coloration reassign 64830 emacs submitter 64830 David Come severity 64830 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 24 06:33:37 2023 Received: (at submit) by debbugs.gnu.org; 24 Jul 2023 10:33:37 +0000 Received: from localhost ([127.0.0.1]:41857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNssg-0003mH-Cm for submit@debbugs.gnu.org; Mon, 24 Jul 2023 06:33:37 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNriO-0001im-5G for submit@debbugs.gnu.org; Mon, 24 Jul 2023 05:18:55 -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 1qNriI-0004tX-EM for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 05:18:46 -0400 Received: from mail-mw2nam12on20600.outbound.protection.outlook.com ([2a01:111:f400:fe5a::600] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNriD-0007Py-Ig for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 05:18:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YBV9RZWMggTKo57bG2bmp7pID5b68XqFrLDN6kWT1zjmdO3Y4z5/tCgBQL5+eVbOIqzXLjCMDq0ZF7C+bwQ/s+2EGPcQ0O63j2Ojc5BQ6uZykqNC9i66Lj+L8xOTj7M2EMPWAJbqmweqB5v/LYqx9rW8/t2NkI2qv3Md3JvAjGQoLccG5j/mo8rqLI7aSL6nhq9kXLwAmQV873OGUqYoucYS98Vl+EghJ2s1E8KR+tqNoYzIbr28Q/rU2nxxR0LP8q1eDdcf/yv8tB/GSc2m2eS+1II8NH4w7i5ipdSWXmVjuKRP60vjrqhSBCPu16li2Ni8pJh8xy68i38o27xVhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SW8qtTanqb6FXylS94UfS/dRymKpa/H2MX5VBzXXM7s=; b=OjnaC2NJhzA7gv+y8Z5xzgDixiVJQ0UmFg9UFmp996R88GiTNTGSNC07JUyBJjHwIfgpqy6sOpfKC8L/d/cyOqA+vghJEmPBGMPJux1UGPPcMQOSIXTUvjFjGRnEMs7QxBR2lWFKhM+BfhizPc0sIY9LfyHf5fIh4cPFL5UHipKWyL8pk0Tssg7xN6QwcFhMfl8z7gzlOrBWkqWQBc7JBGTdr98emCSKlMWAAcDATA+ION2auXlovWM/BdRdMTKsCgsf8H9UqyzEzGhOzpPmW88wa3WFP1ZKLmkFrF8pDbiggXwU1fgnUodeW7i6djWcU5y8Y5YdFOjcgmqU7+5x/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ageagle.com; dmarc=pass action=none header.from=ageagle.com; dkim=pass header.d=ageagle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ageagle.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SW8qtTanqb6FXylS94UfS/dRymKpa/H2MX5VBzXXM7s=; b=wIfG4GxThmSnNk+1E0eIE9hRti0gQ6g7spgZ5H5Rcl6EbE5wCcAywUwTkqh9ialiSmdQFG4qW0/cthpsqEpvJHU90wDL8LTRgwun4uZIC9YX9HRFB7anwcnWWbFBWexLqCHX2/gXfY7ST9ZrgXpu7+ZjYhIRJQgQ6yMJY5xLh9+4aPP7a1edNl1g3/mr+mpLRfHbKSOU1XrMejUmvmkHNYkygME+9f9Tv7tsGnLMOsKFHj7NzG7yg7qHhZTZ+9XWM/rEpwN9Au0C3ZDEww/Yf6C8ku5B2fbfyS1PnIlBoD8CniqCNlVbsEPqRPHYXYvTCA7UnWTjkXzZD8mbQ2J//A== Received: from DS0PR20MB5785.namprd20.prod.outlook.com (2603:10b6:8:142::16) by CH0PR20MB4137.namprd20.prod.outlook.com (2603:10b6:610:d8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Mon, 24 Jul 2023 09:13:33 +0000 Received: from DS0PR20MB5785.namprd20.prod.outlook.com ([fe80::5cb5:815b:d499:96a3]) by DS0PR20MB5785.namprd20.prod.outlook.com ([fe80::5cb5:815b:d499:96a3%7]) with mapi id 15.20.6588.031; Mon, 24 Jul 2023 09:13:33 +0000 From: David Come To: "bug-gnu-emacs@gnu.org" Subject: 29.1; C++ treesitter mode no coloration Thread-Topic: 29.1; C++ treesitter mode no coloration Thread-Index: AQHZvg8dcH0GQaVWdEyHC8b+t5T2Qg== Date: Mon, 24 Jul 2023 09:13:33 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ageagle.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR20MB5785:EE_|CH0PR20MB4137:EE_ x-ms-office365-filtering-correlation-id: d7307d7d-a693-48ef-8675-08db8c264101 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8Qk5hnwIsoNgGdkeRrEE8R93weCXv22dv87UhtcDxom3NRbeZlmoeX9nKUya5EUzWKBAGx59a3ZSfd/v3DXMMMOEU8wvMYSSKVaVH4RHnyiPV1/6Cek3rfsuz+lpqmAIscCDtnZRrR+Cd4/wNoDjGD420vk2Zh4WPAuQzjf+aXN5t1MQ0ZOdQS4Xu4rSwu0v6/1keA2aRa5EtVPnej4wN0ny3Y+s39DDrrHu4WijmIXaNuFOjbfWHw9gSawD2hT2no55Scr5mNvuoZ3elG6chEzQReng/vRpkiyqWUQyo5ZguF9SIu18wRlWbpOHVmk8pDnUvzVJwqr7nCxSc2oCVblLqZSp6TwgEecqAwxtpNyUUqW4ytYrPqXFZRopHZ+IBIt4MQbr0a+Xm87kbSbrIyPIHfpWuIrarMTPFKWayjVu67stR8jmF9Vb50bdsegqxzQQ9nDn9+r17+yYQqWfVcCgZluAtwK/fQ/n0aORvDNMQvnXEDx3pTyWSeiJoD8SeATSb2II5P+9xPrDtxR/bMtnKnIG2j8ETzkZmkUGb2AbOMrKMAyHS+NZkRJqUNO92ZMs1CWdk1rFkcf8lstYNyWgamfyOelbQSA8/wNQ8A4w3roDdesWdljIB+1ScszaeNwtwIFelDElZAOj1nn5PA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR20MB5785.namprd20.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(366004)(136003)(39840400004)(376002)(451199021)(83380400001)(30864003)(2906002)(43170500006)(66899021)(41300700001)(44832011)(52536014)(5660300002)(55016003)(6506007)(8936002)(8676002)(186003)(71200400001)(122000001)(91956017)(66556008)(66946007)(66476007)(66446008)(76116006)(86362001)(7696005)(478600001)(38100700002)(38070700005)(19627405001)(9686003)(316002)(64756008)(6916009)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?5ERBtYT+rsXkAAECQSXizlGf8gj1dy1SmaWgDEOTV+H5N9GVaZA555NSxB?= =?iso-8859-1?Q?4qab3g8mP3p669wAW/Dpd3NgD2GkH2gG6vnMuCB6X5Nfl2pXEbxNyiD2/j?= =?iso-8859-1?Q?LyzSCzgnHbx3M0OiJekcUd4v743adaKSQCoW1tLIuvfDd3DkSfsMLwcz8S?= =?iso-8859-1?Q?OVGdAi0GsE0QeSI1svhvFtLSEy2YIcvSy27fbgKuI/qOsDBFAW1gktfuGt?= =?iso-8859-1?Q?V/UIWO19Z8wtqm+loHSPSPiB62TVVMEsMjH4GtRZLC3PzjAZeHjsy0CGRd?= =?iso-8859-1?Q?L6Aag9oU6BOHWIzwKAqEK0gOBdtQzJYdSjuti7JMKnKW7g7jGlrd2FzzyG?= =?iso-8859-1?Q?gTsK2YYjZP8H/yxcQ91xRJYp8vTW+gWBVjqKyOmPLvY/ANVFv9/xWxNgV9?= =?iso-8859-1?Q?VJWRLJQfbUVkJauwMh7HPJHTMRRVLxaZ0Xz4Hknhr6NhPFVvfoIi9pWWZy?= =?iso-8859-1?Q?N53+/lHTEWoOCGTd66pt9uDVPqJ2WpcHRfV8wLb8G4vNV9MNfCmsmxdORU?= =?iso-8859-1?Q?YzMY3Uqgrm5lfQMfGLNTmHJ+g0ZnSNZ6HBu7Ct6tU6XIuSXJfGYXHFAz1l?= =?iso-8859-1?Q?jan2rgfQ6a+yRi34Psd1Zaz15nWNFUG3Pvijz3khURS31eFQFVhEPkXpAE?= =?iso-8859-1?Q?MwUNPHG2jqKHPbDHFO/8OYYx8LaYv9faZVnsk5uhCnHXBHw2J/x+VAEenf?= =?iso-8859-1?Q?5vEC2vNZ3bVbean1xoIpYkGSq5hhcoHCCEBExUvYJqHKpviMhGEICbaiZj?= =?iso-8859-1?Q?wcHDr5MxYvC4fQzxhfx6+sn1id9OGSRrrY83LP4ZFm2wbVtepJTqldIiCd?= =?iso-8859-1?Q?AM7YrFYzc/T0v6WW/Qose+4/BbFYe/oRQM4tAhdznc7fIWrfWY5/TQXa67?= =?iso-8859-1?Q?ql6FjjDG2bPRAFVbTLXDHqwjtyXdltiFT98+7WCtRjgtj77fxN7xfnsGy1?= =?iso-8859-1?Q?3+HB3CcrsBsGp89WdFBNiKf5nlodh9oAV+yUswMG6KoF4+5m43VDCEb+I8?= =?iso-8859-1?Q?w8sPO7zfvGBeCfyYqUUe8omZmNbzxFlk6oqJ8QAqtKLZveT+2THpMR0qhI?= =?iso-8859-1?Q?f+AbOx3fwzEZpIVGoF1rupJZcKhB8YEdBooghlbq+9316vk4SEVngWoFkM?= =?iso-8859-1?Q?pW8ZA/6xYeXYBNWaIpEbWh6zCrMCh6PobIXHn3w3PPK0Zol5NN656EotH0?= =?iso-8859-1?Q?AVr1S+G4zyAtyCxZj18BaGZW3nlkfQAFFXNxynUnlT+FLKfXuhwsUjIPca?= =?iso-8859-1?Q?hJF5A7r8/mXTd1CUu1IJ4g9wl7w+FIZyKOFUAwA8PrpeHlZxv+ncRBA8ge?= =?iso-8859-1?Q?8Gu3/skhG5GbN0HcPcM8EahbrVjIm1zpLjZcKp5l8l94TdebwiMSnsgNYN?= =?iso-8859-1?Q?J/W/9M0XWZYdDg2KKskj/hb/2jPzzhvSxDl6aIQ9JcCSitSnAXQj5AUYOv?= =?iso-8859-1?Q?pQmYPNRym+J66Mm+4NOwgdZkVEv0edr8k7JS9blHGgcze8S4MBSbfbRe3Y?= =?iso-8859-1?Q?Fajbat2QZC0BffeVYmOapW61JmJjpnzHaKY+dzy6QYgM56CdQPBLZoWADn?= =?iso-8859-1?Q?hNP/PW2x+huMLby9K7MgyVALk1nTkseBspPCu3TMFOaElR9ExmYLku91lW?= =?iso-8859-1?Q?99KvxSJP+tFJi1KoVTCncjL8Oj+j1Jc4k9i5MmH4O1JDI6NjxSGG6NM1Md?= =?iso-8859-1?Q?YDNMTsrolhJWIEa2DB+S0tzwcvLCZzauTa4p10eO?= Content-Type: multipart/alternative; boundary="_000_DS0PR20MB57854423F4B2361223303F4D8D02ADS0PR20MB5785namp_" MIME-Version: 1.0 X-OriginatorOrg: ageagle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR20MB5785.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7307d7d-a693-48ef-8675-08db8c264101 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2023 09:13:33.0202 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5a7e24a3-8245-443f-8ffa-92c076de8536 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EJ52d06nufr+orQ5swtDbx6BzQPf5EriBwTp4keBF5r27ESM6vyVCq8OW8GeDjd58bZqmHKwv2sYtOSu7h5pwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR20MB4137 Received-SPF: pass client-ip=2a01:111:f400:fe5a::600; envelope-from=david.come@ageagle.com; helo=NAM12-MW2-obe.outbound.protection.outlook.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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-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-Mailman-Approved-At: Mon, 24 Jul 2023 06:33:31 -0400 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 (/) --_000_DS0PR20MB57854423F4B2361223303F4D8D02ADS0PR20MB5785namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable When opening a C++ file with major mode c++-ts-mode, there is not coloration In the Messsage buffer, I see Error during redisplay: (jit-lock-function 14) signaled (treesit-query-erro= r "Node type error at" 99 "(true) @font-lock-constant-face (false) @font-lo= ck-constant-face (null) @font-lock-constant-face (nullptr) @font-lock-const= ant-face" "Debug the query with `treesit-query-validate'") [2 times] In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-07-24 built on ubuntu Repository revision: 31cef9a4eac01fff5ff4fcb89d7e2b7815e93bad Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Ubuntu 20.04.6 LTS Configured using: 'configure --prefix /usr/local --with-native-compilation --without-pgtk --with-json --with-gnutls --with-rsvg --without-xwidgets --with-toolkit-scroll-bars --without-xaw3d --without-mailutils --without-pop --with-tree-sitter 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dnative -fomit-frame-pointer'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Magit Minor modes in effect: global-company-mode: t company-mode: t which-key-mode: t counsel-projectile-mode: t global-treesit-auto-mode: t recentf-mode: t winner-mode: t treemacs-icons-dired-mode: t dap-tooltip-mode: t dap-ui-many-windows-mode: t dap-ui-mode: t lsp-treemacs-sync-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t dap-auto-configure-mode: t dap-mode: t bury-successful-compilation: t yas-global-mode: t yas-minor-mode: t all-the-icons-ivy-rich-mode: t ivy-rich-mode: t projectile-mode: t counsel-mode: t ivy-mode: t gcmh-mode: t global-whitespace-cleanup-mode: t engine-mode: t unkillable-scratch: t dimmer-mode: t windmove-mode: t global-undo-tree-mode: t undo-tree-mode: t global-git-commit-mode: t magit-auto-revert-mode: t global-auto-revert-mode: t shell-dirtrack-mode: t server-mode: t volatile-highlights-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t column-number-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: /home/dcome/.emacs.d/elpa/transient-20230723.1411/transient hides /home/dco= me/source/emacs-29-rc1/lisp/transient Features: (shadow sort mail-extr emacsbug magit-extras display-line-numbers make-mode tramp tramp-loaddefs trampver tramp-integration tramp-compat mule-util treemacs-bookmarks treemacs-tags magit-bookmark bookmark lsp-diagnostics company-cmake company-keywords company-dabbrev-code company-dabbrev company-files company-yasnippet company-capf company lsp-headerline lsp-icons lsp-modeline astyle reformatter lsp-ui lsp-ui-flycheck lsp-ui-doc lsp-ui-imenu lsp-ui-peek lsp-ui-sideline flycheck lsp-ui-util which-key view lsp-zig lsp-tilt lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-ruby-lsp lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet lsp-solargraph lsp-semgrep lsp-rust lsp-rf lsp-ruff-lsp lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-glsl lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp lsp-crystal lsp-credo lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-astro lsp-awk lsp-ansible lsp-angular lsp-ada lsp-actionscript c-ts-mode hideshow counsel-projectile oc-basic ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader range ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi org-link-doi org-agenda time emacsql emacsql-compiler ghub-graphql treepy gsexp ghub url-http url-gw url-auth let-alist gnutls treesit-auto tree-sitter-langs tree-sitter-langs-build tar-mode arc-mode archive-mode tree-sitter-hl tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get dired-aux tsc-obsolete register-list dockerfile-mode sh-script smie executable groovy-mode dts-mode afternoon-theme py-autopep8 lsp-haskell haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-complete-module haskell-ghc-support flymake-proc flymake dabbrev haskell-customize dashboard dashboard-widgets recentf ob-shell ob-org org-bullets the-org-mode-expansions org-element org-persist org-id org-refile avl-tree org org-macro org-pcomplete org-list org-footnote org-faces org-entities ob-emacs-lisp org-table org-loaddefs cal-menu calendar cal-loaddefs winner move-text helpful cc-langs trace edebug debug backtrace info-look find-func elisp-refs ivy-avy link-hint ffap goto-addr ibuffer-vc treemacs-magit treemacs-icons-dired treemacs-projectile dap-mouse dap-ui lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-interface treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture hl-line treemacs-logging treemacs-customization treemacs-macros gdb-mi bindat gud bui bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils lsp-lens dap-python dap-mode dap-tasks dap-launch lsp-docker yaml posframe dap-overlays lsp-mode lsp-protocol tree-widget network-stream nsm inline ht f f-shortdoc ivy-xref cmake-font-lock cmake-mode rst bury-successful-compilation qml-mode flyspell ispell ivy-yasnippet auto-yasnippet haskell-snippets yasnippet-snippets yasnippet all-the-icons-ivy-rich all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons ivy-rich projectile ido counsel-fd counsel-test counsel-test-pytest counsel-test-ctest counsel-test-core counsel xdg swiper ivy delsel ivy-faces ivy-overlay colir async mermaid-mode protobuf-mode rotate d2-mode ob ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core org-cycle org-fold org-fold-core ob-eval org-keys oc org-compat org-version org-macs major-mode-hydra kill-or-bury-alive gcmh json-mode json-snatcher js-mode-expansions js c-ts-common treesit cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dired-subtree dired-hacks-utils rainbow-mode rainbow-delimiters smart-forward whitespace-cleanup-mode whitespace engine-mode miniedit expand-region yaml-mode-expansions text-mode-expansions er-basic-expansions expand-region-core expand-region-custom zetteldeft ace-window avy deft iedit iedit-lib goto-line-preview unkillable-scratch markdown-mode noutline outline dimmer face-remap color windmove sentence-navigation ample-regexps swap-buffers quail cl annotate rg files-x rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs grep compile 0xc quelpa-use-package quelpa lisp-mnt help-fns radix-tree undo-tree queue git-modes gitignore-mode gitconfig-mode conf-mode gitattributes-mode xterm-color magit-lfs diff-hl log-view vc-dir ewoc vc git-link thingatpt vdiff-magit magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util git-timemachine vc-git vc-dispatcher magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell pcomplete comint ansi-osc server ansi-color magit-mode transient magit-git magit-base magit-section format-spec cursor-sensor crm compat vdiff smerge-mode diff diff-mode pretty-hydra s dash repo gitlab-ci-mode yaml-mode use-package-hydra edmacro kmacro comp comp-cstr warnings etags fileloop generator xref project advice volatile-highlights paradox paradox-menu paradox-commit-list hydra ring lv cus-edit pp cus-load icons wid-edit paradox-execute paradox-github paradox-core spinner cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf 0xc-autoloads afternoon-theme-autoloads all-the-icons-ivy-rich-autoloads all-the-icons-autoloads annotate-autoloads astyle-autoloads async-autoloads auto-yasnippet-autoloads bm-autoloads bury-successful-compilation-autoloads clang-format-autoloads cmake-font-lock-autoloads cmake-mode-autoloads company-autoloads counsel-fd-autoloads counsel-projectile-autoloads counsel-autoloads counsel-test-autoloads d2-mode-autoloads dap-mode-autoloads bui-autoloads dashboard-autoloads diff-hl-autoloads dimmer-autoloads dired-subtree-autoloads dired-hacks-utils-autoloads dockerfile-mode-autoloads dts-mode-autoloads easy-hugo-autoloads engine-mode-autoloads flycheck-autoloads flyspell-correct-ivy-autoloads flyspell-correct-autoloads forge-autoloads closql-autoloads emacsql-autoloads gcmh-autoloads ghub-autoloads git-link-autoloads git-modes-autoloads git-timemachine-autoloads gitlab-ci-mode-autoloads goto-line-preview-autoloads groovy-mode-autoloads haskell-snippets-autoloads helpful-autoloads elisp-refs-autoloads highlight-indent-guides-autoloads ibuffer-vc-autoloads iedit-autoloads ivy-avy-autoloads ivy-rich-autoloads ivy-xref-autoloads ivy-yasnippet-autoloads json-mode-autoloads rx json-snatcher-autoloads kill-or-bury-alive-autoloads kotlin-mode-autoloads kotlin-ts-mode-autoloads link-hint-autoloads lsp-docker-autoloads lsp-haskell-autoloads haskell-mode-autoloads lsp-ivy-autoloads lsp-treemacs-autoloads lsp-ui-autoloads lsp-mode-autoloads f-autoloads magit-lfs-autoloads major-mode-hydra-autoloads markdown-mode-autoloads mermaid-mode-autoloads miniedit-autoloads move-text-autoloads olivetti-autoloads org-bullets-autoloads paradox-autoloads pipenv-autoloads load-env-vars-autoloads pkg-info-autoloads epl-autoloads popup-autoloads pretty-hydra-autoloads protobuf-mode-autoloads py-autopep8-autoloads pyvenv-autoloads qml-mode-autoloads quelpa-use-package-autoloads quelpa-autoloads rainbow-delimiters-autoloads rainbow-mode-autoloads reformatter-autoloads register-list-autoloads repo-autoloads request-autoloads rg-autoloads rotate-autoloads sentence-navigation-autoloads ample-regexps-autoloads shell-pop-autoloads smart-comment-autoloads smart-forward-autoloads expand-region-autoloads spinner-autoloads swap-buffers-autoloads swiper-autoloads ivy-autoloads tree-sitter-langs-autoloads tree-sitter-autoloads treemacs-icons-dired-autoloads treemacs-magit-autoloads treemacs-projectile-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads pfuture-autoloads s-autoloads projectile-autoloads treepy-autoloads treesit-auto-autoloads tsc-autoloads undo-tree-autoloads queue-autoloads unkillable-scratch-autoloads use-package-hydra-autoloads vdiff-magit-autoloads magit-autoloads pcase magit-section-autoloads git-commit-autoloads transient-autoloads dash-autoloads vdiff-autoloads hydra-autoloads lv-autoloads visual-regexp-steroids-autoloads visual-regexp-autoloads volatile-highlights-autoloads wgrep-autoloads which-key-autoloads whitespace-cleanup-mode-autoloads with-editor-autoloads info compat-autoloads xterm-color-autoloads yaml-autoloads yaml-mode-autoloads yasnippet-snippets-autoloads yasnippet-autoloads zetteldeft-autoloads ace-window-autoloads avy-autoloads deft-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1459818 925289) (symbols 48 74217 152) (strings 32 443096 123894) (string-bytes 1 15926874) (vectors 16 156046) (vector-slots 8 2896484 996131) (floats 8 2121 6640) (intervals 56 12743 9883) (buffers 984 42)) --_000_DS0PR20MB57854423F4B2361223303F4D8D02ADS0PR20MB5785namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


When opening a C++ file with major mode c++-ts-mode, there is not
coloration

In the Messsage buffer, I see

Error during redisplay: (jit-lock-function 14) signaled (treesit-query-erro= r "Node type error at" 99 "(true) @font-lock-constant-face (= false) @font-lock-constant-face (null) @font-lock-constant-face (nullptr) @= font-lock-constant-face" "Debug the query with `treesit-query-validate'") [2 times]


In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
cairo version 1.16.0) of 2023-07-24 built on ubuntu
Repository revision: 31cef9a4eac01fff5ff4fcb89d7e2b7815e93bad
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 =
System Description: Ubuntu 20.04.6 LTS

Configured using:
'configure --prefix /usr/local --with-native-compilation --without-pgtk --with-json --with-gnutls --with-rsvg --without-xwidgets
--with-toolkit-scroll-bars --without-xaw3d --without-mailutils
--without-pop --with-tree-sitter 'CFLAGS=3D-O3 -mtune=3Dnative
-march=3Dnative -fomit-frame-pointer''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: Magit

Minor modes in effect:
global-company-mode: t
company-mode: t
which-key-mode: t
counsel-projectile-mode: t
global-treesit-auto-mode: t
recentf-mode: t
winner-mode: t
treemacs-icons-dired-mode: t
dap-tooltip-mode: t
dap-ui-many-windows-mode: t
dap-ui-mode: t
lsp-treemacs-sync-mode: t
treemacs-filewatch-mode: t
treemacs-follow-mode: t
treemacs-git-mode: t
treemacs-fringe-indicator-mode: t
dap-auto-configure-mode: t
dap-mode: t
bury-successful-compilation: t
yas-global-mode: t
yas-minor-mode: t
all-the-icons-ivy-rich-mode: t
ivy-rich-mode: t
projectile-mode: t
counsel-mode: t
ivy-mode: t
gcmh-mode: t
global-whitespace-cleanup-mode: t
engine-mode: t
unkillable-scratch: t
dimmer-mode: t
windmove-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
global-auto-revert-mode: t
shell-dirtrack-mode: t
server-mode: t
volatile-highlights-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
buffer-read-only: t
column-number-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:
/home/dcome/.emacs.d/elpa/transient-20230723.1411/transient hides /home/dco= me/source/emacs-29-rc1/lisp/transient

Features:
(shadow sort mail-extr emacsbug magit-extras display-line-numbers
make-mode tramp tramp-loaddefs trampver tramp-integration tramp-compat
mule-util treemacs-bookmarks treemacs-tags magit-bookmark bookmark
lsp-diagnostics company-cmake company-keywords company-dabbrev-code
company-dabbrev company-files company-yasnippet company-capf company
lsp-headerline lsp-icons lsp-modeline astyle reformatter lsp-ui
lsp-ui-flycheck lsp-ui-doc lsp-ui-imenu lsp-ui-peek lsp-ui-sideline
flycheck lsp-ui-util which-key view lsp-zig lsp-tilt lsp-steep
lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-ruby-lsp lsp-yaml lsp-xml
lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet
lsp-solargraph lsp-semgrep lsp-rust lsp-rf lsp-ruff-lsp lsp-remark
lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php
lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik
lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua
lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy
lsp-hack lsp-graphql lsp-glsl lsp-gleam lsp-go lsp-completion
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp
lsp-crystal lsp-credo lsp-cmake lsp-clojure lsp-semantic-tokens
lsp-clangd lsp-beancount lsp-bash lsp-astro lsp-awk lsp-ansible
lsp-angular lsp-ada lsp-actionscript c-ts-mode hideshow
counsel-projectile oc-basic ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group
gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail
mail-source utf7 nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader range ol-docview doc-view jka-compr image-mode exif
ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi org-link-doi org-agenda
time emacsql emacsql-compiler ghub-graphql treepy gsexp ghub url-http
url-gw url-auth let-alist gnutls treesit-auto tree-sitter-langs
tree-sitter-langs-build tar-mode arc-mode archive-mode tree-sitter-hl
tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get
dired-aux tsc-obsolete register-list dockerfile-mode sh-script smie
executable groovy-mode dts-mode afternoon-theme py-autopep8 lsp-haskell haskell-mode haskell-cabal haskell-utils haskell-font-lock
haskell-indentation haskell-string haskell-sort-imports haskell-lexeme
haskell-align-imports haskell-complete-module haskell-ghc-support
flymake-proc flymake dabbrev haskell-customize dashboard
dashboard-widgets recentf ob-shell ob-org org-bullets
the-org-mode-expansions org-element org-persist org-id org-refile
avl-tree org org-macro org-pcomplete org-list org-footnote org-faces
org-entities ob-emacs-lisp org-table org-loaddefs cal-menu calendar
cal-loaddefs winner move-text helpful cc-langs trace edebug debug
backtrace info-look find-func elisp-refs ivy-avy link-hint ffap
goto-addr ibuffer-vc treemacs-magit treemacs-icons-dired
treemacs-projectile dap-mouse dap-ui lsp-treemacs lsp-treemacs-generic
lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-interface
treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode
treemacs-rendering treemacs-annotations treemacs-async
treemacs-workspaces treemacs-dom treemacs-visuals
treemacs-fringe-indicator pulse treemacs-faces treemacs-icons
treemacs-scope treemacs-themes treemacs-core-utils pfuture hl-line
treemacs-logging treemacs-customization treemacs-macros gdb-mi bindat
gud bui bui-list bui-info bui-entry bui-core bui-history bui-button
bui-utils lsp-lens dap-python dap-mode dap-tasks dap-launch lsp-docker
yaml posframe dap-overlays lsp-mode lsp-protocol tree-widget
network-stream nsm inline ht f f-shortdoc ivy-xref cmake-font-lock
cmake-mode rst bury-successful-compilation qml-mode flyspell ispell
ivy-yasnippet auto-yasnippet haskell-snippets yasnippet-snippets
yasnippet all-the-icons-ivy-rich all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons ivy-rich projectile ido counsel-fd
counsel-test counsel-test-pytest counsel-test-ctest counsel-test-core
counsel xdg swiper ivy delsel ivy-faces ivy-overlay colir async
mermaid-mode protobuf-mode rotate d2-mode ob ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core org-cycle org-fold
org-fold-core ob-eval org-keys oc org-compat org-version org-macs
major-mode-hydra kill-or-bury-alive gcmh json-mode json-snatcher
js-mode-expansions js c-ts-common treesit cc-mode-expansions cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dired-subtree dired-hacks-utils rainbow-mode rainbow-delimiters smart-forward whitespace-cleanup-mode whitespace engine-mode miniedit
expand-region yaml-mode-expansions text-mode-expansions
er-basic-expansions expand-region-core expand-region-custom zetteldeft
ace-window avy deft iedit iedit-lib goto-line-preview unkillable-scratch markdown-mode noutline outline dimmer face-remap color windmove
sentence-navigation ample-regexps swap-buffers quail cl annotate rg
files-x rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep
rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs grep compile 0xc quelpa-use-package quelpa lisp-mnt help-fns radix-tree undo-tree queue
git-modes gitignore-mode gitconfig-mode conf-mode gitattributes-mode
xterm-color magit-lfs diff-hl log-view vc-dir ewoc vc git-link thingatpt vdiff-magit magit-ediff ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util git-timemachine vc-git
vc-dispatcher magit-submodule magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff git-commit log-edit message sendmail yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util text-property-search time-date mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor shell pcomplete comint ansi-osc server
ansi-color magit-mode transient magit-git magit-base magit-section
format-spec cursor-sensor crm compat vdiff smerge-mode diff diff-mode
pretty-hydra s dash repo gitlab-ci-mode yaml-mode use-package-hydra
edmacro kmacro comp comp-cstr warnings etags fileloop generator xref
project advice volatile-highlights paradox paradox-menu
paradox-commit-list hydra ring lv cus-edit pp cus-load icons wid-edit
paradox-execute paradox-github paradox-core spinner cl-extra help-mode
use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf
0xc-autoloads afternoon-theme-autoloads all-the-icons-ivy-rich-autoloads all-the-icons-autoloads annotate-autoloads astyle-autoloads
async-autoloads auto-yasnippet-autoloads bm-autoloads
bury-successful-compilation-autoloads clang-format-autoloads
cmake-font-lock-autoloads cmake-mode-autoloads company-autoloads
counsel-fd-autoloads counsel-projectile-autoloads counsel-autoloads
counsel-test-autoloads d2-mode-autoloads dap-mode-autoloads
bui-autoloads dashboard-autoloads diff-hl-autoloads dimmer-autoloads
dired-subtree-autoloads dired-hacks-utils-autoloads
dockerfile-mode-autoloads dts-mode-autoloads easy-hugo-autoloads
engine-mode-autoloads flycheck-autoloads flyspell-correct-ivy-autoloads flyspell-correct-autoloads forge-autoloads closql-autoloads
emacsql-autoloads gcmh-autoloads ghub-autoloads git-link-autoloads
git-modes-autoloads git-timemachine-autoloads gitlab-ci-mode-autoloads
goto-line-preview-autoloads groovy-mode-autoloads
haskell-snippets-autoloads helpful-autoloads elisp-refs-autoloads
highlight-indent-guides-autoloads ibuffer-vc-autoloads iedit-autoloads
ivy-avy-autoloads ivy-rich-autoloads ivy-xref-autoloads
ivy-yasnippet-autoloads json-mode-autoloads rx json-snatcher-autoloads
kill-or-bury-alive-autoloads kotlin-mode-autoloads
kotlin-ts-mode-autoloads link-hint-autoloads lsp-docker-autoloads
lsp-haskell-autoloads haskell-mode-autoloads lsp-ivy-autoloads
lsp-treemacs-autoloads lsp-ui-autoloads lsp-mode-autoloads f-autoloads
magit-lfs-autoloads major-mode-hydra-autoloads markdown-mode-autoloads
mermaid-mode-autoloads miniedit-autoloads move-text-autoloads
olivetti-autoloads org-bullets-autoloads paradox-autoloads
pipenv-autoloads load-env-vars-autoloads pkg-info-autoloads
epl-autoloads popup-autoloads pretty-hydra-autoloads
protobuf-mode-autoloads py-autopep8-autoloads pyvenv-autoloads
qml-mode-autoloads quelpa-use-package-autoloads quelpa-autoloads
rainbow-delimiters-autoloads rainbow-mode-autoloads
reformatter-autoloads register-list-autoloads repo-autoloads
request-autoloads rg-autoloads rotate-autoloads
sentence-navigation-autoloads ample-regexps-autoloads
shell-pop-autoloads smart-comment-autoloads smart-forward-autoloads
expand-region-autoloads spinner-autoloads swap-buffers-autoloads
swiper-autoloads ivy-autoloads tree-sitter-langs-autoloads
tree-sitter-autoloads treemacs-icons-dired-autoloads
treemacs-magit-autoloads treemacs-projectile-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
pfuture-autoloads s-autoloads projectile-autoloads treepy-autoloads
treesit-auto-autoloads tsc-autoloads undo-tree-autoloads queue-autoloads unkillable-scratch-autoloads use-package-hydra-autoloads
vdiff-magit-autoloads magit-autoloads pcase magit-section-autoloads
git-commit-autoloads transient-autoloads dash-autoloads vdiff-autoloads hydra-autoloads lv-autoloads visual-regexp-steroids-autoloads
visual-regexp-autoloads volatile-highlights-autoloads wgrep-autoloads
which-key-autoloads whitespace-cleanup-mode-autoloads
with-editor-autoloads info compat-autoloads xterm-color-autoloads
yaml-autoloads yaml-mode-autoloads yasnippet-snippets-autoloads
yasnippet-autoloads zetteldeft-autoloads ace-window-autoloads
avy-autoloads deft-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd 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 dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 1459818 925289)
(symbols 48 74217 152)
(strings 32 443096 123894)
(string-bytes 1 15926874)
(vectors 16 156046)
(vector-slots 8 2896484 996131)
(floats 8 2121 6640)
(intervals 56 12743 9883)
(buffers 984 42))


--_000_DS0PR20MB57854423F4B2361223303F4D8D02ADS0PR20MB5785namp_-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 24 08:31:50 2023 Received: (at 64830) by debbugs.gnu.org; 24 Jul 2023 12:31:51 +0000 Received: from localhost ([127.0.0.1]:42071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNuj8-0003hp-KP for submit@debbugs.gnu.org; Mon, 24 Jul 2023 08:31:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNuj6-0003hZ-8d; Mon, 24 Jul 2023 08:31:48 -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 1qNuiu-000143-BQ; Mon, 24 Jul 2023 08:31:42 -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=ZFgZ4AfhpJoPNqkskC9QSBPIr6mND9keGKiySXpFnG4=; b=ngNRsAIZU5ax ZHsHhUQXtdcBWr4fKTMeFnsiLiKZdM8yPofsAgdCynehkEuDKAqLZjUNemgvdBxlDbeGxY2BaQcL7 y3s/x4xaUBo2aepOYL5VFXPnAUIVxfQFf+fjc9hRSwTaRg8MAc/GcVuhcXIlpSyGJceZMf73i4Gf3 Qz9KWUzvV06yfqjDm+Bwh+wSyYAru5K8DMVbWBouQpU72P9yaT6paM6bnjorkn9p/EKn5621fVc+m p7UGCJAfX4AuH7yFZAp3Awur0qgSg6R+nyAe4UVPlNJ0tZvd0/VhUk6vtLXOp71tGG2V1IaGOK95p MDSE3CNimr+shZO/PDmPqw==; 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 1qNuit-00060l-MN; Mon, 24 Jul 2023 08:31:36 -0400 Date: Mon, 24 Jul 2023 15:32:17 +0300 Message-Id: <83h6ptsd66.fsf@gnu.org> From: Eli Zaretskii To: David Come , Yuan Fu , Theodor Thornhill In-Reply-To: (message from David Come on Mon, 24 Jul 2023 09:13:33 +0000) Subject: Re: bug#64830: 29.1; C++ treesitter mode no coloration References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 64830 64818 thanks > From: David Come > Date: Mon, 24 Jul 2023 09:13:33 +0000 > msip_labels: > > When opening a C++ file with major mode c++-ts-mode, there is not > coloration > > In the Messsage buffer, I see > > Error during redisplay: (jit-lock-function 14) signaled (treesit-query-error "Node type error at" 99 "(true) > @font-lock-constant-face (false) @font-lock-constant-face (null) @font-lock-constant-face (nullptr) > @font-lock-constant-face" "Debug the query with `treesit-query-validate'") [2 times] Thanks. This is the same issue as bug#64830; merged. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 13:35:52 2024 Received: (at 64830) by debbugs.gnu.org; 14 Aug 2024 17:35:52 +0000 Received: from localhost ([127.0.0.1]:47358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seHua-0003Zy-F7 for submit@debbugs.gnu.org; Wed, 14 Aug 2024 13:35:52 -0400 Received: from mail.muc.de ([193.149.48.3]:55116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seHuW-0003Zg-RF for 64830@debbugs.gnu.org; Wed, 14 Aug 2024 13:35:51 -0400 Received: (qmail 80568 invoked by uid 3782); 14 Aug 2024 19:35:06 +0200 Received: from muc.de (p4fe15e23.dip0.t-ipconnect.de [79.225.94.35]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 14 Aug 2024 19:35:05 +0200 Received: (qmail 20805 invoked by uid 1000); 14 Aug 2024 17:35:05 -0000 Date: Wed, 14 Aug 2024 17:35:05 +0000 To: 64830@debbugs.gnu.org Subject: 30.0.50 C++ treesitter mode no coloration Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 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 (-) Hello, Emacs. In my emacs-30 build (updated earlier today), C++ source in c++-ts-mode is not getting fontified, except for comments and preprocessor constructs. I think I'm using tree-sitter-cpp version 0.22.2 as downloaded from the Gentoo repository. Is there an easy way to check this from inside Emacs? This would appear to be bug 64818/64830, which are still open in debbugs. Shouldn't they be closed before the first/next emacs-30 pretest? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 01:28:33 2024 Received: (at 64830) by debbugs.gnu.org; 15 Aug 2024 05:28:33 +0000 Received: from localhost ([127.0.0.1]:48169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seT2H-0000Zu-Hj for submit@debbugs.gnu.org; Thu, 15 Aug 2024 01:28:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seT2F-0000Zh-DD for 64830@debbugs.gnu.org; Thu, 15 Aug 2024 01:28: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 1seSzS-0002DW-SH; Thu, 15 Aug 2024 01:25:38 -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=VqhhuLpKgXjaY3zkcEwStCe3KwcV39j7ucWLPGXchZ4=; b=pVhKOTt03HBu 6Khf2eo08UuR4qDZRL2XKY23hgzeNuPTTRUokT4rlPiwvO1qg3uepQ+WoSSk7rMVZ8i+Z0K1rW82/ hLYfHg7gXhsLIUxZEsziP2V992xOzBPROPYo8BKkpBTIvsE+Kx95F1aaeGlGf0ZSouGBAITFcwJXL INDMfMkX3H1BGuB/ZboyrKrpk5Z9PXxv+XZtl3n2KLDZTaClklmjbCGrSxDR9sICcgMlc/jL6hDUM fytVqCQnmt9h+eMZRA9WfCF+s9OitNM5/y9wJ90qCrJwh+GnneLcA8avhw/OPF3fY+CQ1IoL9vSvL eaWI4t5KY/i5MTkYLSWJrg==; Date: Thu, 15 Aug 2024 08:25:34 +0300 Message-Id: <868qwy8ii9.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie , Yuan Fu In-Reply-To: (message from Alan Mackenzie on Wed, 14 Aug 2024 17:35:05 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Wed, 14 Aug 2024 17:35:05 +0000 > From: Alan Mackenzie > > Hello, Emacs. > > In my emacs-30 build (updated earlier today), C++ source in c++-ts-mode > is not getting fontified, except for comments and preprocessor > constructs. I cannot reproduce this, at least not with a random C++ source file I tried to. Does this happen for you in "emacs -Q" and for every C++ file? If this happens with any file and in 'emacs -Q", do you see redisplay error messages in *Messages*? If so, what are those messages? > I think I'm using tree-sitter-cpp version 0.22.2 as downloaded from the > Gentoo repository. Is there an easy way to check this from inside > Emacs? No, not AFAIK. And the problem is not the version of tree-sitter, it is usually the version of the C++ grammar library. Do you know the version of that one you have installed? > This would appear to be bug 64818/64830, which are still open in > debbugs. Shouldn't they be closed before the first/next emacs-30 > pretest? Those bugs were fixed. The reason they are not closed is that we raised a more general issue there, and that is not yet resolved. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 12:45:22 2024 Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 16:45:22 +0000 Received: from localhost ([127.0.0.1]:52760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf04n-0000XB-JO for submit@debbugs.gnu.org; Fri, 16 Aug 2024 12:45:21 -0400 Received: from mail.muc.de ([193.149.48.3]:58806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf04l-0000Wx-Cb for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 12:45:20 -0400 Received: (qmail 12039 invoked by uid 3782); 16 Aug 2024 18:44:34 +0200 Received: from muc.de (p4fe15baa.dip0.t-ipconnect.de [79.225.91.170]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 16 Aug 2024 18:44:34 +0200 Received: (qmail 14391 invoked by uid 1000); 16 Aug 2024 16:44:33 -0000 Date: Fri, 16 Aug 2024 16:44:33 +0000 To: Eli Zaretskii Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <868qwy8ii9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <868qwy8ii9.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.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: -1.0 (-) Hello, Eli. On Thu, Aug 15, 2024 at 08:25:34 +0300, Eli Zaretskii wrote: > > Date: Wed, 14 Aug 2024 17:35:05 +0000 > > From: Alan Mackenzie > > In my emacs-30 build (updated earlier today), C++ source in c++-ts-mode > > is not getting fontified, except for comments and preprocessor > > constructs. > I cannot reproduce this, at least not with a random C++ source file I > tried to. Does this happen for you in "emacs -Q" and for every C++ > file? Yes, and yes. Here's a recipe: Create the file ~/class-3.cc with the following contents: ///////////////////////////////////////////////////////////////////////// // foo class A { struct B { int i; }; struct B { int i; }; }; ///////////////////////////////////////////////////////////////////////// (i) emacs -Q (ii) M-x load-library c-ts-mode (iii) C-x C-f ~/class-3.cc The buffer, in c++-ts-mode, has no fontification apart from the comment on its first line. > If this happens with any file and in 'emacs -Q", do you see redisplay > error messages in *Messages*? If so, what are those messages? Yes, I see a single message after the above recipe. It's: Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") > > I think I'm using tree-sitter-cpp version 0.22.2 as downloaded from the > > Gentoo repository. Is there an easy way to check this from inside > > Emacs? > No, not AFAIK. And the problem is not the version of tree-sitter, it > is usually the version of the C++ grammar library. Do you know the > version of that one you have installed? I have libtree-sitter-cpp.so.0.14, built and installed on 2024-08-04. The package is (confusingly) called dev-libs/tree-sitter-cpp-0.22.2. > > This would appear to be bug 64818/64830, which are still open in > > debbugs. Shouldn't they be closed before the first/next emacs-30 > > pretest? > Those bugs were fixed. The reason they are not closed is that we > raised a more general issue there, and that is not yet resolved. OK. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 13:41:07 2024 Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 17:41:07 +0000 Received: from localhost ([127.0.0.1]:52799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf0wl-00025B-BA for submit@debbugs.gnu.org; Fri, 16 Aug 2024 13:41:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf0wj-00024a-BW for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 13:41:06 -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 1sf0vz-0003Gu-9Q; Fri, 16 Aug 2024 13:40:21 -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=IhqJcL4ZFBqNLTZOxVajbef01ojHChOTn2tLBL23Quk=; b=TkrYpVWidRHH TwrY8dwSgxkqT9jMaVNg/i6qhuVldxpCxI4AeTAoGv/BFGI0z/H6r2kNeiHgg1IrTN14maiMd106J QJuchmd7NFXWW4b66RZ8vM6b91g9rC+JHjNtY/ozd/vAvARvvXw3lumNwYdlpiA5EFWrUgCwk4c8M /9beuzaACgujzXFao3SlC/4MCm3cndxyzrxXve4tf8BHpZNJntfYmCdQVmUmpSGpo1Jnthg7TcDrn UvHgr47qJLfKxUzuF6XvWDXL5FT5n2xexXDBp+77JV7bD2zoSgG2fk0eosptp4StHdaH/rcevwblq eNXTQtwzZTvsY54SSu1zFA==; Date: Fri, 16 Aug 2024 20:40:07 +0300 Message-Id: <86o75s5pu0.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Fri, 16 Aug 2024 16:44:33 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <868qwy8ii9.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Fri, 16 Aug 2024 16:44:33 +0000 > Cc: Yuan Fu , 64830@debbugs.gnu.org > From: Alan Mackenzie > > Create the file ~/class-3.cc with the following contents: > ///////////////////////////////////////////////////////////////////////// > // foo > class A > { > struct B { > int i; > }; > struct B { > int i; > }; > }; > ///////////////////////////////////////////////////////////////////////// > > (i) emacs -Q > (ii) M-x load-library c-ts-mode > (iii) C-x C-f ~/class-3.cc > > The buffer, in c++-ts-mode, has no fontification apart from the comment > on its first line. > > > If this happens with any file and in 'emacs -Q", do you see redisplay > > error messages in *Messages*? If so, what are those messages? > > Yes, I see a single message after the above recipe. It's: > > Error during redisplay: (jit-lock-function 1) signaled > (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" > \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face > (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug > the query with `treesit-query-validate'") > > > > I think I'm using tree-sitter-cpp version 0.22.2 as downloaded from the > > > Gentoo repository. Is there an easy way to check this from inside > > > Emacs? > > > No, not AFAIK. And the problem is not the version of tree-sitter, it > > is usually the version of the C++ grammar library. Do you know the > > version of that one you have installed? > > I have libtree-sitter-cpp.so.0.14, built and installed on 2024-08-04. > The package is (confusingly) called dev-libs/tree-sitter-cpp-0.22.2. I can reproduce this in Emacs 29, but not in the current emacs-30 branch. I think I also have libtree-sitter-cpp version 0.22.2, but I also tested with 0.22.3 and I see no problem there, either (with Emacs 30). So I wonder why you see this in Emacs 30. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 13:46:11 2024 Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 17:46:11 +0000 Received: from localhost ([127.0.0.1]:52806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf11f-0002Cp-6x for submit@debbugs.gnu.org; Fri, 16 Aug 2024 13:46:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf11d-0002Cd-BF for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 13:46:10 -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 1sf10m-0003pO-4e; Fri, 16 Aug 2024 13:45:24 -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=EzkMjk1zL4ixY79wrOHRS+KSLBuS0e9rTKJ8p9ljGVI=; b=R1gSJDqCRu8s DRqv0dHq9Yfgv8f0ZqElb9V9XQJVIDOAeBOyySBN3vimb0BFPWqteQsd/kb+8FrT/69ecGTuZB4lY xwHBzRCiXlw6JyjjQM8XxqU9rS3fDWMWE4PrIrDwKfwdl1X3oZBdgH5qYWY7P61pJuJur+YL+Cwov Vj/x5WkION1lZcQ4/Jz/VqU5hlAcvNDO+edofw9JnayTsKsfKt1zNYbhqSsfBVzIEzZ2nid1V4YdB eI+p/W3xlxA7VM4Ojc+7beE8gatAb2Ol1Uqc5MVKbhsx6iF5htHWf0sfSJffbYDu1oMaCWtK/HJMT p+vM9CKuvM1c/8yKQziPSg==; Date: Fri, 16 Aug 2024 20:45:05 +0300 Message-Id: <86mslc5plq.fsf@gnu.org> From: Eli Zaretskii To: acm@muc.de In-Reply-To: <86o75s5pu0.fsf@gnu.org> (message from Eli Zaretskii on Fri, 16 Aug 2024 20:40:07 +0300) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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: 64830@debbugs.gnu.org, casouri@gmail.com > Date: Fri, 16 Aug 2024 20:40:07 +0300 > From: Eli Zaretskii > > I can reproduce this in Emacs 29, but not in the current emacs-30 > branch. I think I also have libtree-sitter-cpp version 0.22.2, but I > also tested with 0.22.3 and I see no problem there, either (with Emacs > 30). So I wonder why you see this in Emacs 30. Maybe your Emacs 30 build is old? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 14:07:21 2024 Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 18:07:21 +0000 Received: from localhost ([127.0.0.1]:52849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf1M8-0002mJ-Sp for submit@debbugs.gnu.org; Fri, 16 Aug 2024 14:07:21 -0400 Received: from mail.muc.de ([193.149.48.3]:16133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf1M7-0002m4-31 for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 14:07:19 -0400 Received: (qmail 5893 invoked by uid 3782); 16 Aug 2024 20:06:33 +0200 Received: from muc.de (p4fe15baa.dip0.t-ipconnect.de [79.225.91.170]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 16 Aug 2024 20:06:33 +0200 Received: (qmail 22127 invoked by uid 1000); 16 Aug 2024 18:06:31 -0000 Date: Fri, 16 Aug 2024 18:06:31 +0000 To: Eli Zaretskii Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86mslc5plq.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, 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 (-) Hello, Eli. On Fri, Aug 16, 2024 at 20:45:05 +0300, Eli Zaretskii wrote: > > Cc: 64830@debbugs.gnu.org, casouri@gmail.com > > Date: Fri, 16 Aug 2024 20:40:07 +0300 > > From: Eli Zaretskii > > I can reproduce this in Emacs 29, but not in the current emacs-30 > > branch. I think I also have libtree-sitter-cpp version 0.22.2, but I > > also tested with 0.22.3 and I see no problem there, either (with Emacs > > 30). So I wonder why you see this in Emacs 30. > Maybe your Emacs 30 build is old? No. I updated it on Wednesday, the most recent commit I have being: commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, origin/emacs-30) Author: Eli Zaretskii Date: Wed Aug 14 11:35:48 2024 +0300 Improve documentation of time-parsing functions .. I will update it right now and retry .... ..... DONE. It makes no difference. I don't understand either why I see this bug and you don't. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 14:28:03 2024 Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 18:28:04 +0000 Received: from localhost ([127.0.0.1]:52864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf1gB-0003Ik-G2 for submit@debbugs.gnu.org; Fri, 16 Aug 2024 14:28:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf1gA-0003IF-Fo for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 14:28:02 -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 1sf1fS-0001aQ-I5; Fri, 16 Aug 2024 14:27:18 -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=3bdEnSSUnJsZ85TTcWRAPSUwvXNVoQx/n2p+sncsWLk=; b=GnXATBV1Ne7/ l6uRVcnG+AwJEV8Acmk3u8/32ABSBVrybJOqp2ImClfi1v58u0joqVm46m6BpiKyVJzXRG9OcsSqn 3ER9RYqC4cGp7VxLCBIgEJe/ZaWs6v9dZrSDCPDaDIZx+T8plrbxw72lJi7OUgvXgpAGivxRXxWKF tg4HnzJaTwsm8fWvZmc9y3zgMu+TEJIylYHbhjwf7a0LSjcCLCthJ4sonaLtZeAs0w9Z/x7B4atjl u2BrPM/ZEFI41k1ZDdeGZzC2eUHdnC2FDw5u7zqswmQpeJ7G4pPzsUcg94p+Xb+x6wd/257plQUVg giRPkMI9eu/6g+2YivP2PQ==; Date: Fri, 16 Aug 2024 21:27:01 +0300 Message-Id: <86h6bk5nnu.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie , casouri@gmail.com In-Reply-To: (message from Alan Mackenzie on Fri, 16 Aug 2024 18:06:31 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Fri, 16 Aug 2024 18:06:31 +0000 > Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de > From: Alan Mackenzie > > > Maybe your Emacs 30 build is old? > > No. I updated it on Wednesday, the most recent commit I have being: > > commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, > origin/emacs-30) > Author: Eli Zaretskii > Date: Wed Aug 14 11:35:48 2024 +0300 > > Improve documentation of time-parsing functions > > .. I will update it right now and retry .... > > ..... DONE. It makes no difference. I don't understand either why I see > this bug and you don't. Maybe try updating the C++ grammar library? Yuan, any ideas? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 23:48:25 2024 Received: (at 64830) by debbugs.gnu.org; 20 Aug 2024 03:48:25 +0000 Received: from localhost ([127.0.0.1]:59533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgFr6-0002vI-Sx for submit@debbugs.gnu.org; Mon, 19 Aug 2024 23:48:25 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:47161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgFr4-0002v2-EL for 64830@debbugs.gnu.org; Mon, 19 Aug 2024 23:48:23 -0400 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2020e83eca1so29879885ad.2 for <64830@debbugs.gnu.org>; Mon, 19 Aug 2024 20:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724125594; x=1724730394; 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=XKHWPcwki3KrTU6PetpN+egyTe54DJj+rx5QPLefuK8=; b=ffQAgmuX+h4Dq06KFeM6436n8xlMr0/NuWFomw/F6+/0AUuJ1wLSfSoHo+XomzMZU5 Yj4iIOlIB58v70CRRVW8L4k4BQo8O3kQ3PFMN7JYwIzzsHkPUzkJaTurobEqmgrTKZTO SXM9Zhjcj6EbrvTA32HV2wCmTq0V5QGg0jZMaApKl599lbEQS6qgkW1/7oyQmi1hmqSk zlsajzB70BvBF5FGG+4YJMX4c5+ly+U28XwqmtR0btlwA/4tRJQX62W1j7Ec4QKr7JWa qNTqgvvEazi0WVErhsvbo+B51YMZf3RbQjLWRdoXQSYqamTQH+y8GEUtTBFclTHxdwHo mCcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724125594; x=1724730394; 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=XKHWPcwki3KrTU6PetpN+egyTe54DJj+rx5QPLefuK8=; b=kPaACLN+AdTu0AlE+pCiQGFNjwDNCWCyeKSzPuJ2rm1mjHd6l1pxPgiwie3WCO4HSR Fop5mQ3RQRhwBYPT+Whc8n49QXOyNLZGUMmW+HNBXX22RdZiJKUCmuMhXZrL/+RRz32M e3wl05HxCo/+jj8CPcmFWSwP5BpZopPzA8yq8s0OdZjIakPykOZnhG2Oy2M86XBjewp/ 0f0Nzlci1NMgw3RlZzRXbaQrluJaGVWo3n304+N2r15m55jfJqMriH34/UJWRnkIsiVY Sb25zI12EaaOVQg0A6QSJ2GitFEu8OkO1R5J1X7KcC6//R2Fi0gW+KIO/UJBOtNdHzuf aYRQ== X-Forwarded-Encrypted: i=1; AJvYcCXG3Uvo7Q8G/LRdNj0w378Z6znhtRDVD6k0pVSGDLoHgcRDpuy2bc6iW/IZbOpyUJSKje/UtedCjBVK+rNAn2/X6CzFJL8= X-Gm-Message-State: AOJu0Yy3uHIIP1BqZt3wvNpfd4Lm1N3FO/x55N0HxWfQW64DnN/oFDKs qTyWoma0EngK52Pebnf77EPm6rHZzLF/MtJsMWTn4GdI8FKGsmd3FhFY8A== X-Google-Smtp-Source: AGHT+IGVciJqoT4Mp5WTejbBY7dH0SFPheN893tjYI6KFqkGqxYS19NN4a+VWRlfoGu4+aiXOp2Ypg== X-Received: by 2002:a17:902:e804:b0:202:3a78:5d8a with SMTP id d9443c01a7336-2023a786318mr58015145ad.8.1724125594165; Mon, 19 Aug 2024 20:46:34 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:edc4:5dff:2f35:3b4a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f038b303sm69212205ad.192.2024.08.19.20.46.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Aug 2024 20:46: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#64830: 30.0.50 C++ treesitter mode no coloration From: Yuan Fu In-Reply-To: <86h6bk5nnu.fsf@gnu.org> Date: Mon, 19 Aug 2024 20:46:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, Alan Mackenzie 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 Aug 16, 2024, at 11:27=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> Date: Fri, 16 Aug 2024 18:06:31 +0000 >> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de >> From: Alan Mackenzie >>=20 >>> Maybe your Emacs 30 build is old? >>=20 >> No. I updated it on Wednesday, the most recent commit I have being: >>=20 >> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, >> origin/emacs-30) >> Author: Eli Zaretskii >> Date: Wed Aug 14 11:35:48 2024 +0300 >>=20 >> Improve documentation of time-parsing functions >>=20 >> .. I will update it right now and retry .... >>=20 >> ..... DONE. It makes no difference. I don't understand either why I = see >> this bug and you don't. >=20 > Maybe try updating the C++ grammar library? >=20 > Yuan, any ideas? Nothing obviously wrong from a glance. I=E2=80=99m very busy recently = but I=E2=80=99ll have some time this week to look into this. Sorry for = the delay :-) Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 14:37:48 2024 Received: (at 64830) by debbugs.gnu.org; 24 Aug 2024 18:37:48 +0000 Received: from localhost ([127.0.0.1]:41889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shve0-0007eh-62 for submit@debbugs.gnu.org; Sat, 24 Aug 2024 14:37:48 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:44216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shvdv-0007eN-91 for 64830@debbugs.gnu.org; Sat, 24 Aug 2024 14:37:46 -0400 Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71446fefddfso1281406b3a.0 for <64830@debbugs.gnu.org>; Sat, 24 Aug 2024 11:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724524548; x=1725129348; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=NsQu3Ate/i2XoiHUGGYwRVqQ5tulxOkJFL4vNlu402U=; b=iFIw6ZwRRZIhyZ9i7w0+RBE5WU8g5x/lOno1/rbKcVR3ZcDYGox8m6md/uzS0dwXUf HSY7TFEm5Ryu2GAP/OGfFI+tfh/riJT4+sguZ5S9kWIlTV4IwGgiYswYn6RDXZX0LJbR Yt2+ETR2WcpiW06UWxHGDe7uRyo/7Fe3Or+6Iyaq5AYw3lXOFeURkl3Xc0IqjZzSG726 l7SdUsNAtQa9r/0ygPJd7wqTKiydg4KYRpQbkJQEgalk39h73Ynxl+YZRNgsz8S4wslW KvQpR56Xhtq1F6edngxZSZAMtO/Nb3hURuPFlMT+YED69/PlkIJsJmWyB1b9WJDGETfM TfoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724524548; x=1725129348; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NsQu3Ate/i2XoiHUGGYwRVqQ5tulxOkJFL4vNlu402U=; b=ep2uE3QylpvvJ6XigawvY7vCBywZlnHZg3undxJkFHfOOdmi5FukseFTuKue5biJvY PvNntp08t9fdFbyK2KQRIe4j4e4c0DFIk6hXVpDkIGYCuag1TYNHEVWY4Rb5guPk5hRM 3hicdeyoBOcjDoWyAXbGW5+cGl0OFk653YW1Hu+0p2dlFAhSRl/yeux47nqLKLf+W6zc sZeMqS1ZMixvnMqGmf1bXHL+CVb10ObwBrSWBfpCyP9s4eSIIWCkXalxPL8sTwh6MFOe GXNmgZVgjcdCw7Q2TML96FGEwwiTwZVhqAWBYGnl2vOOelcUYnceEwT6Lsq/j6/mROjx U5Kw== X-Forwarded-Encrypted: i=1; AJvYcCUJenw9Xdoay9yDD61Q4aEd15qgL0McVArNpV7ru+roGHfCTfuaavcfPCg+Z9/5TPENpFNc7Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzIpxbJRl2E0tJ89BKXPnyo8rg8BE1SII28agQujPCZLWeuV8Wl KZJ11z1d3LwFEMVWT9NnEgdzPLXT2RyxHAmVkk/lFV2jyk642Wh1vsNABA== X-Google-Smtp-Source: AGHT+IE1EnaLb0jILoSjpHvjrxoXUI/6r2BcZ0moU8UMUMKGrlbUuBY8ivElpFbG+3mNSrV5kd5WZQ== X-Received: by 2002:a05:6a00:948c:b0:706:6408:7917 with SMTP id d2e1a72fcca58-714458b0117mr6725712b3a.26.1724524548232; Sat, 24 Aug 2024 11:35:48 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:411:bac0:461c:7bfe]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434309676sm4942961b3a.174.2024.08.24.11.35.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Aug 2024 11:35:47 -0700 (PDT) From: Yuan Fu Message-Id: <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_C5D7C714-4C08-408D-AD88-16E5A22C1B0B" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Sat, 24 Aug 2024 11:35:36 -0700 In-Reply-To: To: Eli Zaretskii References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, Alan Mackenzie 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 (-) --Apple-Mail=_C5D7C714-4C08-408D-AD88-16E5A22C1B0B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 19, 2024, at 8:46=E2=80=AFPM, Yuan Fu = wrote: >=20 >=20 >=20 >> On Aug 16, 2024, at 11:27=E2=80=AFAM, Eli Zaretskii = wrote: >>=20 >>> Date: Fri, 16 Aug 2024 18:06:31 +0000 >>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de >>> From: Alan Mackenzie >>>=20 >>>> Maybe your Emacs 30 build is old? >>>=20 >>> No. I updated it on Wednesday, the most recent commit I have being: >>>=20 >>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, >>> origin/emacs-30) >>> Author: Eli Zaretskii >>> Date: Wed Aug 14 11:35:48 2024 +0300 >>>=20 >>> Improve documentation of time-parsing functions >>>=20 >>> .. I will update it right now and retry .... >>>=20 >>> ..... DONE. It makes no difference. I don't understand either why = I see >>> this bug and you don't. >>=20 >> Maybe try updating the C++ grammar library? >>=20 >> Yuan, any ideas? >=20 > Nothing obviously wrong from a glance. I=E2=80=99m very busy recently = but I=E2=80=99ll have some time this week to look into this. Sorry for = the delay :-) >=20 > Yuan Upon closer inspection, I think this is caused by a recent change in = c-ts-mode font-lock rules, in 014aab9847a0d3d898cb8cbc7224143f2d741abb. Alan, could you do this: don=E2=80=99t upgrade your c++ grammar and try = this patch, if I was right it should fix your problem. Thanks! Yuan --Apple-Mail=_C5D7C714-4C08-408D-AD88-16E5A22C1B0B Content-Disposition: attachment; filename=cpp-font-lock.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="cpp-font-lock.patch" Content-Transfer-Encoding: quoted-printable =46rom=20a171709cadd915f48d6c8ed3f9e1e19f6a4fde19=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Sat,=20= 24=20Aug=202024=2011:32:43=20-0700=0ASubject:=20[PATCH]=20Fix=20= c-ts-mode=20font-lock=20for=20older=20c++=20grammar=20(bug#64830)=0A=0A*=20= lisp/progmodes/c-ts-mode.el:=0A(c-ts-mode--virtual-named-p):=20New=20= function.=0A(c-ts-mode--font-lock-settings):=20Use=20either=20keyword=20= or=20named=20node=0Adepending=20on=20grammar=20version.=0A---=0A=20= lisp/progmodes/c-ts-mode.el=20|=2016=20++++++++++++++--=0A=201=20file=20= changed,=2014=20insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/c-ts-mode.el=20b/lisp/progmodes/c-ts-mode.el=0Aindex=20= 6c406a8acd9..66e4999677b=20100644=0A---=20a/lisp/progmodes/c-ts-mode.el=0A= +++=20b/lisp/progmodes/c-ts-mode.el=0A@@=20-537,6=20+537,16=20@@=20= c-ts-mode--top-level-label-matcher=0A=20=20=20=20=20=20=20=20(equal=20= "function_definition"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (treesit-node-type=20(treesit-node-parent=20parent)))))=0A=20=0A+;;;=20= Grammar=20checks=0A+=0A+;;=20Ref:=20= https://github.com/tree-sitter/tree-sitter-cpp/commit/c51ffe9d7b67aa9500db= 01c26d8c075cfe032d0f=0A+(defun=20c-ts-mode--virtual-named-p=20()=0A+=20=20= "Return=20t=20if=20virtual=20is=20a=20named=20node=20instead=20of=20a=20= keyword."=0A+=20=20(ignore-errors=0A+=20=20=20=20(progn=0A+=20=20=20=20=20= =20(treesit-query-compile=20'c++=20"(virtual)=20@cap")=0A+=20=20=20=20=20= =20t)))=0A+=0A=20;;;=20Font-lock=0A=20=0A=20(defvar=20= c-ts-mode--feature-list=0A@@=20-635,9=20+645,11=20@@=20= c-ts-mode--font-lock-settings=0A=20=20=20=20:feature=20'keyword=0A=20=20=20= =20`([,@(c-ts-mode--keywords=20mode)]=20@font-lock-keyword-face=0A=20=20=20= =20=20=20,@(when=20(eq=20mode=20'cpp)=0A-=20=20=20=20=20=20=20=20=20= '((auto)=20@font-lock-keyword-face=0A+=20=20=20=20=20=20=20=20=20= `((auto)=20@font-lock-keyword-face=0A=20=20=20=20=20=20=20=20=20=20=20=20= (this)=20@font-lock-keyword-face=0A-=20=20=20=20=20=20=20=20=20=20=20= (virtual)=20@font-lock-keyword-face)))=0A+=20=20=20=20=20=20=20=20=20=20=20= ,@(if=20(c-ts-mode--virtual-named-p)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'((virtual)=20@font-lock-keyword-face)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'("virtual"=20@font-lock-keyword-face)))))=0A= =20=0A=20=20=20=20:language=20mode=0A=20=20=20=20:feature=20'operator=0A= --=20=0A2.39.5=20(Apple=20Git-151)=0A=0A= --Apple-Mail=_C5D7C714-4C08-408D-AD88-16E5A22C1B0B-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 15:39:24 2024 Received: (at 64830) by debbugs.gnu.org; 24 Aug 2024 19:39:24 +0000 Received: from localhost ([127.0.0.1]:41923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shwbc-0000rl-ER for submit@debbugs.gnu.org; Sat, 24 Aug 2024 15:39:24 -0400 Received: from mail.muc.de ([193.149.48.3]:11556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shwbZ-0000rV-IV for 64830@debbugs.gnu.org; Sat, 24 Aug 2024 15:39:23 -0400 Received: (qmail 30004 invoked by uid 3782); 24 Aug 2024 21:38:26 +0200 Received: from muc.de (p4fe151e1.dip0.t-ipconnect.de [79.225.81.225]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 24 Aug 2024 21:38:25 +0200 Received: (qmail 20941 invoked by uid 1000); 24 Aug 2024 19:38:25 -0000 Date: Sat, 24 Aug 2024 19:38:25 +0000 To: Yuan Fu Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, 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: -1.0 (-) Hello, Yuan. On Sat, Aug 24, 2024 at 11:35:36 -0700, Yuan Fu wrote: > > On Aug 19, 2024, at 8:46 PM, Yuan Fu wrote: > >> On Aug 16, 2024, at 11:27 AM, Eli Zaretskii wrote: > >>> Date: Fri, 16 Aug 2024 18:06:31 +0000 > >>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de > >>> From: Alan Mackenzie > >>>> Maybe your Emacs 30 build is old? > >>> No. I updated it on Wednesday, the most recent commit I have being: > >>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, > >>> origin/emacs-30) > >>> Author: Eli Zaretskii > >>> Date: Wed Aug 14 11:35:48 2024 +0300 > >>> Improve documentation of time-parsing functions > >>> .. I will update it right now and retry .... > >>> ..... DONE. It makes no difference. I don't understand either why I see > >>> this bug and you don't. > >> Maybe try updating the C++ grammar library? > >> Yuan, any ideas? > > Nothing obviously wrong from a glance. I’m very busy recently but I’ll have some time this week to look into this. Sorry for the delay :-) > > Yuan > Upon closer inspection, I think this is caused by a recent change in c-ts-mode font-lock rules, in 014aab9847a0d3d898cb8cbc7224143f2d741abb. > Alan, could you do this: don’t upgrade your c++ grammar and try this patch, if I was right it should fix your problem. Thanks! I updated my emacs-30 branch, checked that that commit was included, and rebuilt it. The problem still exists on my copy of Emacs 30. :-( > Yuan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 16:45:36 2024 Received: (at 64830) by debbugs.gnu.org; 24 Aug 2024 20:45:36 +0000 Received: from localhost ([127.0.0.1]:41957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shxdf-0002cI-Oq for submit@debbugs.gnu.org; Sat, 24 Aug 2024 16:45:36 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:44476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shxdc-0002c4-H3 for 64830@debbugs.gnu.org; Sat, 24 Aug 2024 16:45:35 -0400 Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-714226888dfso2730907b3a.1 for <64830@debbugs.gnu.org>; Sat, 24 Aug 2024 13:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724532217; x=1725137017; 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=5xKIXkL2L+mH1wyniYSbDoShzcE1erHEix8av8ZOu5U=; b=TM/OMVii6C8D535erQKg3dDldK2n47gkpVFcpB/k3DOwWJkL1o+G9dPWMmDty95tzQ 58xagX+GZepuUvRvRD6GKAY9M5Ua4ACejJ3FH/LRSBf1hkwyK9qbvxQWu/DaDmvQ3f4M uABTOqzsKE8z5mTAnvVK1Q5+4/xWa1Et9rZ7j2EHIUoTJu0Zu8leW7+rRSMrrbKPO+Nq lHXXMMOfKpOs5dUOuB53kzAJ1dfl0Zy8W9p+/52oQzzaWcz1wYqrqOze54/sx4Spwa48 SKiVmxHxNFCJ3NoPoMOyBIYwIWY57YTThPBQE4O5bAhhsdHzsByf78v+/v0zP8yV5K/J thaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724532217; x=1725137017; 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=5xKIXkL2L+mH1wyniYSbDoShzcE1erHEix8av8ZOu5U=; b=rtv7TBE0vZ3eiAtJmJrhDV8D0OwrhQMQMwzj+6j5F9qRGLhUjlLBVIGQ+MbSqbrOP/ tm/NBv+lPKNiIMpvLqWGcs30CnPIreLQ33LWzqKgeFMc/+JvATUxZZojXlJrvV6IhTBt Mn4NrFLfTem7J8MZ0PxNe9vvEsmNGWZ2kp4t8l4ZyJpcyHwAPz/qh9NmDIIVh2TMabEr SuqeE67ImCl762OR/I2+Hxpsw8cvQhhvKi1AyOJIop0iiVEmYDfk9IgGQtXktHxgCLow 37vyNFmicR264Ljyu2e55x59Eg6+3luD8Tu0di61HljaJXUBBDhbUTzt2Gc0PRW1T4ko MduQ== X-Forwarded-Encrypted: i=1; AJvYcCWn+KppJrsa2SlBjswsm/YeHxDbQNr8a9uL9RUPA21AlmVfbm1YaRoI5UlZfteoL6blVacs1Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxo8UaHejmMS7t8KK2lPSXqyfDkblgijffeHHFoMWOhZhOtdLiW XVY4rl97epUm0eGjLYM6gN2mGXhHqLiVUfswyPXWBWcCvvHy3dMy X-Google-Smtp-Source: AGHT+IEXjznyqv2klfzJDXinMFaNEx3usO1mBKO7pNIGsMuzu3VtJf5hUuR/8mPnh0LuTn92A9I2sA== X-Received: by 2002:a05:6a21:4a4b:b0:1be:c2f7:275 with SMTP id adf61e73a8af0-1cc8a0810e2mr6039429637.50.1724532217393; Sat, 24 Aug 2024 13:43:37 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:411:bac0:461c:7bfe]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7143430020fsm5029515b3a.146.2024.08.24.13.43.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Aug 2024 13:43:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration From: Yuan Fu In-Reply-To: Date: Sat, 24 Aug 2024 13:43:25 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> To: Alan Mackenzie X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, 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: -1.0 (-) > On Aug 24, 2024, at 12:38=E2=80=AFPM, Alan Mackenzie = wrote: >=20 > Hello, Yuan. >=20 > On Sat, Aug 24, 2024 at 11:35:36 -0700, Yuan Fu wrote: >=20 >=20 >>> On Aug 19, 2024, at 8:46=E2=80=AFPM, Yuan Fu = wrote: >=20 >=20 >=20 >>>> On Aug 16, 2024, at 11:27=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >>>>> Date: Fri, 16 Aug 2024 18:06:31 +0000 >>>>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de >>>>> From: Alan Mackenzie >=20 >>>>>> Maybe your Emacs 30 build is old? >=20 >>>>> No. I updated it on Wednesday, the most recent commit I have = being: >=20 >>>>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, >>>>> origin/emacs-30) >>>>> Author: Eli Zaretskii >>>>> Date: Wed Aug 14 11:35:48 2024 +0300 >=20 >>>>> Improve documentation of time-parsing functions >=20 >>>>> .. I will update it right now and retry .... >=20 >>>>> ..... DONE. It makes no difference. I don't understand either = why I see >>>>> this bug and you don't. >=20 >>>> Maybe try updating the C++ grammar library? >=20 >>>> Yuan, any ideas? >=20 >>> Nothing obviously wrong from a glance. I=E2=80=99m very busy = recently but I=E2=80=99ll have some time this week to look into this. = Sorry for the delay :-) >=20 >>> Yuan >=20 >> Upon closer inspection, I think this is caused by a recent change in = c-ts-mode font-lock rules, in 014aab9847a0d3d898cb8cbc7224143f2d741abb. >=20 >> Alan, could you do this: don=E2=80=99t upgrade your c++ grammar and = try this patch, if I was right it should fix your problem. Thanks! >=20 > I updated my emacs-30 branch, checked that that commit was included, = and > rebuilt it. The problem still exists on my copy of Emacs 30. :-( No no I mean apply the attached patch and see if it fixes the problem. = The commit hash I mentioned is the source of the bug, not the fix ;-) Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 22:20:29 2024 Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 02:20:29 +0000 Received: from localhost ([127.0.0.1]:42029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1si2rl-0003V8-3j for submit@debbugs.gnu.org; Sat, 24 Aug 2024 22:20:29 -0400 Received: from mail.muc.de ([193.149.48.3]:41515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1si2rg-0003Un-RT for 64830@debbugs.gnu.org; Sat, 24 Aug 2024 22:20:27 -0400 Received: (qmail 90407 invoked by uid 3782); 25 Aug 2024 04:19:29 +0200 Received: from muc.de (p4fe152fc.dip0.t-ipconnect.de [79.225.82.252]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 25 Aug 2024 04:19:28 +0200 Received: (qmail 4822 invoked by uid 1000); 25 Aug 2024 02:19:28 -0000 Date: Sun, 25 Aug 2024 02:19:28 +0000 To: Yuan Fu Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, 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: -1.0 (-) Hello, Yuan. On Sat, Aug 24, 2024 at 13:43:25 -0700, Yuan Fu wrote: > > On Aug 24, 2024, at 12:38 PM, Alan Mackenzie wrote: > > On Sat, Aug 24, 2024 at 11:35:36 -0700, Yuan Fu wrote: > >>> On Aug 19, 2024, at 8:46 PM, Yuan Fu wrote: > >>>> On Aug 16, 2024, at 11:27 AM, Eli Zaretskii wrote: > >>>>> Date: Fri, 16 Aug 2024 18:06:31 +0000 > >>>>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de > >>>>> From: Alan Mackenzie > >>>>>> Maybe your Emacs 30 build is old? > >>>>> No. I updated it on Wednesday, the most recent commit I have being: > >>>>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, > >>>>> origin/emacs-30) > >>>>> Author: Eli Zaretskii > >>>>> Date: Wed Aug 14 11:35:48 2024 +0300 > >>>>> Improve documentation of time-parsing functions > >>>>> .. I will update it right now and retry .... > >>>>> ..... DONE. It makes no difference. I don't understand either > >>>>> why I see this bug and you don't. > >>>> Maybe try updating the C++ grammar library? > >>>> Yuan, any ideas? > >>> Nothing obviously wrong from a glance. I’m very busy recently but > >>> I’ll have some time this week to look into this. Sorry for the > >>> delay :-) > >>> Yuan > >> Upon closer inspection, I think this is caused by a recent change in > >> c-ts-mode font-lock rules, in > >> 014aab9847a0d3d898cb8cbc7224143f2d741abb. > >> Alan, could you do this: don’t upgrade your c++ grammar and try this > >> patch, if I was right it should fix your problem. Thanks! > > I updated my emacs-30 branch, checked that that commit was included, > > and rebuilt it. The problem still exists on my copy of Emacs 30. > > :-( > No no I mean apply the attached patch and see if it fixes the problem. > The commit hash I mentioned is the source of the bug, not the fix ;-) Sorry about the misunderstanding. I've now applied your patch, the one whose first hunk's header is: @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher , but it unfortunately doesn't solve the bug. On templates-21.cc, one of the test files from CC Mode, on doing M-x c++-ts-mode, there is no fontification at all. In *Messages* we have Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") That "Node type error at" 677 isn't a buffer position - the buffer is only 325 characters long. Is there anything else I could do to help, here? > Yuan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 00:55:48 2024 Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 04:55:48 +0000 Received: from localhost ([127.0.0.1]:42064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1si5I3-0007ov-R3 for submit@debbugs.gnu.org; Sun, 25 Aug 2024 00:55:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1si5I1-0007oe-3J for 64830@debbugs.gnu.org; Sun, 25 Aug 2024 00:55:46 -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 1si5H4-0006uK-I1; Sun, 25 Aug 2024 00:54:49 -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=1V8RG4WaPsK0u64RAg+5RsnWcHu6JiN9aQ/EtyWzKHw=; b=gNgNJRJkz5J6 g0AVFrA2+eQuq5k14gYSz8Ik7AaWA1NZihoilp9vyGEIw4aAkBKMtMHjyCwlql0AdS/+UMmOFQqb8 WjA2InaLJWG5lX0OPEzfrUav+deXhRU9JocQeIh0JMbJ9dIdCFW5qBdAlFOGR5YawrukArl5hc39H YwrFe7Zc+LxcZwpDu6C7gOWsbYSIv0vNlTXcS2NWb0MSca7sYW/nTNlxkLWhM59YP6VoQwuk9eGYa f/sUGObgupL82RX6EcxzzY/lhUw9N39aOvNK3nzKJDcSfMt7PKZNtjamylPmk4UAKU3nOWfVmvdg7 q3iNsFWcpzZfnwTE8v9KzA==; Date: Sun, 25 Aug 2024 07:54:43 +0300 Message-Id: <86a5h1mcbw.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Sun, 25 Aug 2024 02:19:28 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Sun, 25 Aug 2024 02:19:28 +0000 > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > From: Alan Mackenzie > > I've now applied your patch, the one whose first hunk's header is: > > @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher > > , but it unfortunately doesn't solve the bug. On templates-21.cc, one of > the test files from CC Mode, on doing M-x c++-ts-mode, there is no > fontification at all. In *Messages* we have > > Error during redisplay: (jit-lock-function 1) signaled > (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" \"xor_eq\"] > @font-lock-keyword-face (auto) @font-lock-keyword-face (this) > @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the > query with `treesit-query-validate'") > > That "Node type error at" 677 isn't a buffer position - the buffer is > only 325 characters long. > > Is there anything else I could do to help, here? AFAIR, you still didn't respond to my questions about the version of the C++ grammar library you are using, nor tried to upgrade to the latest version of that grammar library. FTR, I'm using tree-sitter version 0.20.8 and grammar library from their Git repository as of June 17 (this is version 0.22.2 of the grammar library with a couple of changes after that version). I have no problems with displaying C++ files whatsoever, and *Messages* is clean. I also tried the latest version of the grammar library (0.22.3), and didn't see any problems there, either. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 08:09:33 2024 Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 12:09:33 +0000 Received: from localhost ([127.0.0.1]:42316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siC3p-0003fT-6X for submit@debbugs.gnu.org; Sun, 25 Aug 2024 08:09:33 -0400 Received: from mail.muc.de ([193.149.48.3]:45345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siC3n-0003fB-1K for 64830@debbugs.gnu.org; Sun, 25 Aug 2024 08:09:32 -0400 Received: (qmail 55020 invoked by uid 3782); 25 Aug 2024 14:08:34 +0200 Received: from muc.de (p4fe152fc.dip0.t-ipconnect.de [79.225.82.252]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 25 Aug 2024 14:08:34 +0200 Received: (qmail 17022 invoked by uid 1000); 25 Aug 2024 12:08:33 -0000 Date: Sun, 25 Aug 2024 12:08:33 +0000 To: Eli Zaretskii Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <86a5h1mcbw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86a5h1mcbw.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (-) Hello, Eli. On Sun, Aug 25, 2024 at 07:54:43 +0300, Eli Zaretskii wrote: > > Date: Sun, 25 Aug 2024 02:19:28 +0000 > > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > > From: Alan Mackenzie > > I've now applied your patch, the one whose first hunk's header is: > > @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher > > , but it unfortunately doesn't solve the bug. On templates-21.cc, one of > > the test files from CC Mode, on doing M-x c++-ts-mode, there is no > > fontification at all. In *Messages* we have > > Error during redisplay: (jit-lock-function 1) signaled > > (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" \"xor_eq\"] > > @font-lock-keyword-face (auto) @font-lock-keyword-face (this) > > @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the > > query with `treesit-query-validate'") > > That "Node type error at" 677 isn't a buffer position - the buffer is > > only 325 characters long. > > Is there anything else I could do to help, here? > AFAIR, you still didn't respond to my questions about the version of > the C++ grammar library you are using, nor tried to upgrade to the > latest version of that grammar library. I thought I said that right at the beginning, in my first post on this thread. I'm using tree-sitter-cpp version 0.22.2, and version 0.22.6 of tree-sitter itself. > FTR, I'm using tree-sitter version 0.20.8 and grammar library from > their Git repository as of June 17 (this is version 0.22.2 of the > grammar library with a couple of changes after that version). I have > no problems with displaying C++ files whatsoever, and *Messages* is > clean. I also tried the latest version of the grammar library > (0.22.3), and didn't see any problems there, either. I haven't been able to find a download facility on the tree-sitter-cpp page at Github. Did you download a ready built version of tree-sitter-cpp 0.22.3, or did you have to build it yourself from sources? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 08:20:17 2024 Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 12:20:17 +0000 Received: from localhost ([127.0.0.1]:42343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siCEC-0003xa-Om for submit@debbugs.gnu.org; Sun, 25 Aug 2024 08:20:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siCEA-0003xK-MF for 64830@debbugs.gnu.org; Sun, 25 Aug 2024 08:20:15 -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 1siCBA-0003s5-3B; Sun, 25 Aug 2024 08:17:08 -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=e62XGH0CsQjMU673kEvI9Frf/VzO2fsuRE3IyII04vg=; b=OmFvcMnOUIqS EXLhN50U/05hrDO0uDIwPwiRiPE13w9nptL7l5m2r6/YH/qZwpDYCRlvOnlKVgq/ZMcXTr6KJWhkZ 7dY8cQForG8rc1jzIe7ItNlQW8QURtXIjQrBvq3DHt9vxTISqwDCK9nIEIFRs7Cga/uZVQwimUI2I jXrqM/pAiW+QxoEq3h+tq5EEKaJjbdTymk9R9kQcxX5CzIlLxt92+x0JlxzCRNv4HXMs5KkTwnf1O ZT/tvFMykpa6Q2/3Ntic/TClUWfSQcZZ/dloiyhUwXkui0pmxMSZm+WYXJ0feu3MV0LSJOQTMuXdS TWgwi6n6ugJ6c/rYreyYCg==; Date: Sun, 25 Aug 2024 15:17:05 +0300 Message-Id: <86frqslrum.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Sun, 25 Aug 2024 12:08:33 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <86a5h1mcbw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Sun, 25 Aug 2024 12:08:33 +0000 > Cc: casouri@gmail.com, 64830@debbugs.gnu.org > From: Alan Mackenzie > > > FTR, I'm using tree-sitter version 0.20.8 and grammar library from > > their Git repository as of June 17 (this is version 0.22.2 of the > > grammar library with a couple of changes after that version). I have > > no problems with displaying C++ files whatsoever, and *Messages* is > > clean. I also tried the latest version of the grammar library > > (0.22.3), and didn't see any problems there, either. > > I haven't been able to find a download facility on the tree-sitter-cpp > page at Github. Did you download a ready built version of > tree-sitter-cpp 0.22.3, or did you have to build it yourself from > sources? The latter. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 18:42:43 2024 Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 22:42:43 +0000 Received: from localhost ([127.0.0.1]:43427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siLwY-0005H0-R8 for submit@debbugs.gnu.org; Sun, 25 Aug 2024 18:42:43 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:55688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siLwW-0005Gl-4J for 64830@debbugs.gnu.org; Sun, 25 Aug 2024 18:42:41 -0400 Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2d60f48a2ccso3056433a91.3 for <64830@debbugs.gnu.org>; Sun, 25 Aug 2024 15:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724625644; x=1725230444; 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=hYBQVTW3+XOpIo/edszHV+VUwgS/EkrUCrQWoy+sP0Q=; b=TgJ5j07upTULFGj+bXLfo5KCgUg5SaO2KpMcZJ4Qqfj1LKFA05aC2jIQ3zhnWtAkUa l6x/wd7Re4M+urCe/JJKgsWVkrCXBzQ7lLH9OQbF/kdMjVDm8DymMrG3LezwVmRQHi/j r+iTVHJm/qhtpy+8bOE8zkzcMzTxE2+L+ziWcDSemlmHKIJIvk8CyVwP8VspCUY4k5G9 cFOn4fWcv/DXAQfQKUGkUzMAX3fQs3VbHAPeojvsj3HSC/k3eKC2mr/7+pKVwY+Hr2wT GfkOgBgc+GkeNTYw67mmSt2kMp1UCs+SqAaBv9hHS2mCcpxGqSfqsS7jScZF3flHyCT3 UXXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724625644; x=1725230444; 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=hYBQVTW3+XOpIo/edszHV+VUwgS/EkrUCrQWoy+sP0Q=; b=wWIPnuCr2usE7NnwH16mMp6u+ewLMLbbOaya2KzCFfI4qUOCcR99/PyE2+tseb0SqQ VY2gg3T1OAd+FsntLEkOuzyOQLPVjUpvwIhKdmbuSIeO096qE8pRwebJVYwVnAgO/rDY jVfOKJnqYF54kEAr1vRfIjtFObO57V6O3p6W21NB3KcVMWe9QwHj0oM3sXe2AqzdY/P7 0++18ZXI0cdMLOra2RV7DOBVCfDLW5qkf4ILtPjhbnHlgoXjZpjnn3coI5d+8QILI8Qz cYM2BVtKACiwFsYAFbZ50bhUGFjukja65G4/zZOFSME0BHzowKzpcTuM1xwfpzZ5PQIE TTVA== X-Forwarded-Encrypted: i=1; AJvYcCXb1wmZA+8zKvvJLP9E3bXoBhg/pXotpq7RiR8C8RzROJP3R1jnzUSCUW+FdNoMPOYnr5WjfQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxv/s7mBeMSKqIjxC1DfclIDCV0pbAyvkll7hePqoXTRn26zdPF i9j7mBgMFJ61bsDlKni8n65rw/EBegQmX+dS05YMVzoJNTMmfiFl X-Google-Smtp-Source: AGHT+IH47ijBhq1J/kF1ME2n3o/WgvoZzaoSaRVxNBmQriQnPEaBwtvCJaiZ3Ts7EOOxDkf7EtJUzA== X-Received: by 2002:a17:90a:8983:b0:2cb:4f14:2a70 with SMTP id 98e67ed59e1d1-2d646d2483amr9133190a91.30.1724625643468; Sun, 25 Aug 2024 15:40:43 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:3470:5bab:363c:9aa2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d613af1879sm8306326a91.46.2024.08.25.15.40.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Aug 2024 15:40:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration From: Yuan Fu In-Reply-To: Date: Sun, 25 Aug 2024 15:40:31 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <868qwy8ii9.fsf@gnu.org> <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> To: Alan Mackenzie X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, 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: -1.0 (-) > On Aug 24, 2024, at 7:19=E2=80=AFPM, Alan Mackenzie = wrote: >=20 > Hello, Yuan. >=20 > On Sat, Aug 24, 2024 at 13:43:25 -0700, Yuan Fu wrote: >=20 >=20 >>> On Aug 24, 2024, at 12:38=E2=80=AFPM, Alan Mackenzie = wrote: >>> On Sat, Aug 24, 2024 at 11:35:36 -0700, Yuan Fu wrote: >>>>> On Aug 19, 2024, at 8:46=E2=80=AFPM, Yuan Fu = wrote: >>>>>> On Aug 16, 2024, at 11:27=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >>>>>>> Date: Fri, 16 Aug 2024 18:06:31 +0000 >>>>>>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de >>>>>>> From: Alan Mackenzie >=20 >>>>>>>> Maybe your Emacs 30 build is old? >=20 >>>>>>> No. I updated it on Wednesday, the most recent commit I have = being: >=20 >>>>>>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> = emacs-30, >>>>>>> origin/emacs-30) >>>>>>> Author: Eli Zaretskii >>>>>>> Date: Wed Aug 14 11:35:48 2024 +0300 >=20 >>>>>>> Improve documentation of time-parsing functions >=20 >>>>>>> .. I will update it right now and retry .... >=20 >>>>>>> ..... DONE. It makes no difference. I don't understand either >>>>>>> why I see this bug and you don't. >=20 >>>>>> Maybe try updating the C++ grammar library? >=20 >>>>>> Yuan, any ideas? >=20 >>>>> Nothing obviously wrong from a glance. I=E2=80=99m very busy = recently but >>>>> I=E2=80=99ll have some time this week to look into this. Sorry for = the >>>>> delay :-) >=20 >>>>> Yuan >=20 >>>> Upon closer inspection, I think this is caused by a recent change = in >>>> c-ts-mode font-lock rules, in >>>> 014aab9847a0d3d898cb8cbc7224143f2d741abb. >=20 >>>> Alan, could you do this: don=E2=80=99t upgrade your c++ grammar and = try this >>>> patch, if I was right it should fix your problem. Thanks! >=20 >>> I updated my emacs-30 branch, checked that that commit was included, >>> and rebuilt it. The problem still exists on my copy of Emacs 30. >>> :-( >=20 >> No no I mean apply the attached patch and see if it fixes the = problem. >> The commit hash I mentioned is the source of the bug, not the fix ;-) >=20 > Sorry about the misunderstanding. >=20 > I've now applied your patch, the one whose first hunk's header is: >=20 > @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher >=20 > , but it unfortunately doesn't solve the bug. On templates-21.cc, one = of > the test files from CC Mode, on doing M-x c++-ts-mode, there is no > fontification at all. In *Messages* we have >=20 > Error during redisplay: (jit-lock-function 1) signaled > (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" = \"xor_eq\"] > @font-lock-keyword-face (auto) @font-lock-keyword-face (this) > @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the > query with `treesit-query-validate'") >=20 > That "Node type error at" 677 isn't a buffer position - the buffer is > only 325 characters long. >=20 > Is there anything else I could do to help, here? Yes, could you try evaluating this three forms, and tell me their = result? (treesit-query-validate 'cpp '("virtual" @cap)) (treesit-query-validate 'cpp '((virtual) @cap)) (treesit-query-validate 'cpp '((auto) @font-lock-keyword-face (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face)) To give more context, in the error you see, position 677 is a position = in the query string, which points to the (virtual) part. That leads me = to believe your grammar doesn=E2=80=99t recognize the (virtual) query. = So in the patch I provided earlier, I added a function that tests = whether the grammar recognizes (virtual), and if not, it uses the = =E2=80=9Cvirtual=E2=80=9D query instead. The difference between = (virtual) and =E2=80=9Cvirtual=E2=80=9D in the query is that (virtual) = is a named node, and =E2=80=9Cvirtual=E2=80=9D is a keyword. I=E2=80=99m still not sure why you have this problem though, because I = built libtree-sitter-cpp v0.22.2 and v0.22.0 and tested them locally, = and they recognize (virtual) just fine. Anyway, evaluating those three = forms will tell us what=E2=80=99s going on. And to your question for building tree-sitter grammar, you can use the = script at https://github.com/casouri/tree-sitter-module You can either run ./batch to build all the languages, or run ./build = cpp to only build for cpp. Then just copy the grammar file in dist to = ~/.emacs.d/tree-sitter. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 13:26:40 2024 Received: (at 64830) by debbugs.gnu.org; 26 Aug 2024 17:26:40 +0000 Received: from localhost ([127.0.0.1]:45137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sidUC-00047H-B9 for submit@debbugs.gnu.org; Mon, 26 Aug 2024 13:26:40 -0400 Received: from mail.muc.de ([193.149.48.3]:37595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sidU9-00046z-AB for 64830@debbugs.gnu.org; Mon, 26 Aug 2024 13:26:34 -0400 Received: (qmail 46095 invoked by uid 3782); 26 Aug 2024 19:25:35 +0200 Received: from muc.de (p4fe156b1.dip0.t-ipconnect.de [79.225.86.177]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 26 Aug 2024 19:25:35 +0200 Received: (qmail 5543 invoked by uid 1000); 26 Aug 2024 17:25:34 -0000 Date: Mon, 26 Aug 2024 17:25:34 +0000 To: Yuan Fu Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, 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: -1.0 (-) Hello, Yuan. On Sun, Aug 25, 2024 at 15:40:31 -0700, Yuan Fu wrote: > > On Aug 24, 2024, at 7:19 PM, Alan Mackenzie wrote: > > Hello, Yuan. > > On Sat, Aug 24, 2024 at 13:43:25 -0700, Yuan Fu wrote: > >>> On Aug 24, 2024, at 12:38 PM, Alan Mackenzie wrote: > >>> On Sat, Aug 24, 2024 at 11:35:36 -0700, Yuan Fu wrote: > >>>>> On Aug 19, 2024, at 8:46 PM, Yuan Fu wrote: > >>>>>> On Aug 16, 2024, at 11:27 AM, Eli Zaretskii wrote: > >>>>>>> Date: Fri, 16 Aug 2024 18:06:31 +0000 > >>>>>>> Cc: 64830@debbugs.gnu.org, casouri@gmail.com, acm@muc.de > >>>>>>> From: Alan Mackenzie > >>>>>>>> Maybe your Emacs 30 build is old? > >>>>>>> No. I updated it on Wednesday, the most recent commit I have being: > >>>>>>> commit 9bedb957bebdca99b1bb96f58ea790e20ed48dee (HEAD -> emacs-30, > >>>>>>> origin/emacs-30) > >>>>>>> Author: Eli Zaretskii > >>>>>>> Date: Wed Aug 14 11:35:48 2024 +0300 > >>>>>>> Improve documentation of time-parsing functions > >>>>>>> .. I will update it right now and retry .... > >>>>>>> ..... DONE. It makes no difference. I don't understand either > >>>>>>> why I see this bug and you don't. > >>>>>> Maybe try updating the C++ grammar library? > >>>>>> Yuan, any ideas? > >>>>> Nothing obviously wrong from a glance. I’m very busy recently but > >>>>> I’ll have some time this week to look into this. Sorry for the > >>>>> delay :-) > >>>>> Yuan > >>>> Upon closer inspection, I think this is caused by a recent change in > >>>> c-ts-mode font-lock rules, in > >>>> 014aab9847a0d3d898cb8cbc7224143f2d741abb. > >>>> Alan, could you do this: don’t upgrade your c++ grammar and try this > >>>> patch, if I was right it should fix your problem. Thanks! > >>> I updated my emacs-30 branch, checked that that commit was included, > >>> and rebuilt it. The problem still exists on my copy of Emacs 30. > >>> :-( > >> No no I mean apply the attached patch and see if it fixes the problem. > >> The commit hash I mentioned is the source of the bug, not the fix ;-) > > Sorry about the misunderstanding. > > I've now applied your patch, the one whose first hunk's header is: > > @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher > > , but it unfortunately doesn't solve the bug. On templates-21.cc, one of > > the test files from CC Mode, on doing M-x c++-ts-mode, there is no > > fontification at all. In *Messages* we have > > Error during redisplay: (jit-lock-function 1) signaled > > (treesit-query-error "Node type error at" 677 "[\"_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\" \"xor\" \"xor_eq\"] > > @font-lock-keyword-face (auto) @font-lock-keyword-face (this) > > @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the > > query with `treesit-query-validate'") > > That "Node type error at" 677 isn't a buffer position - the buffer is > > only 325 characters long. > > Is there anything else I could do to help, here? > Yes, could you try evaluating this three forms, and tell me their result? Done. But see below, first! > (treesit-query-validate 'cpp '("virtual" @cap)) "QUERY is valid" > (treesit-query-validate 'cpp '((virtual) @cap)) In *Tree-Sitter check query*, I got: Node type error at: 2 (virtual) @cap In the reponse area, I got: t .. > (treesit-query-validate 'cpp '((auto) @font-lock-keyword-face > (this) @font-lock-keyword-face > (virtual) @font-lock-keyword-face)) In *Tree-Sitter check query*, I got: Node type error at: 64 (auto) @font-lock-keyword-face (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face , and again in the response area: t .. > To give more context, in the error you see, position 677 is a position > in the query string, which points to the (virtual) part. That leads me > to believe your grammar doesn’t recognize the (virtual) query. So in > the patch I provided earlier, I added a function that tests whether the > grammar recognizes (virtual), and if not, it uses the “virtual” query > instead. The difference between (virtual) and “virtual” in the query is > that (virtual) is a named node, and “virtual” is a keyword. > I’m still not sure why you have this problem though, because I built > libtree-sitter-cpp v0.22.2 and v0.22.0 and tested them locally, and > they recognize (virtual) just fine. Anyway, evaluating those three > forms will tell us what’s going on. I downloaded my libtree-sitter-cpp.so.0.14 from my GNU/Linux distribution, Gentoo. It regards itself as dev-libs/tree-sitter-cpp version 0.22.2. Might it be worthwhile adding some functionality to Emacs whereby a user could check which versions of grammar libraries she's got? Or is there something like that already? > And to your question for building tree-sitter grammar, you can use the > script at https://github.com/casouri/tree-sitter-module > You can either run ./batch to build all the languages, or run ./build > cpp to only build for cpp. Then just copy the grammar file in dist to > ~/.emacs.d/tree-sitter. Ah, that's it! I didn't know the grammar library in use was the one in ~/.emacs/tree-sitter. There, I've got -rwxr-xr-x 1 acm acm 2319888 Jan 19 2023 libtree-sitter-cpp.so , which is very old. In my /usr/lib64, I've got lrwxrwxrwx 1 root root 26 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0 -> libtree-sitter-cpp.so.0.14 lrwxrwxrwx 1 root root 23 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so -> libtree-sitter-cpp.so.0 -rwxr-xr-x 1 root root 3175712 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0.14 Why do we have this extra complication with ~/.emacs.d/tree-sitter as a location for libraries? In GNU/Linux distributions (well, in Gentoo at any rate), newly downloaded libraries are put into /usr/lib64, so that anybody naively updating a grammar library is going to have it masked out by the old one still in ~/.emacs.d/tree-sitter. Maybe I don't understand the library mechanism as well as I ought to. > Yuan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 13:54:13 2024 Received: (at 64830) by debbugs.gnu.org; 26 Aug 2024 17:54:13 +0000 Received: from localhost ([127.0.0.1]:45179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siduv-0004r7-3P for submit@debbugs.gnu.org; Mon, 26 Aug 2024 13:54:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sidus-0004qr-Cx for 64830@debbugs.gnu.org; Mon, 26 Aug 2024 13:54:11 -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 1sidrr-00041W-ND; Mon, 26 Aug 2024 13:51:03 -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=/lMtW2h9RO7M5GksBBHkSdI88giamA0ZSBG6McaUjG0=; b=p/qmuPEyZ0Uf ZbK2lyUuygZKOcHfr7OdMTUbaOHUhnNZ5SKCdY9gxnUNuqy7mz+/b2/mCdvn0OzcUn6MQwTLzwsaK dKo0NPBnOfzEW+g/f5ZQLhU+SbwgcVzOKKIQXRa9rbtTvqnoUP+04jiO9Q9AzSM/EcIbXKuAZOz84 kaur7TExDTHSAPCLw4Of8vo/JgpwmXP4+qiRlz+R3ovGCkpxM2bp7Au36brGVqDAxjcfpZcBQw3ci OqhuzqFaMsVr9eQ4poIUk42w0XFH4V35JzkI+mDIshkt6OGRXTlhW8Ee2aVpADolOLLKJe2RuEZI8 +K0indQ+vteXKG6pkZtN4g==; Date: Mon, 26 Aug 2024 20:51:00 +0300 Message-Id: <868qwjjhq3.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Mon, 26 Aug 2024 17:25:34 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Mon, 26 Aug 2024 17:25:34 +0000 > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > From: Alan Mackenzie > > Ah, that's it! I didn't know the grammar library in use was the one in > ~/.emacs/tree-sitter. There, I've got > > -rwxr-xr-x 1 acm acm 2319888 Jan 19 2023 libtree-sitter-cpp.so > > , which is very old. In my /usr/lib64, I've got > > lrwxrwxrwx 1 root root 26 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0 -> libtree-sitter-cpp.so.0.14 > lrwxrwxrwx 1 root root 23 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so -> libtree-sitter-cpp.so.0 > -rwxr-xr-x 1 root root 3175712 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0.14 > > Why do we have this extra complication with ~/.emacs.d/tree-sitter as a > location for libraries? In GNU/Linux distributions (well, in Gentoo at > any rate), newly downloaded libraries are put into /usr/lib64, so that > anybody naively updating a grammar library is going to have it masked out > by the old one still in ~/.emacs.d/tree-sitter. Maybe I don't understand > the library mechanism as well as I ought to. We support grammar libraries in ~/.emacs.d/tree-sitter so that users could easily install versions of grammar libraries different from what their sysadmins decide to install. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 15:51:44 2024 Received: (at 64830) by debbugs.gnu.org; 26 Aug 2024 19:51:44 +0000 Received: from localhost ([127.0.0.1]:45261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sifke-0007xK-FP for submit@debbugs.gnu.org; Mon, 26 Aug 2024 15:51:44 -0400 Received: from mail.muc.de ([193.149.48.3]:16591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sifkc-0007x5-JH for 64830@debbugs.gnu.org; Mon, 26 Aug 2024 15:51:43 -0400 Received: (qmail 10624 invoked by uid 3782); 26 Aug 2024 21:50:44 +0200 Received: from muc.de (p4fe156b1.dip0.t-ipconnect.de [79.225.86.177]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 26 Aug 2024 21:50:43 +0200 Received: (qmail 9765 invoked by uid 1000); 26 Aug 2024 19:50:43 -0000 Date: Mon, 26 Aug 2024 19:50:43 +0000 To: Eli Zaretskii Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Message-ID: References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <868qwjjhq3.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (-) Hello, Eli. On Mon, Aug 26, 2024 at 20:51:00 +0300, Eli Zaretskii wrote: > > Date: Mon, 26 Aug 2024 17:25:34 +0000 > > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > > From: Alan Mackenzie > > Ah, that's it! I didn't know the grammar library in use was the one in > > ~/.emacs/tree-sitter. There, I've got > > -rwxr-xr-x 1 acm acm 2319888 Jan 19 2023 libtree-sitter-cpp.so > > , which is very old. In my /usr/lib64, I've got > > lrwxrwxrwx 1 root root 26 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0 -> libtree-sitter-cpp.so.0.14 > > lrwxrwxrwx 1 root root 23 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so -> libtree-sitter-cpp.so.0 > > -rwxr-xr-x 1 root root 3175712 Aug 4 18:13 /usr/lib64/libtree-sitter-cpp.so.0.14 > > Why do we have this extra complication with ~/.emacs.d/tree-sitter as a > > location for libraries? In GNU/Linux distributions (well, in Gentoo at > > any rate), newly downloaded libraries are put into /usr/lib64, so that > > anybody naively updating a grammar library is going to have it masked out > > by the old one still in ~/.emacs.d/tree-sitter. Maybe I don't understand > > the library mechanism as well as I ought to. > We support grammar libraries in ~/.emacs.d/tree-sitter so that users > could easily install versions of grammar libraries different from what > their sysadmins decide to install. Ah, OK. Seems like a good reason. How about outputting a message looking something like this: Loading /home/acm/.emacs.d/tree-sitter/libtree-sitter.so ....Done .. This wouldn't get in the way, yet might well prevent some of the problems I've been having over the last few days. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 18:27:31 2024 Received: (at 64830) by debbugs.gnu.org; 26 Aug 2024 22:27:31 +0000 Received: from localhost ([127.0.0.1]:45377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siiBP-0003fZ-AR for submit@debbugs.gnu.org; Mon, 26 Aug 2024 18:27:31 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:44362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siiBN-0003fM-5o for 64830@debbugs.gnu.org; Mon, 26 Aug 2024 18:27:30 -0400 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5bed0a2ae0fso6088299a12.1 for <64830@debbugs.gnu.org>; Mon, 26 Aug 2024 15:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724711131; x=1725315931; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=rciLFLiWhvf2QzgO/yKXXgwK9ugoGmHuTba1mIPiMpE=; b=Z7oP52Ev/M8V22P0KY69Uaa2wZbTgebYhruQ2qbpQXdOGWQpJuSSHboTAXvicPpjhR aYkvzDLFCfR43hio8HSblYorPY73M7EMKL6kVo6mi/yelbYpIvAdJWR2FskNl3/EZyYV PcTR57AKjcDQM/lChwzgKCfmFwS8rkS3R1ZZV+9FL+2noj350xZmsbcJTLSQzR7C8evC mYkrAJeHs/UcbyBSvooJ1u8Io9mC6WlTNulRiWyOWx2fduGTiMNcnTej5Ll5gClbby7c zqw6KzNRKQ7bsEnMEL/K1JrsQceLpRRNki4mTrjDuKtQiA9WwBICbRRQCfGPPtu89ItV PLSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724711131; x=1725315931; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rciLFLiWhvf2QzgO/yKXXgwK9ugoGmHuTba1mIPiMpE=; b=u2jTQAYib5mU1hDPkEXEjkIvvLPJKgzJvbWhEemDxtDJIlRvq8YzVjHAPFz5zpx2zl ChFfDKt8TdcFdQ6ioFuYolQOEb5YzYyjK4nwueOTnbsNlacTUZ2f7yAtrcc68QQCQ2B+ z23yx+DGiSNHYCgxu5sbQfxoLe2VJwEWtb6Qu0HgtGqOI6mszmMmwWTLKqc3XGe+LEP5 4jGQG2Xa6N4VIrG/HPjmAVbCuA+XuWA3OUf4J45Xi+hxe+MSn81HA1GjE5zFejDqFD8r 4DjghahAViyPo2Wv4Y90hZsdOCxFpEtovbbyPIu35sffPN5XBDfiKf5wpJlmtXKqIeAz G9MQ== X-Gm-Message-State: AOJu0YwksGmmdElU8HfFqNwYd7R3KTy41fG2ciWNQexVEp8K3JAfkLhj s45OJDMPSyaX7k2YkgD7tsATuBxYNNCO+SR8hidP+9CF1NTdovyyXVwGTQOPp//RIhgP/QfxvZV 0VUJp24zTeZQ/ZFENUXDTeYMbmxI= X-Google-Smtp-Source: AGHT+IGS/0bxO/BdDf7R1TtgDVlaPp4XYcp6Oc31wn6AHmYAsS7N2rg4rmw0M8z2s40qXrCEyrSQtWo0Kbbxkq8Q+R4= X-Received: by 2002:a05:6402:84e:b0:5a1:369b:bb61 with SMTP id 4fb4d7f45d1cf-5c0891aa56amr7230475a12.36.1724711131163; Mon, 26 Aug 2024 15:25:31 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 26 Aug 2024 22:25:29 +0000 From: Stefan Kangas In-Reply-To: References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> MIME-Version: 1.0 Date: Mon, 26 Aug 2024 22:25:29 +0000 Message-ID: Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration To: Alan Mackenzie , Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (-) Alan Mackenzie writes: > How about outputting a message looking something like this: > > Loading /home/acm/.emacs.d/tree-sitter/libtree-sitter.so ....Done > > .. This wouldn't get in the way, yet might well prevent some of the > problems I've been having over the last few days. Makes sense to me, FWIW. Perhaps we should have a knob to enable/disable such messages though. I'm also not sure what should be the default. Perhaps we should experiment with it and take a final decision when we have some experience with using it. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 22:00:25 2024 Received: (at 64830) by debbugs.gnu.org; 27 Aug 2024 02:00:25 +0000 Received: from localhost ([127.0.0.1]:45733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1silVR-0001Lg-F2 for submit@debbugs.gnu.org; Mon, 26 Aug 2024 22:00:25 -0400 Received: from mail-oo1-f49.google.com ([209.85.161.49]:60720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1silVP-0001LR-L5 for 64830@debbugs.gnu.org; Mon, 26 Aug 2024 22:00:24 -0400 Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5d5e97b84fbso4039834eaf.1 for <64830@debbugs.gnu.org>; Mon, 26 Aug 2024 18:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724723906; x=1725328706; 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=E73IhUyKngN79UO2Igq+GXExlJZ10T57TUgLjiL9bhc=; b=JyXh4FfhfWFTsoAFG5sQ51+w+O1QPecLnq6A4qFrw7lENtgUXc7IPtAtnVnTZ0ckj7 xmQ+4f0amx3hLrDQQKz2519pV67ESrSHvMJqFGL5Apm5FOyZY+/fntJHBxEAbEvFF0IN 3gzUDKefj+T/3FipWGcu1/PQynmTXz/q2Zzd3e44nJU1yUrmugJWN27KAnwLQG4/6kIn IrtObYS4IcbtxBNe3w2re4IjCC0k/M0Jml6EHq1AikDPMWruC3OjiCiUtfUc2bwuNpwR ZEI7NkgNCqMR66L3W97ZWkNGI7dWQ31MbYlZKVGI2Ty2zcY3VLYW9qCDA5LasHflCpM5 H0pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724723906; x=1725328706; 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=E73IhUyKngN79UO2Igq+GXExlJZ10T57TUgLjiL9bhc=; b=d7Mm3j3JNEbbtjXCspHkCc52wQoqxEv6Fj2aGUWdBjtupfhjRgnwfbPHyxc8pmoeFj t7TjhDNKBkCTt1arTP3QwHDx1DP1CF9XGxGpv6LnH0u4uoENkDRdhY3Gqu3Iy4ku7xBf /DQ0MDz6nCFSXDtDIUwT2LswfByjXXlmvCmIyvPcFjfC5TEL3hdlcZg7hgi9FkS/FSKZ rATAJk59kd3plxbqw7Jkz7z8bFYsXBrolLvkk773yOg2ILCNDPc2Q1GDB3ux4RdMwKNI Nx40iT/scYRrul5rDVG/+GsTzioTojsARj9Va58/vmIj/ctG8dyMPyu0qFAa3RkXNnMQ S4Tw== X-Forwarded-Encrypted: i=1; AJvYcCX/k52g/w+PXLycKEmUsvpCoUowqpsre1mfHUGwga1pFqn1w4JQva3Ms9hnij77TmHvoFOlLw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxHizNuJWERYdzlomQzQ7rOM7B0DgInACDv7pJOcllC1o+0Zxid bMv3sKZubPzXIdYM+Alnix1B4TyDotuDAIuV72AzrofS5tKW8IfH X-Google-Smtp-Source: AGHT+IGfDIYY0LyOm5QMxcSB1vbYNJEzrOHOSkz5WJRq3IC79V6/SqkOMJ/b4iRyjheSDG6XQ6pyLQ== X-Received: by 2002:a05:6808:2dcb:b0:3d9:33d0:cc4b with SMTP id 5614622812f47-3def3e2c524mr1880988b6e.0.1724723905710; Mon, 26 Aug 2024 18:58:25 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:fd58:c8a8:ed8f:39fa]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9ad5528esm8304278a12.72.2024.08.26.18.58.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2024 18:58:25 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration From: Yuan Fu In-Reply-To: Date: Mon, 26 Aug 2024 18:58:13 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <78DD1528-A12B-4199-9822-157852080027@gmail.com> References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> To: Stefan Kangas X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, Alan Mackenzie , 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: -1.0 (-) > On Aug 26, 2024, at 3:25=E2=80=AFPM, Stefan Kangas = wrote: >=20 > Alan Mackenzie writes: >=20 >> How about outputting a message looking something like this: >>=20 >> Loading /home/acm/.emacs.d/tree-sitter/libtree-sitter.so ....Done >>=20 >> .. This wouldn't get in the way, yet might well prevent some of the >> problems I've been having over the last few days. >=20 > Makes sense to me, FWIW. Perhaps we should have a knob to > enable/disable such messages though. >=20 > I'm also not sure what should be the default. Perhaps we should > experiment with it and take a final decision when we have some > experience with using it. Yeah, that=E2=80=99ll be a very useful feature. To determining which = grammar my Emacs instance loaded, I had to delete the object file and = see if Emacs complains it can=E2=80=99t find any grammar. I think it=E2=80= =99s fine to print this to message buffer by default, it=E2=80=99ll only = happen once and we already do such things for loading a elisp file.=20 I searched a bit and it seems ldaddr can find the location of a loaded = shared library. Doesn=E2=80=99t seem hard to implement. I also want a lisp function that can return the location of a loaded = grammar file, would that be an overkill if we have the aforementioned = printing? Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 07:04:25 2024 Received: (at 64830) by debbugs.gnu.org; 27 Aug 2024 11:04:25 +0000 Received: from localhost ([127.0.0.1]:46115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sitzs-00080p-VA for submit@debbugs.gnu.org; Tue, 27 Aug 2024 07:04:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sitzq-00080Z-VP for 64830@debbugs.gnu.org; Tue, 27 Aug 2024 07:04:23 -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 1sityu-0007Ir-Go; Tue, 27 Aug 2024 07:03:24 -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=/gpCRmQF2PIc+yKJBMsPodcA5IzgDRqK7Au7qy1dWqw=; b=KuTOYEuKLcWV 5WZHryRmqkFChMavIHz2muao6BrO1oyY4pf5n1H7SkAjwA1yLZl4bJThAjc2Rngo/hEDe/7JiPXaW 4I9xnB7dUEb3p7mTvn8le9gcBOYNJ9JYyZkQpYPskmvEfwvxRfUGAlffC+tcnr0FqmPmqJF2Q3tCM S8fI4W541HYlHs+mKBEdHdJt11Nm65mHPk40/o0478BRwkoDUAtNHbnwsEMFxDGT66NF1gBtta3es j8dMWrb37heqfUXP+VsPa38/uhKq/mmycEuo8ccg2jzY1hpxAx4NV6zy4M7+ms7DzyourxRkaST8R YIjqHFLP8QD0evFGUyHcgg==; Date: Tue, 27 Aug 2024 14:03:22 +0300 Message-Id: <8634mqjkhx.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Mon, 26 Aug 2024 17:25:34 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Mon, 26 Aug 2024 17:25:34 +0000 > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > From: Alan Mackenzie > > Might it be worthwhile adding some functionality to Emacs whereby a user > could check which versions of grammar libraries she's got? Or is there > something like that already? Many (most?) grammar libraries don't have versions and don't make releases, so this would be tricky to implement. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 08:03:05 2024 Received: (at 64830) by debbugs.gnu.org; 27 Aug 2024 12:03:05 +0000 Received: from localhost ([127.0.0.1]:46178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siuuf-0001Ap-FN for submit@debbugs.gnu.org; Tue, 27 Aug 2024 08:03:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siuud-0001AK-9c for 64830@debbugs.gnu.org; Tue, 27 Aug 2024 08:03:04 -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 1siutg-0004eN-27; Tue, 27 Aug 2024 08:02:04 -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=oh9VTYwaBM3TJ+TkgUTrf3cs71fU79k+G6LeWgE7EK8=; b=expRjqfLdVyx aB+BzV3Ru1cDcy9YjtwmPHtiz/S3/UTo3Gzc9m7qYW7fH2eSMMOr6OUYcmD1Bc8ya01Fc6h1U9x83 V68RIQzmget0xa1MJYPeATfiT7QpgqWOvbSgeQiGYAcCa5nhPIkBLmZp9X9BGC+YNyXRSAMrH+jTB 59FWtYjTOAEzy8QRbnza1IEeFCaZEg3ntZ1PJ1CtehLjrldwGlheodB/HtfIcGA8Co+FUd0iRHmqN kN+KO3dl4SmQQ/N781V3CfXkONPX0yU8EO62Nn2HC8l3TWTrD7T/0YZwOY7rZQC7LHEleTJT8NgvH VoLLQ50WKpUNwrSOkeI70Q==; Date: Tue, 27 Aug 2024 15:01:59 +0300 Message-Id: <86y14ii37s.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Mon, 26 Aug 2024 19:50:43 +0000) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@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 (---) > Date: Mon, 26 Aug 2024 19:50:43 +0000 > Cc: casouri@gmail.com, 64830@debbugs.gnu.org > From: Alan Mackenzie > > > We support grammar libraries in ~/.emacs.d/tree-sitter so that users > > could easily install versions of grammar libraries different from what > > their sysadmins decide to install. > > Ah, OK. Seems like a good reason. > > How about outputting a message looking something like this: > > Loading /home/acm/.emacs.d/tree-sitter/libtree-sitter.so ....Done > > .. This wouldn't get in the way, yet might well prevent some of the > problems I've been having over the last few days. As a diagnostic tool, by default off, maybe. Annoying everyone with this message, when it will almost always be redundant, doesn't sound like TRT to me. And note that in the usual case, when the grammar library is loaded from a system-wide directory of shared libraries, Emacs doesn't even know the absolute file name of the library, just its base name. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 08:10:18 2024 Received: (at 64830) by debbugs.gnu.org; 27 Aug 2024 12:10:18 +0000 Received: from localhost ([127.0.0.1]:46191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siv1e-0001MO-7v for submit@debbugs.gnu.org; Tue, 27 Aug 2024 08:10:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siv1c-0001M9-K7 for 64830@debbugs.gnu.org; Tue, 27 Aug 2024 08:10:17 -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 1siv0f-0005PI-I0; Tue, 27 Aug 2024 08:09:18 -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=DF99/HvrelsCXDAwDb632bN7ye9NoW2kIp5kp5gHpi4=; b=qkBoPf84pFz2 7zFtX2YPZjymkZUX+uMKvyd1NhE0PgBMclOGl/r1gJ1b3K70wDwNX5jU1l2GsBgbBOT63SOnB4Hfp JEZdDreuxxTbOZQRvo6rAL9kVtzIUy5ThJOo2Af7RFmyBlzdHioW4vms5ImNv6B2zGHukXOZrs262 ApOZof1AH/FdCuCsJq6ZcRtNQn12wodsq+BCxN6f65dzP18u6TRBeq2PGR76SYBJHbXXn3Hy2UBFm QZ5VpEwHXR6umJ/tihuoBe9ZrByOSAnU3H1N7HjR03P0SS8QXr04pkDj11wLPcWdjgq9QA/HbrLGj 7Xl2LSmdDzJ4evsQoKxonw==; Date: Tue, 27 Aug 2024 15:09:14 +0300 Message-Id: <86wmk2i2vp.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <78DD1528-A12B-4199-9822-157852080027@gmail.com> (message from Yuan Fu on Mon, 26 Aug 2024 18:58:13 -0700) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@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: Yuan Fu > Date: Mon, 26 Aug 2024 18:58:13 -0700 > Cc: Alan Mackenzie , > Eli Zaretskii , > 64830@debbugs.gnu.org > > I also want a lisp function that can return the location of a loaded grammar file, would that be an overkill if we have the aforementioned printing? Where/when would such a function be used? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 01:39:03 2024 Received: (at 64830) by debbugs.gnu.org; 28 Aug 2024 05:39:03 +0000 Received: from localhost ([127.0.0.1]:48038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjBOZ-0007Nw-Gl for submit@debbugs.gnu.org; Wed, 28 Aug 2024 01:39:03 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:44492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjBOV-0007NM-Sr for 64830@debbugs.gnu.org; Wed, 28 Aug 2024 01:39:02 -0400 Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-714226888dfso5676761b3a.1 for <64830@debbugs.gnu.org>; Tue, 27 Aug 2024 22:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724823420; x=1725428220; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=+ttDfpdoKtFgYaQzueD4HDhu0PULQgyH02m01LXtXC0=; b=IbI1oWEmu5fFCCa8mSWXhkMQYmXUnUFA4YQ1b/IJJLtqOZkp5cbU/60EoX8J8JuUDk jvBu+7hs43liBtabrWgrdDwVrSQQHbVIob4JrHzeAXe+PTpCSnA4w8AMZK5wLknF3pqc T/u67uaf3RNkNhzohuocaJiUqtgZ+xivMsSC5iOARM+GLCQ203Vx6PktHRDfbXisMJ0q c2UYkZkBUch7ep0DpUnU0RWv9bgodAQ4PaLcahIo6/g3ywoV2NlcthzER1M+6dQyJEhS Ltz2+7bDz7xqLPLjxY1kQItAhtZZ1YrbASrEGADvXP14b+kFmc5w3tHiXa1f6Arq2pSu PRVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724823420; x=1725428220; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+ttDfpdoKtFgYaQzueD4HDhu0PULQgyH02m01LXtXC0=; b=Wu2XRdmqRSeMnFUn3PIYp9vcYbzuUgdMYC90MP7Ym1zvLdvF2hrquDrqPTOe1JSoaX J/kthqQF01ZpdsMqkxWMWAwsUM9bR2dHAVHeQMjLTsyH/ZLyzwvrtAfKM0gWGsjfIR2i hrU5GEW5/5LFFALm4GCCovdT28eGTIJfBp/k8et/eLFTzx1PIPQIKWNVElCRwN9AKM+h 9FMbjc/5dQFnTfPow5a2zDFnp+J0Ig+5cl8hSo7UxL2n/VVgC9WLGVKfWmBgnrS5vi1C 9+/iTv1ZquCbb+tRsEuFSYkaWt/g+/ssO7lg152MW0JyhcJcH/1LN+LJzFB6SslE2wm/ DHiA== X-Forwarded-Encrypted: i=1; AJvYcCU9h/cMSqkF5b3j9OZG3SMoTxjC6jHfFkynrQ7gfO4hlg3hF++MLyHRnsQ0n2pznNgF+FZvlA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzm6OaFyAWp2+XK1WjFo2H1J5sas53uHLFVjxgHo31zvLn2M4Gl Wx0GeaOFCtBi7Ah6pa3/48jnXhMkg7ZmQ8zpoQAGvvKaDV+MSI7X X-Google-Smtp-Source: AGHT+IE5Tg6YG9S3aQwXqybaBH9Px8mYrVCrqQqVS41Tzh7sbgFKopcrZ6Kq414Yz7MaKpyyfJtn5g== X-Received: by 2002:a05:6a21:a34c:b0:1c4:e0d3:9637 with SMTP id adf61e73a8af0-1cc8a084843mr19893631637.52.1724823420071; Tue, 27 Aug 2024 22:37:00 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:fd58:c8a8:ed8f:39fa]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d844619910sm622531a91.29.2024.08.27.22.36.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Aug 2024 22:36:58 -0700 (PDT) From: Yuan Fu Message-Id: <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_FB2050F0-2426-4505-98DF-FBF849D5E9CD" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Tue, 27 Aug 2024 22:36:46 -0700 In-Reply-To: <86wmk2i2vp.fsf@gnu.org> To: Eli Zaretskii References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, Alan Mackenzie , Stefan Kangas 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 (-) --Apple-Mail=_FB2050F0-2426-4505-98DF-FBF849D5E9CD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 27, 2024, at 5:09=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Mon, 26 Aug 2024 18:58:13 -0700 >> Cc: Alan Mackenzie , >> Eli Zaretskii , >> 64830@debbugs.gnu.org >>=20 >> I also want a lisp function that can return the location of a loaded = grammar file, would that be an overkill if we have the aforementioned = printing? >=20 > Where/when would such a function be used? For debugging. Eg, to verify that Emacs loaded the grammar file I think = it loaded. Something like (treesit-grammar-location 'c) ; =3D> = =E2=80=9C/opt/local/lib/libtree-sitter-c.dylib=E2=80=9D. Yuan --Apple-Mail=_FB2050F0-2426-4505-98DF-FBF849D5E9CD Content-Disposition: attachment; filename=show-location.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="show-location.patch" Content-Transfer-Encoding: quoted-printable =46rom=20c64dc3e287e3db009589fb27d07d658baca9fe66=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Tue,=20= 27=20Aug=202024=2022:31:42=20-0700=0ASubject:=20[PATCH]=20Add=20= Ftreesit_grammar_location=0A=0A*=20src/treesit.c=20= (treesit_loaded_lang):=20New=20struct.=0A(treesit_load_language):=20= Return=20a=20struct=20instead=20of=20just=20the=20language=0Aobject.=20=20= The=20struct=20contains=20both=20the=20language=20object=20and=20the=20= path=20to=0Athe=20shared=20library.=0A(Ftreesit_language_available_p,=20= Ftreesit_language_abi_version)=0A(treesit_ensure_query_compiled,=20= Ftreesit_parser_create):=20Update=0Acall=20of=20treesit_load_language.=0A= (Ftreesit_grammar_location):=20New=20function.=0A---=0A=20src/treesit.c=20= |=2068=20+++++++++++++++++++++++++++++++++++++++++----------=0A=201=20= file=20changed,=2055=20insertions(+),=2013=20deletions(-)=0A=0Adiff=20= --git=20a/src/treesit.c=20b/src/treesit.c=0Aindex=20= 5aedca44489..56cf8a1075a=20100644=0A---=20a/src/treesit.c=0A+++=20= b/src/treesit.c=0A@@=20-19,6=20+19,7=20@@=20Copyright=20(C)=202021-2024=20= Free=20Software=20Foundation,=20Inc.=0A=20You=20should=20have=20received=20= a=20copy=20of=20the=20GNU=20General=20Public=20License=0A=20along=20with=20= GNU=20Emacs.=20=20If=20not,=20see=20.=20=20= */=0A=20=0A+#include=20=0A=20#include=20=0A=20= #include=20"lisp.h"=0A=20#include=20"buffer.h"=0A@@=20-491,6=20+492,14=20= @@=20treesit_initialize=20(void)=0A=20=0C=0A=20/***=20Loading=20language=20= library=20=20*/=0A=20=0A+struct=20treesit_loaded_lang=0A+{=0A+=20=20/*=20= The=20language=20object.=20=20*/=0A+=20=20TSLanguage=20*lang;=0A+=20=20= /*=20The=20path=20of=20the=20shared=20library.=20=20*/=0A+=20=20const=20= char=20*path;=0A+};=0A+=0A=20/*=20Translate=20a=20symbol=20= treesit-=20to=20a=20C=20name=20treesit_.=20=20*/=0A=20static=20= void=0A=20treesit_symbol_to_c_name=20(char=20*symbol_name)=0A@@=20-575,7=20= +584,7=20@@=20treesit_load_language_push_for_each_suffix=20(Lisp_Object=20= lib_base_name,=0A=20=0A=20=20=20=20If=20error=20occurs,=20return=20NULL=20= and=20fill=20SIGNAL_SYMBOL=20and=20SIGNAL_DATA=0A=20=20=20=20with=20= values=20suitable=20for=20xsignal.=20=20*/=0A-static=20TSLanguage=20*=0A= +static=20struct=20treesit_loaded_lang=0A=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=09=09=20=20=20=20=20=20=20= Lisp_Object=20*signal_symbol,=20Lisp_Object=20*signal_data)=0A=20{=0A@@=20= -626,6=20+635,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20dynlib_handle_ptr=20handle;=0A=20=20=20const=20= char=20*error;=0A=20=20=20Lisp_Object=20error_list=20=3D=20Qnil;=0A+=20=20= struct=20treesit_loaded_lang=20loaded_lang=20=3D=20{=20NULL,=20NULL=20};=0A= =20=0A=20=20=20tail=20=3D=20path_candidates;=0A=20=20=20error=20=3D=20= NULL;=0A@@=20-650,7=20+660,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20=20=20=20=20=20=20=20mismatch.=20=20*/=0A=20=20= =20=20=20=20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20= =20=20=20=20=20=20*signal_data=20=3D=20Fcons=20(Qnot_found,=20Fnreverse=20= (error_list));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=0A=20=20=20/*=20Load=20= TSLanguage.=20=20*/=0A@@=20-672,7=20+682,7=20@@=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= *signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20=20=20= =20*signal_data=20=3D=20list2=20(Qsymbol_error,=20build_string=20= (error));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=20=20TSLanguage=20*lang=20= =3D=20(*langfn)=20();=0A=20=0A@@=20-685,9=20+695,15=20@@=20= treesit_load_language=20(Lisp_Object=20language_symbol,=0A=20=20=20=20=20= =20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20= =20=20=20*signal_data=20=3D=20list2=20(Qversion_mismatch,=0A=20=09=09=09=20= =20=20=20make_fixnum=20(ts_language_version=20(lang)));=0A-=20=20=20=20=20= =20return=20NULL;=0A+=20=20=20=20=20=20return=20loaded_lang;=0A=20=20=20=20= =20}=0A-=20=20return=20lang;=0A+=0A+=20=20Dl_info=20info;=0A+=20=20if=20= (dladdr(langfn,=20&info))=0A+=20=20=20=20loaded_lang.path=20=3D=20= info.dli_fname;=0A+=0A+=20=20loaded_lang.lang=20=3D=20lang;=0A+=20=20= return=20loaded_lang;=0A=20}=0A=20=0A=20DEFUN=20= ("treesit-language-available-p",=20Ftreesit_language_available_p,=0A@@=20= -704,7=20+720,9=20@@=20DEFUN=20("treesit-language-available-p",=20= Ftreesit_language_available_p,=0A=20=20=20treesit_initialize=20();=0A=20=20= =20Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20Lisp_Object=20= signal_data=20=3D=20Qnil;=0A-=20=20if=20(treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data)=20=3D=3D=20NULL)=0A+=20=20= struct=20treesit_loaded_lang=20loaded_lang=0A+=20=20=20=20=3D=20= treesit_load_language=20(language,=20&signal_symbol,=20&signal_data);=0A= +=20=20if=20(loaded_lang.lang=20=3D=3D=20NULL)=0A=20=20=20=20=20{=0A=20=20= =20=20=20=20=20if=20(NILP=20(detail))=0A=20=09return=20Qnil;=0A@@=20= -750,9=20+768,9=20@@=20DEFUN=20("treesit-language-abi-version",=20= Ftreesit_language_abi_version,=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20=20=20=20=20= Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20=20=20=20=20=20TSLanguage=20= *ts_language=20=3D=20treesit_load_language=20(language,=0A-=09=09=09=09=09= =09=20=20=20=20=20=20=20&signal_symbol,=0A-=09=09=09=09=09=09=20=20=20=20= =20=20=20&signal_data);=0A+=20=20=20=20=20=20struct=20= treesit_loaded_lang=20lang=0A+=09=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=20=20=20=20=20=20= TSLanguage=20*ts_language=20=3D=20lang.lang;=0A=20=20=20=20=20=20=20if=20= (ts_language=20=3D=3D=20NULL)=0A=20=09return=20Qnil;=0A=20=20=20=20=20=20= =20uint32_t=20version=20=3D=20=20ts_language_version=20(ts_language);=0A= @@=20-760,6=20+778,27=20@@=20DEFUN=20("treesit-language-abi-version",=20= Ftreesit_language_abi_version,=0A=20=20=20=20=20}=0A=20}=0A=20=0A+DEFUN=20= ("treesit-grammar-location",=20Ftreesit_grammar_location,=0A+=20=20=20=20= =20=20=20Streesit_grammar_location,=0A+=20=20=20=20=20=20=201,=201,=200,=0A= +=20=20=20=20=20=20=20doc:=20/*=20Return=20the=20path=20to=20the=20= grammar=20file=20for=20LANGUAGE.=0A+=0A+If=20LANGUAGE=20isn't=20loaded=20= yet,=20load=20it=20first.=20=20If=20the=20langauge=20can't=20be=0A= +loaded=20or=20the=20path=20couldn't=20be=20found,=20return=20nil.=20=20= */)=0A+=20=20(Lisp_Object=20language)=0A+{=0A+=20=20CHECK_SYMBOL=20= (language);=0A+=0A+=20=20Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A+=20= =20Lisp_Object=20signal_data=20=3D=20Qnil;=0A+=20=20struct=20= treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=0A+=20=20if=20= (!lang.lang=20||=20!lang.path)=20return=20Qnil;=0A+=0A+=20=20return=20= build_string=20(lang.path);=0A+}=0A+=0A=20=0C=0A=20/***=20Parsing=20= functions=20=20*/=0A=20=0A@@=20-1305,8=20+1344,9=20@@=20= treesit_ensure_query_compiled=20(Lisp_Object=20query,=20Lisp_Object=20= *signal_symbol,=0A=20=20=20Lisp_Object=20language=20=3D=20= XTS_COMPILED_QUERY=20(query)->language;=0A=20=20=20/*=20This=20is=20the=20= main=20reason=20why=20we=20compile=20query=20lazily:=20to=20avoid=0A=20=20= =20=20=20=20loading=20languages=20early.=20=20*/=0A-=20=20TSLanguage=20= *treesit_lang=20=3D=20treesit_load_language=20(language,=20= signal_symbol,=0A-=09=09=09=09=09=09=20=20=20=20signal_data);=0A+=20=20= struct=20treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20= treesit_load_language=20(language,=20signal_symbol,=20signal_data);=0A+=20= =20TSLanguage=20*treesit_lang=20=3D=20lang.lang;=0A=20=20=20if=20= (treesit_lang=20=3D=3D=20NULL)=0A=20=20=20=20=20return=20NULL;=0A=20=0A= @@=20-1477,8=20+1517,9=20@@=20DEFUN=20("treesit-parser-create",=0A=20=20=20= Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20Lisp_Object=20= signal_data=20=3D=20Qnil;=0A=20=20=20TSParser=20*parser=20=3D=20= ts_parser_new=20();=0A-=20=20TSLanguage=20*lang=20=3D=20= treesit_load_language=20(language,=20&signal_symbol,=0A-=09=09=09=09=09=20= =20=20=20&signal_data);=0A+=20=20struct=20treesit_loaded_lang=20= loaded_lang=0A+=20=20=20=20=3D=20treesit_load_language=20(language,=20= &signal_symbol,=20&signal_data);=0A+=20=20TSLanguage=20*lang=20=3D=20= loaded_lang.lang;=0A=20=20=20if=20(lang=20=3D=3D=20NULL)=0A=20=20=20=20=20= xsignal=20(signal_symbol,=20signal_data);=0A=20=20=20/*=20We=20check=20= language=20version=20when=20loading=20a=20language,=20so=20this=20should=0A= @@=20-4275,6=20+4316,7=20@@=20cons=20(REGEXP=20.=20FN),=20which=20is=20a=20= combination=20of=20a=20regexp=20and=20a=20predicate=0A=20=20=20defsubr=20= (&Streesit_language_available_p);=0A=20=20=20defsubr=20= (&Streesit_library_abi_version);=0A=20=20=20defsubr=20= (&Streesit_language_abi_version);=0A+=20=20defsubr=20= (&Streesit_grammar_location);=0A=20=0A=20=20=20defsubr=20= (&Streesit_parser_p);=0A=20=20=20defsubr=20(&Streesit_node_p);=0A--=20=0A= 2.39.5=20(Apple=20Git-151)=0A=0A= --Apple-Mail=_FB2050F0-2426-4505-98DF-FBF849D5E9CD-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 08:34:58 2024 Received: (at 64830) by debbugs.gnu.org; 28 Aug 2024 12:34:58 +0000 Received: from localhost ([127.0.0.1]:48396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjHt4-0002gv-AT for submit@debbugs.gnu.org; Wed, 28 Aug 2024 08:34:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjHt1-0002gf-Vx for 64830@debbugs.gnu.org; Wed, 28 Aug 2024 08:34:56 -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 1sjHs4-0002iF-2d; Wed, 28 Aug 2024 08:33:56 -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=xJVtIjOZ0+1GgxoqDl5uEUk2Q2z00sr1Yokwsk+hW3Y=; b=mdI0tP2/hfGd 0yiYjVMW7KtLayC6o4Hpv/UML4FC8oz+Jy1ZZCKn0iwOTY/RuMDGpFRZiT2/KLQkFMQyhTNVih+gU xI7AJbKadER9Z1vZvq1n/a4rPoGUR/jijVHcQZPFEh5xsxYtIGTvxMfEuNyUC6mg3IBb1GUJoPagf YJwrYJ3K8/ysXm7BKBqvfVwHpd0kdpiuSL26Tj2m/pBRPJFG4ByzyIDu9PiV7LpKrusbqmTkUyBqZ s3pbQw+xV3ILHkY2iq/P1jkPQ2T7P6Ky8YqxDdfnIFSkDzLLs8NJGiqOtq8lDUz3cE1uGJY8hA795 0ZI3xVRBVeYEfOdTRi3xTA==; Date: Wed, 28 Aug 2024 15:33:28 +0300 Message-Id: <86wmk0hlnr.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> (message from Yuan Fu on Tue, 27 Aug 2024 22:36:46 -0700) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@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: Yuan Fu > Date: Tue, 27 Aug 2024 22:36:46 -0700 > Cc: Stefan Kangas , > Alan Mackenzie , > 64830@debbugs.gnu.org > > +struct treesit_loaded_lang > +{ > + /* The language object. */ > + TSLanguage *lang; > + /* The path of the shared library. */ > + const char *path; Gnu Coding Standard frowns on using "path" for anything except PATH-style directory lists. Please use "filename" or "fname" or something like that instead. > + Dl_info info; > + if (dladdr(langfn, &info)) > + loaded_lang.path = info.dli_fname; dladdr is non-portable. We have dynlib_addr instead, and since treesit.c correctly uses dynlib.c functions already, using dynlib_addr is only natural. > + if (!lang.lang || !lang.path) return Qnil; > + > + return build_string (lang.path); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I think we should do return DECODE_FILE (make_unibyte_string (lang.filename, strlen (lang.filename)); instead, because dynlib_addr (and dladdr as well) return encoded file names. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 00:56:42 2024 Received: (at 64830) by debbugs.gnu.org; 29 Aug 2024 04:56:42 +0000 Received: from localhost ([127.0.0.1]:50081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjXD7-0000fW-Kh for submit@debbugs.gnu.org; Thu, 29 Aug 2024 00:56:41 -0400 Received: from mail-oa1-f43.google.com ([209.85.160.43]:52420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjXD5-0000fD-37 for 64830@debbugs.gnu.org; Thu, 29 Aug 2024 00:56:40 -0400 Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-27020fca39aso157312fac.0 for <64830@debbugs.gnu.org>; Wed, 28 Aug 2024 21:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724907278; x=1725512078; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=uoqBVz0Qj1TTzMcNJtyaHzNA3vl5wdH7ib2AeYIiQG8=; b=lAw9uy2MFAqjvc7kbzQMdNghRaUAirzaSFaC4zTEl8wUP5d1Yn3fSuakk+f09Lh3wY bCEzx7lXwBxxYGOHuu2LeZX7AdENugrHF1Cja82G1Oe0lTyzRBIJ3yj0QrwzBBLkEO9j 7AUxapnn/NeLwFBkNAkaqp4R7KoUlqTQoK+HvyHHGmXPJsAO1iAFmQZmuGssAWkZTTsu X3uD3WrtJLWsel0ocjjhAPgmic5u23hypCcuxwUeElNYi0vZdsU0Jy9kv4JrkpDBTdR2 QI7efGVoBJHV2BXAUyj+M8qA55Bzb8zVNob5tU9+0f6Ad1Dg5KDCNEwqhFu2rsFKo8G4 xqHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724907278; x=1725512078; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uoqBVz0Qj1TTzMcNJtyaHzNA3vl5wdH7ib2AeYIiQG8=; b=oDBvzK+BHOtfiE4gIQgqy/mWnxWCvhsI3CopnsQo2Xf6UMg+VZV8L45j0xO2pKteGT wfmBLmXftSpfDU+agzGjAd+FkvxpcLZtiOdqRt1/TwI28A84Hx02/FlPWQwdIaXwyqNU EHtXfxXJccSMnFBw8LFPuwebSKIlfjMpY6vJSkJ6idMbzs3oPUnwIl96h4d15jSt44Hb 5a1sfL/q+9CZWADVbU4h7l0xXcQ1rOqsiylT4+GtqIuzkxUPNXpum32ZqFIfNHm1dxkx 3lisTqQ15lTA6W8ehGIrmNPkbkB58k2D7E2IOoo47O13SLeBFavSOj1IEhBUbaiylrZF cJnw== X-Forwarded-Encrypted: i=1; AJvYcCWEFGzAv0qiQN9WF5Y/2RRukjx5MAyL0SXRla622IG+iVYbyHjIy2nVojTG3XSbircnN9RvvQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxhKE/Lg4Pq2TgzNLX+KhEwRXWEptfXf5m0xr8o4RWwdXePNEI/ dU27fX/PW5Cfcq1TBuaKp0zTkBKy+kMvOKi4/K6KDsK5cz0dImCK X-Google-Smtp-Source: AGHT+IFLVNRc/0KRXh73NAufHDo5hREUPWF+rwAKKdDs3JVCC8+0xbHs0CW84IS1UHN/RMzVCkwdsQ== X-Received: by 2002:a05:6870:248c:b0:260:e3fa:ab8d with SMTP id 586e51a60fabf-277902e3092mr2123194fac.37.1724907278379; Wed, 28 Aug 2024 21:54:38 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:fd58:c8a8:ed8f:39fa]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e5576d7bsm313961b3a.30.2024.08.28.21.54.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Aug 2024 21:54:37 -0700 (PDT) From: Yuan Fu Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_9859E5A0-532E-402E-BB00-A4685E688A7B" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Wed, 28 Aug 2024 21:54:26 -0700 In-Reply-To: <86wmk0hlnr.fsf@gnu.org> To: Eli Zaretskii References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, Alan Mackenzie , Stefan Kangas 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 (-) --Apple-Mail=_9859E5A0-532E-402E-BB00-A4685E688A7B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 28, 2024, at 5:33=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Tue, 27 Aug 2024 22:36:46 -0700 >> Cc: Stefan Kangas , >> Alan Mackenzie , >> 64830@debbugs.gnu.org >>=20 >> +struct treesit_loaded_lang >> +{ >> + /* The language object. */ >> + TSLanguage *lang; >> + /* The path of the shared library. */ >> + const char *path; >=20 > Gnu Coding Standard frowns on using "path" for anything except > PATH-style directory lists. Please use "filename" or "fname" or > something like that instead. >=20 >> + Dl_info info; >> + if (dladdr(langfn, &info)) >> + loaded_lang.path =3D info.dli_fname; >=20 > dladdr is non-portable. We have dynlib_addr instead, and since > treesit.c correctly uses dynlib.c functions already, using dynlib_addr > is only natural. >=20 >> + if (!lang.lang || !lang.path) return Qnil; >> + >> + return build_string (lang.path); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I think we should do >=20 > return > DECODE_FILE (make_unibyte_string (lang.filename, strlen = (lang.filename)); >=20 > instead, because dynlib_addr (and dladdr as well) return encoded file > names. Ah, thanks for the review! TIL. Here=E2=80=99s the revised patch. Yuan --Apple-Mail=_9859E5A0-532E-402E-BB00-A4685E688A7B Content-Disposition: attachment; filename=grammar-location.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="grammar-location.patch" Content-Transfer-Encoding: quoted-printable =46rom=2097374b55f2a786bf24db63bf206ccf217927de4f=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Tue,=20= 27=20Aug=202024=2022:31:42=20-0700=0ASubject:=20[PATCH]=20Add=20= Ftreesit_grammar_location=0A=0A*=20src/treesit.c=20= (treesit_loaded_lang):=20New=20struct.=0A(treesit_load_language):=20= Return=20a=20struct=20instead=20of=20just=20the=20language=0Aobject.=20=20= The=20struct=20contains=20both=20the=20language=20object=20and=20the=20= path=20to=0Athe=20shared=20library.=0A(Ftreesit_language_available_p,=20= Ftreesit_language_abi_version)=0A(treesit_ensure_query_compiled,=20= Ftreesit_parser_create):=20Update=0Acall=20of=20treesit_load_language.=0A= (Ftreesit_grammar_location):=20New=20function.=0A---=0A=20src/treesit.c=20= |=2068=20+++++++++++++++++++++++++++++++++++++++++----------=0A=201=20= file=20changed,=2055=20insertions(+),=2013=20deletions(-)=0A=0Adiff=20= --git=20a/src/treesit.c=20b/src/treesit.c=0Aindex=20= 5aedca44489..09f4aeb0b99=20100644=0A---=20a/src/treesit.c=0A+++=20= b/src/treesit.c=0A@@=20-22,6=20+22,7=20@@=20Copyright=20(C)=202021-2024=20= Free=20Software=20Foundation,=20Inc.=0A=20#include=20=0A=20= #include=20"lisp.h"=0A=20#include=20"buffer.h"=0A+#include=20"coding.h"=0A= =20=0A=20#include=20"treesit.h"=0A=20=0A@@=20-491,6=20+492,14=20@@=20= treesit_initialize=20(void)=0A=20=0C=0A=20/***=20Loading=20language=20= library=20=20*/=0A=20=0A+struct=20treesit_loaded_lang=0A+{=0A+=20=20/*=20= The=20language=20object.=20=20*/=0A+=20=20TSLanguage=20*lang;=0A+=20=20= /*=20The=20path=20to=20the=20shared=20library.=20=20*/=0A+=20=20const=20= char=20*filename;=0A+};=0A+=0A=20/*=20Translate=20a=20symbol=20= treesit-=20to=20a=20C=20name=20treesit_.=20=20*/=0A=20static=20= void=0A=20treesit_symbol_to_c_name=20(char=20*symbol_name)=0A@@=20-575,7=20= +584,7=20@@=20treesit_load_language_push_for_each_suffix=20(Lisp_Object=20= lib_base_name,=0A=20=0A=20=20=20=20If=20error=20occurs,=20return=20NULL=20= and=20fill=20SIGNAL_SYMBOL=20and=20SIGNAL_DATA=0A=20=20=20=20with=20= values=20suitable=20for=20xsignal.=20=20*/=0A-static=20TSLanguage=20*=0A= +static=20struct=20treesit_loaded_lang=0A=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=09=09=20=20=20=20=20=20=20= Lisp_Object=20*signal_symbol,=20Lisp_Object=20*signal_data)=0A=20{=0A@@=20= -626,6=20+635,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20dynlib_handle_ptr=20handle;=0A=20=20=20const=20= char=20*error;=0A=20=20=20Lisp_Object=20error_list=20=3D=20Qnil;=0A+=20=20= struct=20treesit_loaded_lang=20loaded_lang=20=3D=20{=20NULL,=20NULL=20};=0A= =20=0A=20=20=20tail=20=3D=20path_candidates;=0A=20=20=20error=20=3D=20= NULL;=0A@@=20-650,7=20+660,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20=20=20=20=20=20=20=20mismatch.=20=20*/=0A=20=20= =20=20=20=20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20= =20=20=20=20=20=20*signal_data=20=3D=20Fcons=20(Qnot_found,=20Fnreverse=20= (error_list));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=0A=20=20=20/*=20Load=20= TSLanguage.=20=20*/=0A@@=20-672,7=20+682,7=20@@=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= *signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20=20=20= =20*signal_data=20=3D=20list2=20(Qsymbol_error,=20build_string=20= (error));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=20=20TSLanguage=20*lang=20= =3D=20(*langfn)=20();=0A=20=0A@@=20-685,9=20+695,14=20@@=20= treesit_load_language=20(Lisp_Object=20language_symbol,=0A=20=20=20=20=20= =20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20= =20=20=20*signal_data=20=3D=20list2=20(Qversion_mismatch,=0A=20=09=09=09=20= =20=20=20make_fixnum=20(ts_language_version=20(lang)));=0A-=20=20=20=20=20= =20return=20NULL;=0A+=20=20=20=20=20=20return=20loaded_lang;=0A=20=20=20=20= =20}=0A-=20=20return=20lang;=0A+=0A+=20=20const=20char=20*sym;=0A+=20=20= dynlib_addr((void=20(*)=20(void))=20langfn,=20&loaded_lang.filename,=20= &sym);=0A+=0A+=20=20loaded_lang.lang=20=3D=20lang;=0A+=20=20return=20= loaded_lang;=0A=20}=0A=20=0A=20DEFUN=20("treesit-language-available-p",=20= Ftreesit_language_available_p,=0A@@=20-704,7=20+719,9=20@@=20DEFUN=20= ("treesit-language-available-p",=20Ftreesit_language_available_p,=0A=20=20= =20treesit_initialize=20();=0A=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20=20if=20= (treesit_load_language=20(language,=20&signal_symbol,=20&signal_data)=20= =3D=3D=20NULL)=0A+=20=20struct=20treesit_loaded_lang=20loaded_lang=0A+=20= =20=20=20=3D=20treesit_load_language=20(language,=20&signal_symbol,=20= &signal_data);=0A+=20=20if=20(loaded_lang.lang=20=3D=3D=20NULL)=0A=20=20=20= =20=20{=0A=20=20=20=20=20=20=20if=20(NILP=20(detail))=0A=20=09return=20= Qnil;=0A@@=20-750,9=20+767,9=20@@=20DEFUN=20= ("treesit-language-abi-version",=20Ftreesit_language_abi_version,=0A=20=20= =20=20=20{=0A=20=20=20=20=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20=20=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20= =20=20=20=20=20TSLanguage=20*ts_language=20=3D=20treesit_load_language=20= (language,=0A-=09=09=09=09=09=09=20=20=20=20=20=20=20&signal_symbol,=0A-=09= =09=09=09=09=09=20=20=20=20=20=20=20&signal_data);=0A+=20=20=20=20=20=20= struct=20treesit_loaded_lang=20lang=0A+=09=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=20=20=20=20=20=20= TSLanguage=20*ts_language=20=3D=20lang.lang;=0A=20=20=20=20=20=20=20if=20= (ts_language=20=3D=3D=20NULL)=0A=20=09return=20Qnil;=0A=20=20=20=20=20=20= =20uint32_t=20version=20=3D=20=20ts_language_version=20(ts_language);=0A= @@=20-760,6=20+777,28=20@@=20DEFUN=20("treesit-language-abi-version",=20= Ftreesit_language_abi_version,=0A=20=20=20=20=20}=0A=20}=0A=20=0A+DEFUN=20= ("treesit-grammar-location",=20Ftreesit_grammar_location,=0A+=20=20=20=20= =20=20=20Streesit_grammar_location,=0A+=20=20=20=20=20=20=201,=201,=200,=0A= +=20=20=20=20=20=20=20doc:=20/*=20Return=20the=20path=20to=20the=20= grammar=20file=20for=20LANGUAGE.=0A+=0A+If=20LANGUAGE=20isn't=20loaded=20= yet,=20load=20it=20first.=20=20If=20the=20langauge=20can't=20be=0A= +loaded=20or=20the=20path=20couldn't=20be=20found,=20return=20nil.=20=20= */)=0A+=20=20(Lisp_Object=20language)=0A+{=0A+=20=20CHECK_SYMBOL=20= (language);=0A+=0A+=20=20Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A+=20= =20Lisp_Object=20signal_data=20=3D=20Qnil;=0A+=20=20struct=20= treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=0A+=20=20if=20= (!lang.lang=20||=20!lang.filename)=20return=20Qnil;=0A+=0A+=20=20return=20= DECODE_FILE=20(make_unibyte_string=20(lang.filename,=0A+=09=09=09=09=09=20= =20=20strlen=20(lang.filename)));=0A+}=0A+=0A=20=0C=0A=20/***=20Parsing=20= functions=20=20*/=0A=20=0A@@=20-1305,8=20+1344,9=20@@=20= treesit_ensure_query_compiled=20(Lisp_Object=20query,=20Lisp_Object=20= *signal_symbol,=0A=20=20=20Lisp_Object=20language=20=3D=20= XTS_COMPILED_QUERY=20(query)->language;=0A=20=20=20/*=20This=20is=20the=20= main=20reason=20why=20we=20compile=20query=20lazily:=20to=20avoid=0A=20=20= =20=20=20=20loading=20languages=20early.=20=20*/=0A-=20=20TSLanguage=20= *treesit_lang=20=3D=20treesit_load_language=20(language,=20= signal_symbol,=0A-=09=09=09=09=09=09=20=20=20=20signal_data);=0A+=20=20= struct=20treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20= treesit_load_language=20(language,=20signal_symbol,=20signal_data);=0A+=20= =20TSLanguage=20*treesit_lang=20=3D=20lang.lang;=0A=20=20=20if=20= (treesit_lang=20=3D=3D=20NULL)=0A=20=20=20=20=20return=20NULL;=0A=20=0A= @@=20-1477,8=20+1517,9=20@@=20DEFUN=20("treesit-parser-create",=0A=20=20=20= Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20Lisp_Object=20= signal_data=20=3D=20Qnil;=0A=20=20=20TSParser=20*parser=20=3D=20= ts_parser_new=20();=0A-=20=20TSLanguage=20*lang=20=3D=20= treesit_load_language=20(language,=20&signal_symbol,=0A-=09=09=09=09=09=20= =20=20=20&signal_data);=0A+=20=20struct=20treesit_loaded_lang=20= loaded_lang=0A+=20=20=20=20=3D=20treesit_load_language=20(language,=20= &signal_symbol,=20&signal_data);=0A+=20=20TSLanguage=20*lang=20=3D=20= loaded_lang.lang;=0A=20=20=20if=20(lang=20=3D=3D=20NULL)=0A=20=20=20=20=20= xsignal=20(signal_symbol,=20signal_data);=0A=20=20=20/*=20We=20check=20= language=20version=20when=20loading=20a=20language,=20so=20this=20should=0A= @@=20-4275,6=20+4316,7=20@@=20cons=20(REGEXP=20.=20FN),=20which=20is=20a=20= combination=20of=20a=20regexp=20and=20a=20predicate=0A=20=20=20defsubr=20= (&Streesit_language_available_p);=0A=20=20=20defsubr=20= (&Streesit_library_abi_version);=0A=20=20=20defsubr=20= (&Streesit_language_abi_version);=0A+=20=20defsubr=20= (&Streesit_grammar_location);=0A=20=0A=20=20=20defsubr=20= (&Streesit_parser_p);=0A=20=20=20defsubr=20(&Streesit_node_p);=0A--=20=0A= 2.39.5=20(Apple=20Git-151)=0A=0A= --Apple-Mail=_9859E5A0-532E-402E-BB00-A4685E688A7B-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 02:02:16 2024 Received: (at 64830) by debbugs.gnu.org; 29 Aug 2024 06:02:16 +0000 Received: from localhost ([127.0.0.1]:50128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjYEZ-0002ng-MF for submit@debbugs.gnu.org; Thu, 29 Aug 2024 02:02:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjYEY-0002nU-Ed for 64830@debbugs.gnu.org; Thu, 29 Aug 2024 02:02:15 -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 1sjYDZ-0008Ii-8y; Thu, 29 Aug 2024 02:01:13 -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=l7oRBmOZgpHuYIWzdwaYsF2HRTSkzkqNGNhb5lMBzhg=; b=IyP3NE0x5GHyRhr2ZjSK eEJS5T/w5svot1TobgUraRJFkxdIAe406715Gqd3qqOmldFbOFDj3sRaf4o+H/2i8fWP9DJEmJVof 2xAfB2bd8EydBonLWug7MKemJWtZxfSeL/1Iiu6jbFbKWpscID7Lp9d1eAJYEzNntvN5je1bZxcaf 66WHLZotQQ26rY+ExzF5pcfxPEAFKLHSaXe5knRkhBc3Yg6L7+IBzE5X1kfUIg0jGeAQplvpiyyMD jr/1uZJjTjAsYrU6onkJdbTzZm91VaeaUcIGtd19Z0+8NJ9LtQiAzwruCJl6HeUBlVUL/yBI3CGdB nVzK38SbqEHd9Q==; Date: Thu, 29 Aug 2024 09:01:08 +0300 Message-Id: <86y14fg95n.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: (message from Yuan Fu on Wed, 28 Aug 2024 21:54:26 -0700) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@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: Yuan Fu > Date: Wed, 28 Aug 2024 21:54:26 -0700 > Cc: Stefan Kangas , > Alan Mackenzie , > 64830@debbugs.gnu.org > > Ah, thanks for the review! TIL. Here’s the revised patch. A few more nits: > + const char *sym; > + dynlib_addr((void (*) (void)) langfn, &loaded_lang.filename, &sym); ^^ We leave one space between the function name and the opening paren. Also, do you really need the type-cast for langfn? Do you get compiler warnings if you remove the cast? > +DEFUN ("treesit-grammar-location", Ftreesit_grammar_location, > + Streesit_grammar_location, > + 1, 1, 0, > + doc: /* Return the path to the grammar file for LANGUAGE. ^^^^ "Path" again. I suggest "absolute file name" instead. > +If LANGUAGE isn't loaded yet, load it first. If the langauge can't be > +loaded or the path couldn't be found, return nil. */) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I suggest "or the file name couldn't be determined". Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 01:10:31 2024 Received: (at 64830) by debbugs.gnu.org; 11 Sep 2024 05:10:31 +0000 Received: from localhost ([127.0.0.1]:37505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFcc-00028v-Tj for submit@debbugs.gnu.org; Wed, 11 Sep 2024 01:10:31 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:42009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFca-00028g-3h for 64830@debbugs.gnu.org; Wed, 11 Sep 2024 01:10:29 -0400 Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71798661a52so390028b3a.0 for <64830@debbugs.gnu.org>; Tue, 10 Sep 2024 22:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726031356; x=1726636156; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=EtP3Uf+MHOf5nC3EfMfcjkV/2YRqHxBxf47YHDVpe/w=; b=KjB+pgkQR7IZJQTrJ6awi/MnvHHXk98e8JlcOfec4Hdj/J5fqds0tuFvItfkMQk9Ud rwJ/dLg31imQ6U2UTGdBI3Xh5s7ycNJdeOqLzA9gR90Rrwgfz0hS7ZTliAz8Kgy12lVp CWydqi7tHiA4FzY+AorJaumouNPogmgEHTj/C/+T+/qZQ5sctR4nt2+RfV6Bnc3ThQXg nwFjoaNlHZ9cf4jiSeI5l+2TcPGeLQOhOEOgYFgD0KYHXvZqFA5UnlOJr/lbkvaIXLEw 6SYbEVr1PtO7TxYoqPN2JqlJGWjwZhxM7oDG4xPR/vX1bOutfyUWHDo+8s3aR+lEkV9k RVng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726031356; x=1726636156; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EtP3Uf+MHOf5nC3EfMfcjkV/2YRqHxBxf47YHDVpe/w=; b=LAwncp2Zue0eWlKylcYzr/JYAEDa5tnHPc7ld+Nr4uOp4W55ewgYSHqPyirct+sLmh tqwgLDEhSJkPe1+eyQammZjtsBWXEpigIBekhOVwB50p/aVw4Z5dVytj2D0jkIEYtFcW g5z0iHVVrW3pLeLwurHp8YlrHggxix41MLNU6txuwxORMNr5SSLsxwZ8CSP+LXjR3B7O A4kGjvoMWhrJ+ouptDduDX/zySoisoaN1y5VvexgemohBf7APv8sEaYc2Dktbl0Q/et1 kiNIhi2RWqylk6gyq3JG2b+DUeFQqJtAm06bmWYJXfPgWiHts1fHNR0n3+1GqC71RYYm XqBQ== X-Forwarded-Encrypted: i=1; AJvYcCVxk3/mZodyaludaCmXPeqJxdNld8B5WQEgNRIhWM4Cgo/Zc/o2CrOcyiW0ccThFr0qefqSdg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwukCiVQII+KVfEOIVgcApQIBmtFwCgMdgpe5XHLC/HyhY1K3ox ihTGW1ty3DH9Qgnw4RR7v4icA4daiq8Q7lDpKP5ScBhu3AAP4cSe X-Google-Smtp-Source: AGHT+IFdRw71tiPinloXObNZ9UfSB6eQuZmhsEkRI/nrFXmzTgFURpOCg77gG9TApoE6fabNUsH7RQ== X-Received: by 2002:aa7:8e46:0:b0:717:864a:8b0a with SMTP id d2e1a72fcca58-71907eccf82mr8934628b3a.7.1726031356185; Tue, 10 Sep 2024 22:09:16 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:a1a8:5602:237b:300d]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-719090d1274sm2156272b3a.218.2024.09.10.22.09.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Sep 2024 22:09:15 -0700 (PDT) From: Yuan Fu Message-Id: <904ED5D6-11A2-4B54-A60C-F972AF3E91B4@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Tue, 10 Sep 2024 22:09:04 -0700 In-Reply-To: <86y14fg95n.fsf@gnu.org> To: Eli Zaretskii References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> <86y14fg95n.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@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 (-) --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Finally able to address this again. > On Aug 28, 2024, at 11:01=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Wed, 28 Aug 2024 21:54:26 -0700 >> Cc: Stefan Kangas , >> Alan Mackenzie , >> 64830@debbugs.gnu.org >>=20 >> Ah, thanks for the review! TIL. Here=E2=80=99s the revised patch. >=20 > A few more nits: >=20 >> + const char *sym; >> + dynlib_addr((void (*) (void)) langfn, &loaded_lang.filename, = &sym); > ^^ > We leave one space between the function name and the opening paren. > Also, do you really need the type-cast for langfn? Do you get > compiler warnings if you remove the cast? Oops. And yeah, I actually get an error: treesit.c:702:16: error: incompatible function pointer types passing = 'TSLanguage *(*)(void)' (aka 'struct TSLanguage *(*)(void)') to = parameter of type 'void (*)(void)' = [-Wincompatible-function-pointer-types] 702 | dynlib_addr (langfn, &loaded_lang.filename, &sym); | ^~~~~~ ./dynlib.h:39:26: note: passing argument to parameter 'ptr' here 39 | void dynlib_addr (void (*ptr) (void), const char **file, const = char **sym); | ^ The error seems reasonable to me, I just don=E2=80=99t know other way to = suppress it. >> +DEFUN ("treesit-grammar-location", Ftreesit_grammar_location, >> + Streesit_grammar_location, >> + 1, 1, 0, >> + doc: /* Return the path to the grammar file for LANGUAGE. > ^^^^ > "Path" again. I suggest "absolute file name" instead. >=20 >> +If LANGUAGE isn't loaded yet, load it first. If the langauge can't = be >> +loaded or the path couldn't be found, return nil. */) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I suggest "or the file name couldn't be determined=E2=80=9D. Done. Please take a look at the latest patch, thanks! Yuan --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Disposition: attachment; filename=grammar-location.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="grammar-location.patch" Content-Transfer-Encoding: quoted-printable =46rom=205158271bf6ef6d6c28d88fe21acd85169e10e93b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Tue,=20= 27=20Aug=202024=2022:31:42=20-0700=0ASubject:=20[PATCH]=20Add=20= Ftreesit_grammar_location=0A=0A*=20src/treesit.c=20= (treesit_loaded_lang):=20New=20struct.=0A(treesit_load_language):=20= Return=20a=20struct=20instead=20of=20just=20the=20language=0Aobject.=20=20= The=20struct=20contains=20both=20the=20language=20object=20and=20the=20= path=20to=0Athe=20shared=20library.=0A(Ftreesit_language_available_p,=20= Ftreesit_language_abi_version)=0A(treesit_ensure_query_compiled,=20= Ftreesit_parser_create):=20Update=0Acall=20of=20treesit_load_language.=0A= (Ftreesit_grammar_location):=20New=20function.=0A---=0A=20src/treesit.c=20= |=2068=20+++++++++++++++++++++++++++++++++++++++++----------=0A=201=20= file=20changed,=2055=20insertions(+),=2013=20deletions(-)=0A=0Adiff=20= --git=20a/src/treesit.c=20b/src/treesit.c=0Aindex=20= 5aedca44489..f2adf92d8c6=20100644=0A---=20a/src/treesit.c=0A+++=20= b/src/treesit.c=0A@@=20-22,6=20+22,7=20@@=20Copyright=20(C)=202021-2024=20= Free=20Software=20Foundation,=20Inc.=0A=20#include=20=0A=20= #include=20"lisp.h"=0A=20#include=20"buffer.h"=0A+#include=20"coding.h"=0A= =20=0A=20#include=20"treesit.h"=0A=20=0A@@=20-491,6=20+492,14=20@@=20= treesit_initialize=20(void)=0A=20=0C=0A=20/***=20Loading=20language=20= library=20=20*/=0A=20=0A+struct=20treesit_loaded_lang=0A+{=0A+=20=20/*=20= The=20language=20object.=20=20*/=0A+=20=20TSLanguage=20*lang;=0A+=20=20= /*=20The=20path=20to=20the=20shared=20library.=20=20*/=0A+=20=20const=20= char=20*filename;=0A+};=0A+=0A=20/*=20Translate=20a=20symbol=20= treesit-=20to=20a=20C=20name=20treesit_.=20=20*/=0A=20static=20= void=0A=20treesit_symbol_to_c_name=20(char=20*symbol_name)=0A@@=20-575,7=20= +584,7=20@@=20treesit_load_language_push_for_each_suffix=20(Lisp_Object=20= lib_base_name,=0A=20=0A=20=20=20=20If=20error=20occurs,=20return=20NULL=20= and=20fill=20SIGNAL_SYMBOL=20and=20SIGNAL_DATA=0A=20=20=20=20with=20= values=20suitable=20for=20xsignal.=20=20*/=0A-static=20TSLanguage=20*=0A= +static=20struct=20treesit_loaded_lang=0A=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=09=09=20=20=20=20=20=20=20= Lisp_Object=20*signal_symbol,=20Lisp_Object=20*signal_data)=0A=20{=0A@@=20= -626,6=20+635,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20dynlib_handle_ptr=20handle;=0A=20=20=20const=20= char=20*error;=0A=20=20=20Lisp_Object=20error_list=20=3D=20Qnil;=0A+=20=20= struct=20treesit_loaded_lang=20loaded_lang=20=3D=20{=20NULL,=20NULL=20};=0A= =20=0A=20=20=20tail=20=3D=20path_candidates;=0A=20=20=20error=20=3D=20= NULL;=0A@@=20-650,7=20+660,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20=20=20=20=20=20=20=20mismatch.=20=20*/=0A=20=20= =20=20=20=20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20= =20=20=20=20=20=20*signal_data=20=3D=20Fcons=20(Qnot_found,=20Fnreverse=20= (error_list));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=0A=20=20=20/*=20Load=20= TSLanguage.=20=20*/=0A@@=20-672,7=20+682,7=20@@=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= *signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20=20=20= =20*signal_data=20=3D=20list2=20(Qsymbol_error,=20build_string=20= (error));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=20=20TSLanguage=20*lang=20= =3D=20(*langfn)=20();=0A=20=0A@@=20-685,9=20+695,14=20@@=20= treesit_load_language=20(Lisp_Object=20language_symbol,=0A=20=20=20=20=20= =20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20= =20=20=20*signal_data=20=3D=20list2=20(Qversion_mismatch,=0A=20=09=09=09=20= =20=20=20make_fixnum=20(ts_language_version=20(lang)));=0A-=20=20=20=20=20= =20return=20NULL;=0A+=20=20=20=20=20=20return=20loaded_lang;=0A=20=20=20=20= =20}=0A-=20=20return=20lang;=0A+=0A+=20=20const=20char=20*sym;=0A+=20=20= dynlib_addr=20((void=20(*)=20void)=20langfn,=20&loaded_lang.filename,=20= &sym);=0A+=0A+=20=20loaded_lang.lang=20=3D=20lang;=0A+=20=20return=20= loaded_lang;=0A=20}=0A=20=0A=20DEFUN=20("treesit-language-available-p",=20= Ftreesit_language_available_p,=0A@@=20-704,7=20+719,9=20@@=20DEFUN=20= ("treesit-language-available-p",=20Ftreesit_language_available_p,=0A=20=20= =20treesit_initialize=20();=0A=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20=20if=20= (treesit_load_language=20(language,=20&signal_symbol,=20&signal_data)=20= =3D=3D=20NULL)=0A+=20=20struct=20treesit_loaded_lang=20loaded_lang=0A+=20= =20=20=20=3D=20treesit_load_language=20(language,=20&signal_symbol,=20= &signal_data);=0A+=20=20if=20(loaded_lang.lang=20=3D=3D=20NULL)=0A=20=20=20= =20=20{=0A=20=20=20=20=20=20=20if=20(NILP=20(detail))=0A=20=09return=20= Qnil;=0A@@=20-750,9=20+767,9=20@@=20DEFUN=20= ("treesit-language-abi-version",=20Ftreesit_language_abi_version,=0A=20=20= =20=20=20{=0A=20=20=20=20=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20=20=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20= =20=20=20=20=20TSLanguage=20*ts_language=20=3D=20treesit_load_language=20= (language,=0A-=09=09=09=09=09=09=20=20=20=20=20=20=20&signal_symbol,=0A-=09= =09=09=09=09=09=20=20=20=20=20=20=20&signal_data);=0A+=20=20=20=20=20=20= struct=20treesit_loaded_lang=20lang=0A+=09=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=20=20=20=20=20=20= TSLanguage=20*ts_language=20=3D=20lang.lang;=0A=20=20=20=20=20=20=20if=20= (ts_language=20=3D=3D=20NULL)=0A=20=09return=20Qnil;=0A=20=20=20=20=20=20= =20uint32_t=20version=20=3D=20=20ts_language_version=20(ts_language);=0A= @@=20-760,6=20+777,28=20@@=20DEFUN=20("treesit-language-abi-version",=20= Ftreesit_language_abi_version,=0A=20=20=20=20=20}=0A=20}=0A=20=0A+DEFUN=20= ("treesit-grammar-location",=20Ftreesit_grammar_location,=0A+=20=20=20=20= =20=20=20Streesit_grammar_location,=0A+=20=20=20=20=20=20=201,=201,=200,=0A= +=20=20=20=20=20=20=20doc:=20/*=20Return=20the=20absolute=20file=20name=20= of=20the=20grammar=20file=20for=20LANGUAGE.=0A+=0A+If=20LANGUAGE=20isn't=20= loaded=20yet,=20load=20it=20first.=20=20If=20the=20langauge=20can't=20be=0A= +loaded=20or=20the=20file=20name=20couldn't=20be=20determined,=20return=20= nil.=20=20*/)=0A+=20=20(Lisp_Object=20language)=0A+{=0A+=20=20= CHECK_SYMBOL=20(language);=0A+=0A+=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A+=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A+=20=20struct=20= treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=0A+=20=20if=20= (!lang.lang=20||=20!lang.filename)=20return=20Qnil;=0A+=0A+=20=20return=20= DECODE_FILE=20(make_unibyte_string=20(lang.filename,=0A+=09=09=09=09=09=20= =20=20strlen=20(lang.filename)));=0A+}=0A+=0A=20=0C=0A=20/***=20Parsing=20= functions=20=20*/=0A=20=0A@@=20-1305,8=20+1344,9=20@@=20= treesit_ensure_query_compiled=20(Lisp_Object=20query,=20Lisp_Object=20= *signal_symbol,=0A=20=20=20Lisp_Object=20language=20=3D=20= XTS_COMPILED_QUERY=20(query)->language;=0A=20=20=20/*=20This=20is=20the=20= main=20reason=20why=20we=20compile=20query=20lazily:=20to=20avoid=0A=20=20= =20=20=20=20loading=20languages=20early.=20=20*/=0A-=20=20TSLanguage=20= *treesit_lang=20=3D=20treesit_load_language=20(language,=20= signal_symbol,=0A-=09=09=09=09=09=09=20=20=20=20signal_data);=0A+=20=20= struct=20treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20= treesit_load_language=20(language,=20signal_symbol,=20signal_data);=0A+=20= =20TSLanguage=20*treesit_lang=20=3D=20lang.lang;=0A=20=20=20if=20= (treesit_lang=20=3D=3D=20NULL)=0A=20=20=20=20=20return=20NULL;=0A=20=0A= @@=20-1477,8=20+1517,9=20@@=20DEFUN=20("treesit-parser-create",=0A=20=20=20= Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20Lisp_Object=20= signal_data=20=3D=20Qnil;=0A=20=20=20TSParser=20*parser=20=3D=20= ts_parser_new=20();=0A-=20=20TSLanguage=20*lang=20=3D=20= treesit_load_language=20(language,=20&signal_symbol,=0A-=09=09=09=09=09=20= =20=20=20&signal_data);=0A+=20=20struct=20treesit_loaded_lang=20= loaded_lang=0A+=20=20=20=20=3D=20treesit_load_language=20(language,=20= &signal_symbol,=20&signal_data);=0A+=20=20TSLanguage=20*lang=20=3D=20= loaded_lang.lang;=0A=20=20=20if=20(lang=20=3D=3D=20NULL)=0A=20=20=20=20=20= xsignal=20(signal_symbol,=20signal_data);=0A=20=20=20/*=20We=20check=20= language=20version=20when=20loading=20a=20language,=20so=20this=20should=0A= @@=20-4275,6=20+4316,7=20@@=20cons=20(REGEXP=20.=20FN),=20which=20is=20a=20= combination=20of=20a=20regexp=20and=20a=20predicate=0A=20=20=20defsubr=20= (&Streesit_language_available_p);=0A=20=20=20defsubr=20= (&Streesit_library_abi_version);=0A=20=20=20defsubr=20= (&Streesit_language_abi_version);=0A+=20=20defsubr=20= (&Streesit_grammar_location);=0A=20=0A=20=20=20defsubr=20= (&Streesit_parser_p);=0A=20=20=20defsubr=20(&Streesit_node_p);=0A--=20=0A= 2.39.5=20(Apple=20Git-151)=0A=0A= --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 08:09:27 2024 Received: (at 64830) by debbugs.gnu.org; 11 Sep 2024 12:09:27 +0000 Received: from localhost ([127.0.0.1]:37901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soMA2-0006SV-Qi for submit@debbugs.gnu.org; Wed, 11 Sep 2024 08:09:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soMA0-0006SG-Ux for 64830@debbugs.gnu.org; Wed, 11 Sep 2024 08:09:25 -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 1soM9o-0006LD-RM; Wed, 11 Sep 2024 08:09: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=zZOqklCJqGWJgIgs2V/axFk7MfR8uWHr2ir0AP+U/ZY=; b=sQzK0j/AaVI5 eaNKwp5XLX7yGmK3LwiuaJogOGUDcWtBvL3Y4CbiVFP/dbFVvSEoOddGFuR6+J34NzCgRaZFJpfmQ 7WmIVwOyBtWcdTSv3y+V/phxe6AbDvxDu5kaWObQZhfpjpLzQZl1kJa+gSQXtRjzqZYONa/ejaX+J DGLl+JpxceDxEkJ2KGtLp0j4N3wiHyDQuG6jyD2A4oQ3Vdfe/Qrjkf4i1Br5SpEnkCb+xkiH27QPA q0Pt5L0sI/jnFwzJViXC2w1Uf9/lAIu2Mezvd8MEqxDIDZ/KsyIg1E9AHKLKeIe8fYVf5vMaBCXjA 8XwSPAVSJa+/bj4O9CFh0w==; Date: Wed, 11 Sep 2024 15:09:09 +0300 Message-Id: <865xr2pf2y.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <904ED5D6-11A2-4B54-A60C-F972AF3E91B4@gmail.com> (message from Yuan Fu on Tue, 10 Sep 2024 22:09:04 -0700) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> <86y14fg95n.fsf@gnu.org> <904ED5D6-11A2-4B54-A60C-F972AF3E91B4@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64830 Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@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: Yuan Fu > Date: Tue, 10 Sep 2024 22:09:04 -0700 > Cc: stefankangas@gmail.com, > acm@muc.de, > 64830@debbugs.gnu.org > > Done. Please take a look at the latest patch, thanks! LGTM, but... > +struct treesit_loaded_lang > +{ > + /* The language object. */ > + TSLanguage *lang; > + /* The path to the shared library. */ > + const char *filename; > +}; > + ..."path" again. > +DEFUN ("treesit-grammar-location", Ftreesit_grammar_location, > + Streesit_grammar_location, > + 1, 1, 0, > + doc: /* Return the absolute file name of the grammar file for LANGUAGE. > + > +If LANGUAGE isn't loaded yet, load it first. If the langauge can't be ^^^^^^^^ A typo. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 04:07:28 2024 Received: (at 64830-done) by debbugs.gnu.org; 12 Sep 2024 08:07:28 +0000 Received: from localhost ([127.0.0.1]:40066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soerP-0001Wl-Ho for submit@debbugs.gnu.org; Thu, 12 Sep 2024 04:07:27 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:59863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soerN-0001WS-TX for 64830-done@debbugs.gnu.org; Thu, 12 Sep 2024 04:07:26 -0400 Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-201d5af11a4so8195855ad.3 for <64830-done@debbugs.gnu.org>; Thu, 12 Sep 2024 01:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726128373; x=1726733173; 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=wkCECOX8y1jT0XB71+fGKTNS94wRPWJ/ssVlNHIjIEE=; b=GbtWNSsIv3gjV5EBj9YcE12OGTEUZ9SyeOkl+htlsQKbNdd/X16GOOdkur3+iM8RIO x5Jduswu8wl9DRJVyuFsXq62cFoydz7SJCshLamAZsrHOYfTA+kVtCQxHITDY9kN/b93 q7dNz8EMg6fm1LkVzfLBDTT2nLB1QKWLVuXLyStN27Vk6a/KBmGxt0stgNSafLtsocNd Z0jChExVYeFt09r69Wsu8ZwDRN59roIIzBYXdi868xwLmo+tWwywH2nakfoQ+8Ix/AlT MastApIrLH0yDgXFjFDHKFkUnDZiswuYcukOroduIdq5SKLtFJmNRsf40kZiHGhTL9E6 EGnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726128373; x=1726733173; 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=wkCECOX8y1jT0XB71+fGKTNS94wRPWJ/ssVlNHIjIEE=; b=Q0vXvxp/GiMYHewIfFkgqenL0dprt9NNJg1FzP2GqYcUdDbRGG0JSxkU6tiF76TPlL nCytOf1JoILBbBAJsGPoHtJZQXzSUdNdjBoNd25Kyy6RPSMQYjpIoI83nHtSMgIZMtnC Bm0/dlNYxaryv8PRjHM/T5gDl2CzvH5nF2IQ7WAOXCtDT31TtJau9JSK7rwoY8LUFhsG +Iy1izhfb+6p8jwTe/ZumCF+xaXR/rtvOTVOO1DX/Kak0ckQqP0R9gWN5+g4StXTpG9p Zepzr/QsxzS+qZ5i1wniG5ICa29cE6UfVQtJVpBNm8ctPqzvtl55nuEczNJLj/jZfEZ8 KjQg== X-Forwarded-Encrypted: i=1; AJvYcCVp5gXz3U6x/IEl+cuVtjdbZuxsLhi4QvXlSQokOsZWJSZeI2pPZfFb7d6nstlSRpElJV/DRzXYreMk@debbugs.gnu.org X-Gm-Message-State: AOJu0YwMniYtLZJ5IFTYhVgwFeeUxTnOu/yyQDwMPAmKB3syC6SB4jUJ v/tuPhIaHPLzwTv+aswcop4nEL7VpphM9TwcO8v2E06Xg3Ev9Prw X-Google-Smtp-Source: AGHT+IE42FcJh+Q35YXVdG/3lL/mZU+LbPipIviltZq0t5Wruh4Mi+I3iq2T3E1DvVR1lkGAh6LwkA== X-Received: by 2002:a17:903:2349:b0:207:3a53:fe67 with SMTP id d9443c01a7336-2076e37b1d6mr32151145ad.32.1726128372629; Thu, 12 Sep 2024 01:06:12 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:5922:91:f01d:e306]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2076afe9da3sm9895315ad.239.2024.09.12.01.06.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2024 01:06:12 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration From: Yuan Fu In-Reply-To: <865xr2pf2y.fsf@gnu.org> Date: Thu, 12 Sep 2024 01:06:00 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> <86y14fg95n.fsf@gnu.org> <904ED5D6-11A2-4B54-A60C-F972AF3E91B4@gmail.com> <865xr2pf2y.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 64830-done Cc: 64830-done@debbugs.gnu.org, Alan Mackenzie , Stefan Kangas 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 Sep 11, 2024, at 5:09=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Tue, 10 Sep 2024 22:09:04 -0700 >> Cc: stefankangas@gmail.com, >> acm@muc.de, >> 64830@debbugs.gnu.org >>=20 >> Done. Please take a look at the latest patch, thanks! >=20 > LGTM, but... >=20 >> +struct treesit_loaded_lang >> +{ >> + /* The language object. */ >> + TSLanguage *lang; >> + /* The path to the shared library. */ >> + const char *filename; >> +}; >> + >=20 > ..."path" again. >=20 >> +DEFUN ("treesit-grammar-location", Ftreesit_grammar_location, >> + Streesit_grammar_location, >> + 1, 1, 0, >> + doc: /* Return the absolute file name of the grammar file for = LANGUAGE. >> + >> +If LANGUAGE isn't loaded yet, load it first. If the langauge can't = be > ^^^^^^^^ > A typo. Oops (^^;) That=E2=80=99s embarrassing. Ok, I fixed everything and = pushed to master. Also, since the original problem is fixed, closing this report. Yuan= From unknown Sun Jun 22 00:05:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Oct 2024 11:24:07 +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