GNU bug report logs - #60559
29.0.60; "Cannot activate tree-sitter" spam

Previous Next

Package: emacs;

Reported by: Eric Gillespie <epg <at> pretzelnet.org>

Date: Wed, 4 Jan 2023 17:28:01 UTC

Severity: normal

Tags: notabug, wontfix

Merged with 60176, 60874

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: casouri <at> gmail.com, 60559 <at> debbugs.gnu.org, theo <at> thornhill.no,
 mardani29 <at> yahoo.es, jostein <at> secure.kjonigsen.net, monnier <at> iro.umontreal.ca,
 larsi <at> gnus.org, epg <at> pretzelnet.org
Subject: Re: bug#60559: 29.0.60; "Cannot activate tree-sitter" spam
Date: Thu, 05 Jan 2023 11:00:31 +0200
> Date: Thu, 05 Jan 2023 08:48:11 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: Fu Yuan <casouri <at> gmail.com>, 60559 <at> debbugs.gnu.org, 
>     Theodor Thornhill <theo <at> thornhill.no>, mardani29 <at> yahoo.es, 
>     Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>, 
>     Stefan Monnier <monnier <at> iro.umontreal.ca>, 
>     Lars Ingebrigtsen <larsi <at> gnus.org>, epg <at> 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.




This bug report was last modified 2 years and 118 days ago.

Previous Next


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