[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter
From: |
Theodor Thornhill |
Subject: |
bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter |
Date: |
Thu, 09 Feb 2023 10:41:52 +0100 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Theodor Thornhill <theo@thornhill.no>
>> Cc: 61374@debbugs.gnu.org
>> Date: Thu, 09 Feb 2023 09:42:43 +0100
>>
>> I think to remember why I decided on the current settings in
>> 'treesit-sexp-type-regexp' - compound_statement is very frequently used
>> in the c/c++ grammars, and iirc that makes sexp-moving almost always
>> move to end of the next or current compound_statement.
>
> Can you show some examples that illustrate these issues? I'm not sure
> I follow your line of reasoning, and thus cannot understand the
> relevant considerations and decisions, and their expected effects on
> behavior.
>
> Thanks.
consider same code as in the first mail:
{
vector<int> myvar;
}
If point is before the first curly, C-M-f will move to after the semi.
if "compound_statement" is added to the regexps, it will move to after
the closing curly - all good.
Now if point is at the c in 'vector', now we will also move to after the
closing curly, not the first space or after the semi.
This will happen in many places iirc. I'm not saying it's unfixable,
just that I need to think a little about it, and some expected examples
would be nice.
Did that help?
Theo
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Ergus, 2023/02/08
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Eli Zaretskii, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Eli Zaretskii, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter,
Theodor Thornhill <=
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Eli Zaretskii, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Ergus, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Juri Linkov, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/09
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Ergus, 2023/02/14
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/14
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Ergus, 2023/02/18
- bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter, Theodor Thornhill, 2023/02/19