GNU bug report logs -
#72489
29.4.50; forward-comment not working as expected in toml-ts-mode
Previous Next
Reported by: Yang Yingchao <yang.yingchao <at> qq.com>
Date: Tue, 6 Aug 2024 06:08:01 UTC
Severity: normal
Found in version 29.4.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> On 7 Aug 2024, at 03:02, Yang Yingchao <yang.yingchao <at> qq.com> wrote:
>
> I think the error in your case also proves the misbehavior of forward-comment, and it breaks `uncomment-region' in my case. And with the suggested fix applied, and then recompile/evaluate, `uncomment-region' works as expected.
>
>> Yang: Have you loaded/compiled/provided the toml typescript-grammar before using this mode?
>>
>> The *-ts-modes depends on external grammar in order to properly initialize the major-mode and provide correct highlighting and indentation.
>
> I only have the required shared libraries (libtree-sitter.so & libtree-sitter-toml.so) installed. This should be enough, right? At least `treesit-explore-mode' works fine in toml buffer.
>
> Regards,
>
> -- *Yang Yingchao*
I've recompiled from scratch and confirm this indeed fixes all issues mentioned.
Eli: Feel free to apply the supplied patch. I still don't have commit access :)
https://github.com/emacs-mirror/emacs/blob/e993e479c324bb720bca3f1cf194e55e32f01ccd/lisp/textmodes/toml-ts-mode.el#L53
> ```
> - (modify-syntax-entry ?\n "> b" table)
> + (modify-syntax-entry ?\n ">" table)
> ```
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.