unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 62086@debbugs.gnu.org, Theodor Thornhill <theo@thornhill.no>,
	Juri Linkov <juri@linkov.net>
Subject: bug#62086: 29.0.60; ruby-ts-mode regressions
Date: Wed, 12 Apr 2023 14:50:04 -0700	[thread overview]
Message-ID: <F418C245-DB0C-41A2-8E3A-2484826B66E8@gmail.com> (raw)
In-Reply-To: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru>



> On Apr 12, 2023, at 1:13 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
> 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.

User might as well want to move over the whole expression, since they can use forward-word if they want to move over smaller elements. But I guess that’s just personal preferences.

> 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.

To clarify, my point is to define sexp by exclusion rather than inclusion, ie, defining a set of nodes that are not sexp, rather than defining a set of nodes that are sexp. I mentioned delimiters because they are excluded from sexp, not because they delimit sexp.

Yuan




  reply	other threads:[~2023-04-12 21:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 17:24 bug#62086: 29.0.60; ruby-ts-mode regressions Juri Linkov
2023-03-09 18:08 ` Eli Zaretskii
2023-03-10  7:29   ` Juri Linkov
2023-03-09 22:02 ` Dmitry Gutov
2023-03-10  7:35   ` Juri Linkov
2023-03-10 16:37     ` Dmitry Gutov
2023-04-03 16:29   ` Juri Linkov
2023-04-03 20:42     ` Dmitry Gutov
2023-04-04  7:16       ` Juri Linkov
2023-04-05  0:06         ` Dmitry Gutov
2023-04-05  6:24           ` Juri Linkov
2023-04-05 14:58             ` Dmitry Gutov
2023-04-05 16:25               ` Juri Linkov
2023-04-05 16:36                 ` Dmitry Gutov
2023-04-11 16:53                   ` Juri Linkov
2023-04-11 23:30                     ` Dmitry Gutov
2023-04-12  7:05                       ` Yuan Fu
2023-04-12 15:31                         ` Dmitry Gutov
2023-04-12 20:13                           ` Dmitry Gutov
2023-04-12 21:50                             ` Yuan Fu [this message]
2023-04-12 21:56                               ` Dmitry Gutov
2023-04-12 22:11                                 ` Yuan Fu
2023-04-15  0:08                                   ` Yuan Fu
2023-04-13 17:42                             ` Juri Linkov
2023-04-14 17:03                               ` Juri Linkov
2023-04-12  7:30                       ` Eli Zaretskii
2023-04-12 15:31                         ` Dmitry Gutov
2023-04-12 15:40                           ` Eli Zaretskii

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=F418C245-DB0C-41A2-8E3A-2484826B66E8@gmail.com \
    --to=casouri@gmail.com \
    --cc=62086@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    --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).