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 11:00:31 +0200 Message-ID: <83zgaxwe34.fsf@gnu.org> References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <8dea9f3e0ea979c713da@heytings.org> <8dea9f3e0ec5d0bfd26b@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34965"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 60559@debbugs.gnu.org, theo@thornhill.no, mardani29@yahoo.es, jostein@secure.kjonigsen.net, monnier@iro.umontreal.ca, larsi@gnus.org, epg@pretzelnet.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 10:01:23 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 1pDM7m-0008q5-HX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 10:01:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDM7V-0006Go-5t; Thu, 05 Jan 2023 04:01:05 -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 1pDM7S-0006Cc-Tr for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 04:01:02 -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 1pDM7S-0007vj-I1 for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 04:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDM7S-0003ZN-59 for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 04:01: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 09:01: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.167290922913670 (code B ref 60559); Thu, 05 Jan 2023 09:01:02 +0000 Original-Received: (at 60559) by debbugs.gnu.org; 5 Jan 2023 09:00:29 +0000 Original-Received: from localhost ([127.0.0.1]:50256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDM6v-0003YL-4D for submit@debbugs.gnu.org; Thu, 05 Jan 2023 04:00:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDM6s-0003Y7-Oe for 60559@debbugs.gnu.org; Thu, 05 Jan 2023 04:00:27 -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 1pDM6m-0007nE-Mu; Thu, 05 Jan 2023 04:00:20 -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=f9ns2of39OTIpLi0kXr/aJ+35pSUAw8HVavaRcDDLBE=; b=oe/rRG3Tmfu2wR7kAx74 V69QOaAMXskGKI7tmJ9bElRaD+b3CRja4/SKLsXrSihtzqA0G5HpI4+53ly9eZ6h2Xmv6Ztpj1UUH aMuT3iHY9Tn9v59SGkojoYTKPJ1dtaQVF31wSL4Qf6k/IhxklaE15k/HRHQ2U0JtZ7YIMMWe5Ou8h XPQwVyNOLNt0UxrIpm5NCDLxUFkvXk/jnpbTAz6gKfZH7mS2BIDPF3zQw20ne7iQ6Hnpk0P0FRfkz 5l3RHZcf2dqksN3JLT1Ks4FIeaFQBnq5koYpXCt6eQs7zaqqhIHJ8h2LY9uJnCinU4XLEBJACOSsS T0g4RDyVTYM24Q==; 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 1pDM6j-0007aZ-1G; Thu, 05 Jan 2023 04:00:20 -0500 In-Reply-To: <8dea9f3e0ec5d0bfd26b@heytings.org> (message from Gregory Heytings on Thu, 05 Jan 2023 08:48:11 +0000) 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:252582 Archived-At: > Date: Thu, 05 Jan 2023 08:48:11 +0000 > From: Gregory Heytings > cc: Fu Yuan , 60559@debbugs.gnu.org, > Theodor Thornhill , mardani29@yahoo.es, > Jostein Kjønigsen , > Stefan Monnier , > Lars Ingebrigtsen , epg@pretzelnet.org > > > I suggest a slightly different solution: add a global minor mode, say > > 'ts-modes'. Users would only have to add (ts-modes 1) in their init > > files, and the logic would be: > > > > (treesit-available-p) ts-modes > > nil nil => do nothing > > nil t => warning > > t nil => use available tree-sitter modes > > t t => use available tree-sitter modes > > > > This seems more future-proof: otherwise users who want to user the > > available tree-sitter modes would have to require all such modes. ATM > > there are only 19, but Emacs 30 could very well have twice or thrice > > that number of tree-sitter modes. > > And perhaps we could even add a third value for ts-modes, say "no". In > that case tree-sitter modes would not be used even if they are available. > Users may prefer, for one reason or another, to not use them even if they > are available because their system administrator installed them. We discussed a minor mode approach, and discovered it doesn't work well enough, because different modes need different considerations. Moreover, silently doing something depending on whether treesit-available-p returns nil is not the best UX, as I explained up-thread. Actually loading a mode that the user wants is much more natural and easy. P.S. Please disregard the previous email about customizing a list: I was confused when I wrote it.