From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock Newsgroups: gmane.emacs.bugs Subject: bug#64487: 29.0.92; Another tree-sitter warning inside Custom Date: Mon, 26 Feb 2024 11:13:40 +0000 Message-ID: <86h6hvzdej.fsf@ice9.digital> References: <871qhlmssz.fsf.ref@yahoo.com> <871qhlmssz.fsf@yahoo.com> <83a5w9ieti.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19783"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Po Lu , 64487@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 26 12:21:01 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 1reZ2X-0004vq-ST for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Feb 2024 12:20:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reZ2L-0004Bp-Eh; Mon, 26 Feb 2024 06:20:45 -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 1reZ2D-0004BC-KY for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 06:20:38 -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 1reZ2D-0001M8-Cd for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 06:20:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reZ2c-0003k8-9c for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 06:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Morgan Willcock Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 11:21: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.170894643114300 (code B ref 64487); Mon, 26 Feb 2024 11:21:02 +0000 Original-Received: (at 64487) by debbugs.gnu.org; 26 Feb 2024 11:20:31 +0000 Original-Received: from localhost ([127.0.0.1]:56177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reZ26-0003iW-Qt for submit@debbugs.gnu.org; Mon, 26 Feb 2024 06:20:31 -0500 Original-Received: from mslow1.mail.gandi.net ([217.70.178.240]:38817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reZ23-0003iB-86 for 64487@debbugs.gnu.org; Mon, 26 Feb 2024 06:20:29 -0500 Original-Received: from relay9-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::229]) by mslow1.mail.gandi.net (Postfix) with ESMTP id DBE38C22D7 for <64487@debbugs.gnu.org>; Mon, 26 Feb 2024 11:14:01 +0000 (UTC) Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 25B33FF804; Mon, 26 Feb 2024 11:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1708946021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OjEyjCykawn4bEmLAjXRNtCzTFL0rszEiSR/X2UBIQQ=; b=GKBsBALMjmvngpTJqThHs6ou2omN/U9hETZCdRXVvppRzKI1rTJB2iprvm0Wxmx787xvVJ e1gFlG9cwLMnCr79lrV/hp2VTDSeFfaH4h1nIz+zetHbp17w7BKJslm1EgcusCjxkcRpVF fwLxmmEN2e0Woj20x7lkvTMhs4gY61hJpcFAwtTJ3ze0Tux+guUwIHFFAGsluEx6P6+nwq FAMrBj36+WIw4vevIu8KeU8Tbj3CFwWlmMnRqOi6cru5px7fOLQZE8hXXdZucLaG0vnZQk YsffeoNpUMGNKm+7X58cGIQStfOIC6BZUdT6pNf56yTiFqXeVsnvs09lb3En2Q== In-Reply-To: <83a5w9ieti.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Jul 2023 12:12:25 +0300") X-GND-Sasl: morgan@ice9.digital 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:280657 Archived-At: Eli Zaretskii writes: >> 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. I don't think this situation will be particularly rare for people who choose to download the pre-built Windows binaries. And I imagine that people choosing to acquire and run the program this way (possibly because they do not know how to build the program themselves) would probably be confused as to why the "out-of-the-box" experience is generating warnings for features they are not actively trying to use. -- Morgan Willcock