Subject: Re: bug#60559: 29.0.60; "Cannot activate tree-sitter" spam

From: Gregory Heytings <[email-masked]>
Date: Thu, 05 Jan 2023 08:48:11 +0000

>
> 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.