GNU bug report logs - #60127
treesit-end-of-defun: possible bug with clojure grammar

Previous Next

Package: emacs;

Reported by: Danny Freeman <Danny <at> dfreeman.email>

Date: Fri, 16 Dec 2022 18:53:01 UTC

Severity: normal

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Danny Freeman <danny <at> dfreeman.email>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Yuan Fu <casouri <at> gmail.com>, 60127 <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#60127: treesit-end-of-defun: possible bug with clojure grammar
Date: Tue, 17 Jan 2023 10:49:45 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Tue, 17 Jan 2023 01:30:22 -0800
>> Cc: 60127 <at> debbugs.gnu.org,
>>  Danny Freeman <danny <at> dfreeman.email>,
>>  Eli Zaretskii <eliz <at> gnu.org>
>> 
>> 
>> > I’d rather not use treesit_search_dfs, as it does much more work than
>> > the current code. You know what, I can write a custom
>> > ts_node_first_child_for_byte and use that in Emacs, I’ve already done
>> > that for ts_node_parent anyway.
>> 
>> I did that. I tested with the Clojure example and it works fine now.
>> 
>> Eli, we don’t use ts_node_first_child_for_pos for now until tree-sitter
>> fix that function, should I removed the boilerplate for it or should I
>> leave it as-is? I saw you removed ts_node_parent when I did a similar
>> fix.
>
> It should be either removed or #ifdef'ed away, because otherwise GCC
> complains in the MS-Windows build about unused macro.

Thanks for tackling this problem on the Emacs end Yuan. I tested it out
with clojure-ts-mode and it seems to have addressed my problems.
I also took the liberty of linking to your commit in the tree-sitter
github issue in case the maintainers want to take a look at it.

-- 
Danny Freeman




This bug report was last modified 1 year and 259 days ago.

Previous Next


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