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
View this message in rfc822 format
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: juri <at> linkov.net, casouri <at> gmail.com, mickey <at> masteringemacs.org,
> 73404 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> Date: Sun, 05 Jan 2025 13:30:31 +0100
>
> > Is this goal achievable in practice, given the sometimes radical
> > differences between languages? Maybe we only can have examples and
> > some dwim-ish behavior in most cases?
>
> I'm not sure if it is achievable or not, but I think it'd be nice to
> avoid any "hand-waviness" to confuse us while we talk about
> sexps/lists/etc. I could try to document thoroughly how lisp-modes and
> cc modes implement these and see if we have some glaring discrepancies
> between just those two?
They are not "discrepancies", and certainly not "glaring", but there
are differences. E.g., in c-ts-mode, we support "lists" enclosed in
(..), {..}, and <..> (but not [..], for some reason). You will not
find anything like that in Lisp-like languages.
So, if we want to have a broader picture, we will need to try more
modes. Can you or someone produce an exhaustive list of all TS modes
we have that implement these movement commands? Then we could try the
commands in each one of those modes and see if there are common
patterns that we can name and describe.
For now, my conclusion was that (almost) every parenthetical grouping
supported by the language grammar can be moved across with these
commands. But I only tried Lisp and c-ts-mode.
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.