From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64487: 29.0.92; Another tree-sitter warning inside Custom Date: Thu, 06 Jul 2023 12:12:25 +0300 Message-ID: <83a5w9ieti.fsf@gnu.org> References: <871qhlmssz.fsf.ref@yahoo.com> <871qhlmssz.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38321"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64487@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 06 11:13:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHL3A-0009rK-GF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jul 2023 11:13:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHL2u-0001oU-HJ; Thu, 06 Jul 2023 05:13:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHL2s-0001nT-TF for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 05:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHL2s-0005M3-Ju for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 05:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qHL2s-00079A-FM for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 05:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jul 2023 09:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64487 X-GNU-PR-Package: emacs Original-Received: via spool by 64487-submit@debbugs.gnu.org id=B64487.168863475327435 (code B ref 64487); Thu, 06 Jul 2023 09:13:02 +0000 Original-Received: (at 64487) by debbugs.gnu.org; 6 Jul 2023 09:12:33 +0000 Original-Received: from localhost ([127.0.0.1]:39583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHL2P-00078R-EG for submit@debbugs.gnu.org; Thu, 06 Jul 2023 05:12:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHL2N-00078E-NQ for 64487@debbugs.gnu.org; Thu, 06 Jul 2023 05:12:32 -0400 Original-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 1qHL2I-0005GN-Fj; Thu, 06 Jul 2023 05:12:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lRDdAhUp73v95xwcYkO29s2Emqsi+9IKCPKX/SzqOyM=; b=ZkaylRiD9kdE 8W4nXDjUlnhCpz1Jj7Q5xjkkz7O5cf4/z5wtymryr6iwfgEY6qEp8qA6UotcCjV82HbE4FW3vha9j gvQ3O3lhuIj8ays7ErCn+fgmclZ+rNTAQPWtGq+qDdwaQW4UpBoS001KPubOhg4km1ryaj6S/lt3l Iba4bmYgwZi6nAcPwAOaHsuZo5Z6i98tS3E4CCoSXIldRio/Eg5II1Ob+h0H8m3yYn5dBnnyxxr31 SIl8DZWcCgUhynaeuZXjvnewGUD3xThsdejyy3jRt34gyaGWJ/6GN24JJx1MY/6lNW1cwFeCaIktG UD4e6GJ2tELWf41lR5I7gA==; Original-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 1qHL2H-0005WT-UL; Thu, 06 Jul 2023 05:12:26 -0400 In-Reply-To: <871qhlmssz.fsf@yahoo.com> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264670 Archived-At: > Date: Thu, 06 Jul 2023 14:56:44 +0800 > From: Po Lu via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Type M-x customize RET. Click Programming and then Languages. A > *Warnings* buffer will be displayed containing the following message: > > Warning (treesit): Cannot activate tree-sitter, because language > grammar for ruby is unavailable (not-found): (libtree-sitter-ruby > libtree-sitter-ruby.0 libtree-sitter-ruby.0.0 libtree-sitter-ruby.so > libtree-sitter-ruby.so.0 libtree-sitter-ruby.so.0.0) No such file or > directory When you customize a group, Custom loads all the packages that belong to the group. So in this case it loads ruby-ts-mode, and you get the warning. > Can't these messages only be displayed when a tree-sitter major mode is > enabled, as opposed to whenever the file implementing the major mode is > loaded? Emacs 29 deliberately checks for the grammar's availability when the package is loaded, to give users a prominent indication that the loaded package will not work. This won't change in Emacs 29, but maybe as part of rethinking this after releasing Emacs 29 we could improve the situation with customizing a group as well. Anyway, the warning is just a warning, and is otherwise harmless. It also only appears when Emacs has been built with tree-sitter, but the grammar libraries required by some *-ts-mode's are not installed.