all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: bosko.ivanisevic@gmail.com, 62416@debbugs.gnu.org,
	Juri Linkov <juri@linkov.net>
Subject: bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode
Date: Sun, 2 Apr 2023 15:34:54 -0700	[thread overview]
Message-ID: <612A0BCF-7E29-4C3F-AFB5-3AB71F32B786@gmail.com> (raw)
In-Reply-To: <8fa7abb8-d9ce-e39e-6507-53c52749ac79@yandex.ru>



> On Mar 30, 2023, at 2:32 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
> On 30/03/2023 10:47, Yuan Fu wrote:
> 
>>> However, there are still a lot of more things that need fixing.
>>> When point is on the left curly bracket in
>>> 
>>>   b = %Q{This is a "string"}
>>> 
>>> 'C-M-f' doesn't move to the right curly bracket.
>>> Also double quotes inside the string are not matched by 'C-M-f'.
>>> 
>>> In
>>> 
>>>   d = %(hello (nested) world)
>>> 
>>> 'C-M-f' doesn't move to the closing parens from opening parens.
>> Have someone fixed these two cases? Because when I tried to invoke
>> (treesit-forward-sexp), point moved to the closing bracket/paren.
> 
> From which position? When point is right before '{', it doesn't move in my testing. It does move when it was before '%'.

Ok, I see it. I’ll try to see what’s going on when I find some time. 

> 
>> Anyway, I just wonder if there’s any fundamental shortcoming with how
>> treesit-beginning/end-of-thing works?
> 
> I don't know. Seems like this method is good for a lot of things, but some fiddly details are going to be different from the default forward-sexp.
> 
> ruby-mode's sexp navigation is also not ideal in its own way, and it's been useful anyway.

One thing I noticed is that treesit-forward-sexp uses treesit-beginning/end-of-thing, which jumps out of the parent when there is no more siblings to go to. The default forward-sexp obviously doesn’t do this. Perhaps we should stay in the same level in tree-sitter-forward-sexp too. 

Yuan




  reply	other threads:[~2023-04-02 22:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 10:24 bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode Boško Ivanišević
2023-03-24 18:41 ` Dmitry Gutov
2023-03-25 19:04   ` Juri Linkov
2023-03-26  2:14     ` Dmitry Gutov
2023-03-27 16:29       ` Juri Linkov
2023-03-27 17:28         ` Dmitry Gutov
2023-03-28  6:31           ` Juri Linkov
2023-03-28 22:24             ` Dmitry Gutov
2023-04-03 16:03               ` Juri Linkov
2023-04-03 20:41                 ` Dmitry Gutov
2023-03-30  7:47 ` Yuan Fu
2023-03-30  9:32   ` Dmitry Gutov
2023-04-02 22:34     ` Yuan Fu [this message]
2023-04-02 22:43       ` Dmitry Gutov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=612A0BCF-7E29-4C3F-AFB5-3AB71F32B786@gmail.com \
    --to=casouri@gmail.com \
    --cc=62416@debbugs.gnu.org \
    --cc=bosko.ivanisevic@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.