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#60559: 29.0.60; "Cannot activate tree-sitter" spam Date: Thu, 05 Jan 2023 08:51:44 +0200 Message-ID: <83h6x5xym7.fsf@gnu.org> References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38624"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60559@debbugs.gnu.org, epg@pretzelnet.org, mardani29@yahoo.es To: Fu Yuan , Stefan Monnier , Lars Ingebrigtsen , Theodor Thornhill , Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 07:52:22 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 1pDK6w-0009r6-TF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 07:52:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDK6e-0007fk-1u; Thu, 05 Jan 2023 01:52:04 -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 1pDK6d-0007fW-0r for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 01:52:03 -0500 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 1pDK6c-0003kk-Mu for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 01:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDK6c-0006DQ-BT for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 01:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2023 06:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix notabug Original-Received: via spool by 60559-submit@debbugs.gnu.org id=B60559.167290150023864 (code B ref 60559); Thu, 05 Jan 2023 06:52:02 +0000 Original-Received: (at 60559) by debbugs.gnu.org; 5 Jan 2023 06:51:40 +0000 Original-Received: from localhost ([127.0.0.1]:50069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDK6F-0006Cq-Ge for submit@debbugs.gnu.org; Thu, 05 Jan 2023 01:51:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDK6D-0006Ca-73 for 60559@debbugs.gnu.org; Thu, 05 Jan 2023 01:51:37 -0500 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 1pDK66-000399-Sp; Thu, 05 Jan 2023 01:51:30 -0500 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=I80D6Rk31eXJ1JeBGc6Fw0tdFjToD+GeUzob8zJvZgQ=; b=QXl0KYIA35nFAsSMazre bHzrMntJRwocIiRC4ncdELbODTRIBIklSwoMqna4jKhum4Q9jL3YNgxjIcqxsbQN+G3HJG/9BZaDF RyRdulesOSEwY4YUSls1roLBeJ+99UvQ0IMkVFMvxTO7k9hZx7j+sw4ZWf3KOLYsQ3L98wbY+C8C+ 01AeR1plb6lR7tyEU7btuFUaFIV1p53v2TmfwcIrMEF6Fgs/yvnio1yoA1k65kI866qwFnbTOscl4 0kdIM8oGrIArFlH6As8J4/kEiuAHkxxQnKtWsab2cYuKFL7UFRLfH9XVyd9n9GesRvbkE47iJmrec Hx6wVT5Xph0EhA==; 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 1pDK66-0003o9-9f; Thu, 05 Jan 2023 01:51:30 -0500 In-Reply-To: <83o7rexe2n.fsf@gnu.org> (message from Eli Zaretskii on Wed, 04 Jan 2023 22:03:12 +0200) 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:252557 Archived-At: > Cc: 60559@debbugs.gnu.org, epg@pretzelnet.org > Date: Wed, 04 Jan 2023 22:03:12 +0200 > From: Eli Zaretskii > > > From: Daniel Martín > > Cc: Eric Gillespie , 60559@debbugs.gnu.org > > Date: Wed, 04 Jan 2023 20:40:24 +0100 > > > > Eli Zaretskii writes: > > > > > > > > This is not a bug. Emacs 29 comes with major modes for TOML files and > > > for Dockerfiles, and those new major modes require that you build > > > Emacs with the tree-sitter library (and install the corresponding > > > parser grammar libraries). If you don't want to do that, you can > > > instead customize auto-mode-alist to make Emacs use Fundamental mode > > > (or any other mode you like) for these two file types. > > > > Isn't this another manifestation of what's being discussed in bug#60511? > > I also think that treesit-ready-p should not emit a warning by default, > > it's too noisy and confusing for people that don't know about > > Tree-sitter and consequently use a build of Emacs 29 without Tree-sitter > > enabled. > > That is one use case. The other, no less important one, is when the > user thinks his/her Emacs is built with tree-sitter and has the > relevant stuff installed, whereas the reality is different. Silently > doing nothing in that case is hardly TRT. > > So if we want to solve this, we need to find a solution that fits both > of these use cases. So here's a suggestion for such a solution: we make all the *-ts-mode's optional. That is, we don't add any of them to auto-mode-alist unless the file *-ts-mode.el is loaded, and we document them all in NEWS and the user manual as optional. users who want them will have to manually activate them. This way, the original use case that started this bug report is automatically solved, and the other use case, where the user intends to activate one of these modes, is also served by showing the warning, which in that case is perfectly justified: the user asked for something that we cannot do, so we warn him/her. This is a retreat of sorts, but I think it strikes a better balance wrt user expectations, assuming not everyone will build with tree-sitter. Any comments or objections? If not, I will do this in a couple of days on the emacs-29 branch.