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

From: Dmitry Gutov <[email-masked]>
Date: Thu, 5 Jan 2023 15:17:36 +0200

On 05/01/2023 08:51, Eli Zaretskii wrote:
> 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.

Personally, I'd rather the users be made aware that they can install 
such-and-such grammars and enjoy good support for the file types they 
just visited.

I understand that it can be a bother for people who are used to just 
editing such files using fundamental-mode, but they could similarly 
complain if we added a major mode (for a given file type) that is 
functional but still different from the "last 25 years".

So I agree with your original assessment that it's not a bug.

What we could do here, though, to reduce the aggravation:

- Move the warning to *Messages*. It will be slightly less noticeable, 
but won't occupy "half the screen" either.

and/or

- Add a new defcustom which would allow people to silence the 
tree-sitter related warnings altogether. tree-sitter major modes without 
available grammars work more or less like fundamental-mode.

Or we can just recommend such users edit their auto-mode-alist to 
associate fundamental-mode with those file types. That only takes a few 
minutes.