GNU bug report logs - #75198
31.0.50; [treesitter] peculiar error

Previous Next

Package: emacs;

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 #16 received at 75198 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: germanp82 <at> hotmail.com, 75198 <at> debbugs.gnu.org,
 Andreas Kurth <emacs <at> akurth.de>
Subject: Re: bug#75198: 31.0.50; [treesitter] peculiar error
Date: Sat, 4 Jan 2025 00:26:08 -0800

> On Dec 30, 2024, at 9:54 AM, Juri Linkov <juri <at> linkov.net> wrote:
> 
> close 75198 31.0.50
> thanks
> 
>>> M-x bash-ts-mode
>>> Move cursor
>>> 
>>> peculiar error: ("Cannot find the definition of the predicate in
>>> `treesit-thing-settings'" sexp-list)
>>> 
>>> Emacs becomes pretty much unusable after that.
>> 
>> I rather suspect 1addae07be1982a6cafc0e0b3955b59bd1fb481c "Treesit
>> support for show-paren-mode". At least by commenting out line 3592
>> 
>>  (setq-local show-paren-data-function 'treesit-show-paren-data)
>> 
>> in treesit.el I can work around the problem.
> 
> Sorry, this is fixed now.
> 
> 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. 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.

Yuan



This bug report was last modified 135 days ago.

Previous Next


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