GNU bug report logs -
#75198
31.0.50; [treesitter] peculiar error
Previous Next
Reported by: German Pacenza <germanp82 <at> hotmail.com>
Date: Mon, 30 Dec 2024 12:33:01 UTC
Severity: normal
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 75198 <at> debbugs.gnu.org (full text, mbox):
>> The problem is that 'treesit-parent-until' raises an error by default.
>> So needed to copy its implementation where treesit-node-match-p
>> sets the argument IGNORE-MISSING to t.
>>
>> Or maybe better to add new arg IGNORE-MISSING to treesit-parent-until.
>
> Hmm, I’m not sure. If we go this route, we’d need to add IGNORE-MISSING for
> every single function that uses treesit-node-match-p.
Agreed, adding a new arg to all such functions is not the right thing.
Then maybe better to define the preferred behavior
by a new dynamically bound variable, e.g.
(let ((treesit-raise-error t)) (treesit-parent-until ... pred))
> It’s better for these functions to check whether the definition of the
> thing they’re going to use exists or not, before calling
> treesit-node-match-p; alternatively, if they know they don’t care,
> they can pass t to IGNORE-MISSING.
Not sure how much this will degrade the performance of
every function that uses treesit-node-match-p.
This bug report was last modified 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.