GNU bug report logs - #60511
29.0.50; treesit-ready-p should not emit warning by default

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Tue, 3 Jan 2023 11:20:02 UTC

Severity: wishlist

Found in version 29.0.50

Full log


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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>
Cc: 60511 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60511: 29.0.50;
 treesit-ready-p should not emit warning by default
Date: Sun, 8 Jan 2023 10:14:07 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I can make treesit-ready-p not emit any warning by default, and change
>> the quiet parameter to WARN, and accept either 'warn or ‘message.
>>
>> Basically:
>>
>> (treesit-ready-p lang) => t/nil
>> (treesit-ready-p lang 'warn) => t/emit warning
>> (treesit-ready-p lang 'message) => t/message

This makes sense to me.

>> Eli, WDYT?
>
> I think the default should be to emit a warning, like we do now.

In that case, it would be better to rename `treesit-ready-p' to reflect
that it's not a predicate function.  I believe Juri suggested the name
`treesit-check-readiness'.

Then there's the question if we want a predicate function for this too.
I think it would be useful.

> We should support the main use case of the user turning on a TS mode
> when the required libraries are not installed or incompatible with our
> requirements.  Silently doing nothing in that case is not TRT.

To be clear, I did not suggest changing that behavior.




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

Previous Next


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