GNU bug report logs - #64487
29.0.92; Another tree-sitter warning inside Custom

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Thu, 6 Jul 2023 06:58:01 UTC

Severity: normal

Merged with 79180

Found in versions 29.0.92, 31.0.50

Full log


Message #11 received at 64487 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Willcock <morgan <at> ice9.digital>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Po Lu <luangruo <at> yahoo.com>, 64487 <at> debbugs.gnu.org
Subject: Re: bug#64487: 29.0.92; Another tree-sitter warning inside Custom
Date: Mon, 26 Feb 2024 11:13:40 +0000
Eli Zaretskii <eliz <at> gnu.org> 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" <bug-gnu-emacs <at> gnu.org>
>> 
>> 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




This bug report was last modified 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.