GNU bug report logs -
#62086
29.0.60; ruby-ts-mode regressions
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 9 Mar 2023 17:28:02 UTC
Severity: normal
Fixed in version 29.0.60
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #70 received at 62086 <at> debbugs.gnu.org (full text, mbox):
On 12/04/2023 18:31, Dmitry Gutov wrote:
> On 12/04/2023 10:05, Yuan Fu wrote:
>> Actually, would it make sense to define sexp as “anything but some
>> very small punctuation and delimiters”?
>
> Pretty much. If I understood you correctly.
>
> E.g. in ruby-ts-mode identifiers and numbers are also sexps.
Allow me to update that.
From the previous threads, for ruby-ts-mode at least, we seem to have
concluded that it's best to treat those nodes as sexps which have
visible boundaries that are visible and don't overlay exactly the
boundaries of the contained nodes.
For example, we now exclude statement nodes and binary expression nodes
because both make forward/backward-sexp less obvious and predictable:
you move point to the beginning of 'a + b', press C-M-f, and if the jump
happens over the whole expression, this is just as likely to mismatch
the user's intention (which might have wanted to only jump over 'a'). So
these are the node we rule out.
The easiest choice would be to go back to treating only
braces/brackets/parens are sexp delimiters, but in Ruby, at least, we
have lots of constructs that are delimited with keywords (such as 'if',
'def', 'end'), so that doesn't work. Maybe it'll work better in C/C++,
where you mostly need to be able to differentiate between different
types of angle brackets.
This bug report was last modified 2 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.