unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61374@debbugs.gnu.org, spacibba@aol.com, casouri@gmail.com
Subject: bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter
Date: Thu, 09 Feb 2023 10:41:52 +0100	[thread overview]
Message-ID: <87y1p79nvj.fsf@thornhill.no> (raw)
In-Reply-To: <83fsbfmd75.fsf@gnu.org>

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





  reply	other threads:[~2023-02-09  9:41 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 [this message]
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
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=87y1p79nvj.fsf@thornhill.no \
    --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).