From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64487: 29.0.92; Another tree-sitter warning inside Custom Date: Mon, 26 Feb 2024 18:25:33 +0200 Message-ID: <5be41fcf-f728-4bd4-9cb6-41c751457ddb@gutov.dev> References: <871qhlmssz.fsf.ref@yahoo.com> <871qhlmssz.fsf@yahoo.com> <83a5w9ieti.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6210"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 64487@debbugs.gnu.org To: Eli Zaretskii , Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 26 18:22:56 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1reego-0001HK-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Feb 2024 18:22:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reegY-0006NH-4v; Mon, 26 Feb 2024 12:22:38 -0500 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 1reegW-0006My-Nc for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 12:22:36 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reegW-0004aK-GD for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 12:22:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reegv-0002I5-M8 for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 12:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 17:23:01 +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.17089681658758 (code B ref 64487); Mon, 26 Feb 2024 17:23:01 +0000 Original-Received: (at 64487) by debbugs.gnu.org; 26 Feb 2024 17:22:45 +0000 Original-Received: from localhost ([127.0.0.1]:50839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reege-0002HB-Qb for submit@debbugs.gnu.org; Mon, 26 Feb 2024 12:22:45 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:48573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reegc-0002Gg-1R for 64487@debbugs.gnu.org; Mon, 26 Feb 2024 12:22:43 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 00811320077A; Mon, 26 Feb 2024 11:25:36 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 26 Feb 2024 11:25:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1708964736; x=1709051136; bh=PpvkKeuvd6GYVHTJS481jFo1vFB0IPpPDOAfYf4RFzM=; b= VrVt+/zGhXcOGOadCd+RCrMQ1FdH7midjMFwLDBhilCKr1SK+QO2AVTC/6KxaxhC qfwI6GxnlrOsiL2JPU5bB589iyltiNKr6Wq3VAQ9jmLvvZpEj5ol1XdQZrgrupKD LlUwotNtMMx8n0l/OhXVEYCehyQVjgs3pubPXoOb51k3AcuxtIPPz7gYWHSd6g7S zVpKrNvM9HlBOTSVLryaUb4TTNdVSQy7ZataXFcT64C3rm0y2gePvsXV+3+wfrPR Mnvz3sEEL4uZsakiwRKVYfTFqkjM5ein/SixqBaBp9oD8u895Xj55koZnqZervhG iZ9O6kTVKalzbdoBSz9fxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708964736; x= 1709051136; bh=PpvkKeuvd6GYVHTJS481jFo1vFB0IPpPDOAfYf4RFzM=; b=f 275TTDB9vn3gRjBZI1BifNL0/cefGIlWMKDlsVhtzY8RF41iImTi2JV16/Y2oYYr tPa24XV3wOcdRzamy7bC61ce7APRA0RdUpPCW9vlNBjpbemU0IUah3PDJbppeizl HZIVgBKNfC6hsE1dkUeR7fZ4O30w3L0apYn+DWOGR14CIUQ3K9NzY+HJEacj3kG2 qu69jz+I2gdsIoIlZ1faaaxgDIWJJypWTtzk6D4gRDvbdSb4Onqy7+bIaAZGc7dq ZWp+WogQwi9zs5Mj+AH2euzinZlMn65vzRucDA7Q1kTahtCkXovzu1AExOYbYvkN +wCVqq6uiYw6MhX1L6y7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgedvgdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Feb 2024 11:25:35 -0500 (EST) Content-Language: en-US In-Reply-To: <83a5w9ieti.fsf@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:280694 Archived-At: On 06/07/2023 12:12, Eli Zaretskii wrote: >> 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. Which was never a problem before when simply loading a package didn't alter auto-mode-alist. >> 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. Suppose the grammar is actually available. Perhaps the user had compiled it at some point, or perhaps it's installed system-wide due to another dependency. Do I understand it right that performing the simple steps that Po Lu outlined would silently assign ruby-ts-mode to *.rb files? And a bunch of other such modes that get loaded as well. But only until the end of the session.