GNU bug report logs - #66183
elixir-ts-mode test failure

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Sun, 24 Sep 2023 18:09:02 UTC

Severity: normal

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Bug Report Emacs <bug-gnu-emacs <at> gnu.org>, john muhl <jm <at> pub.pink>,
 66183-done <at> debbugs.gnu.org
Subject: Re: bug#66183: elixir-ts-mode test failure
Date: Wed, 27 Sep 2023 09:17:51 +0200
Yuan Fu <casouri <at> gmail.com> writes:

>> On Sep 26, 2023, at 1:26 PM, Wilhelm Kirschbaum 
>> <wkirschbaum <at> gmail.com> wrote:
>> 
>>>>> need to adjust it but the idea is there.
>>>>> With the new language-at-point definition, 
>>>>> treesit-language-at can
>>>>> return the correct language, and the test passes again.
>>>>> Yuan
>>>>> [2. text/x-patch; example.diff]...
>>>> This seems to work if you set named on: 
>>>> treesit-node-prev-sibling,
>>>> otherwise it just tries to match the \"\"\" against H or F.
>>>> (let* ((node (treesit-node-at point 'elixir)))
>>>>   (if (and (equal (treesit-node-type node) "quoted_content")
>>>>            (string-match-p
>>>>             (rx bos (or "H" "F") eos)
>>>> -              (treesit-node-text (treesit-node-prev-sibling 
>>>> node))))
>>>> +              (treesit-node-text (treesit-node-prev-sibling 
>>>> node t))))
>>>>       'heex
>>>>     'elixir)))
>>>> I will spend some time in the next couple of hours to catch 
>>>> up to all
>>>> the changes.
>>> 
>>> Ah, right. I’ll leave the specifics to you. As long as the 
>>> language
>>> is derived from the node at point rather than parser range, it 
>>> will
>>> be fine. Also, there’s no rush.
>>> 
>> 
>> Hi Yuan,
>> 
>> With the new changes I had to update some indentation rules as 
>> well.
>> The following patch was tested against a couple of elixir 
>> files.
>> 
>> There is another indentation issue with HEEx embeds, but think 
>> its
>> unrelated to this issue and will have a look this weekend.
>> 
>
> [2. text/x-patch; 
> 0001-Fix-treesit-langauge-at-point-for-elixir-ts-mode.patch]...
>
>> 
>> Wilhelm
>
> Thanks. I made some minor change and pushed to master.
>
> Yuan

Fantastic, thanks!




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

Previous Next


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