GNU bug report logs -
#73404
30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes
Previous Next
Reported by: Mickey Petersen <mickey <at> masteringemacs.org>
Date: Sat, 21 Sep 2024 05:13:01 UTC
Severity: normal
Merged with 74366
Found in version 30.0.50
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 #148 received at 73404 <at> debbugs.gnu.org (full text, mbox):
> On Dec 29, 2024, at 11:15 PM, Juri Linkov <juri <at> linkov.net> wrote:
>
>> Also added 'sexp-list' to c-ts-mode, js-ts-mode, ruby-ts-mode and
>> html-ts-mode. Addition of 'sexp-list' to other ts-modes is underway.
>
> BTW, my initial intention was to add the thing 'list'.
> But then I discovered that (treesit-thing-next (point) 'list)
> uses the function 'list' instead of the thing 'list'.
>
> However, the current 'sexp-list' as a two-word composite is too ugly.
> Now I found a better replacement: 'group'. This word is already used
> in lisp.el such as in the docstring of 'forward-list':
>
> "Move forward across one balanced group of parentheses."
>
> And the error messages: "No next group".
>
> So exactly the same message will be used by
>
> (format-message "No next %S" pred)
>
> where 'pred' will be 'group'. IMHO, this looks better:
>
> (setq-local treesit-thing-settings
> `((html
> (sexp ,(regexp-opt '("element" "text" "attribute" "value")))
> (group ,(regexp-opt '("element"")))
> (sentence "tag")
> (text ,(regexp-opt '("comment" "text"))))))
I don’t have an opinion on this. Groups sounds a bit abstract, but so does sexp-list. So as long as we do a good job explaining the concept, it should be fine.
Yuan
This bug report was last modified 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.