From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 61374@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>, casouri@gmail.com
Subject: bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter
Date: Thu, 9 Feb 2023 17:14:03 +0100 [thread overview]
Message-ID: <20230209161403.xfh5b2emefivrjai@Ergus> (raw)
In-Reply-To: <87sfff9jum.fsf@thornhill.no>
On Thu, Feb 09, 2023 at 12:08:49PM +0100, Theodor Thornhill wrote:
>Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Theodor Thornhill <theo@thornhill.no>
>>> Cc: spacibba@aol.com, casouri@gmail.com, 61374@debbugs.gnu.org
>>> Date: Thu, 09 Feb 2023 10:41:52 +0100
>>>
>>> > 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.
>>
>> Sounds like the treesit sexp movement doesn't have any notion of the
>> "level" of the sexp or something? IOW, it doesn't know about the
>> "innermost" sexp at point? If so, can we teach treesit.el about that?
>>
>
>Yes, I think we should too. I'll look into it.
>
Hi:
I am not aware of the details in the treesit.el implementation for
emacs, but the treesit-api already provides the ts_node_start_point and
ts_node_end_point functions which are intended for this use.
Are we relying on that?
>> Or am I missing the point?
>
>Nope, don't think so!
>
>Theo
next prev parent reply other threads:[~2023-02-09 16:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <875ycbitav.fsf.ref@aol.com>
2023-02-09 0:19 ` bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 6:40 ` Eli Zaretskii
2023-02-09 6:49 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 8:42 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 8:54 ` Eli Zaretskii
2023-02-09 9:41 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 10:52 ` Eli Zaretskii
2023-02-09 11:08 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 16:14 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-09 17:47 ` Juri Linkov
2023-02-09 19:53 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-14 8:50 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-14 10:50 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19 2:15 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19 6:22 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-20 20:19 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230209161403.xfh5b2emefivrjai@Ergus \
--to=bug-gnu-emacs@gnu.org \
--cc=61374@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=spacibba@aol.com \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).