From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Date: Wed, 12 Apr 2023 23:13:02 +0300 Message-ID: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86cz4l7zjk.fsf@mail.linkov.net> <86ttxww12o.fsf@mail.linkov.net> <865yaakfs7.fsf@mail.linkov.net> <0bd5f2b8-6f0b-09d6-6240-38c742eca19f@yandex.ru> <861qkyfg8l.fsf@mail.linkov.net> <9ceb589f-9325-1607-d1b5-5fd56cb8c3ec@yandex.ru> <86y1myxsrq.fsf@mail.linkov.net> <263c2966-acff-436a-43fd-20f9da8986fb@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16821"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 22:14:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmgrL-00049O-LR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 22:14:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmgqy-0005Sw-HX; Wed, 12 Apr 2023 16:14:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmgqw-0005S6-Fc for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 16:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmgqw-0004RS-71 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 16:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmgqw-0007gQ-31 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 16:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs Original-Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168133039429448 (code B ref 62086); Wed, 12 Apr 2023 20:14:02 +0000 Original-Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 20:13:14 +0000 Original-Received: from localhost ([127.0.0.1]:41870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmgqA-0007et-62 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 16:13:14 -0400 Original-Received: from forward501c.mail.yandex.net ([178.154.239.209]:33952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmgq7-0007ej-Hw for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 16:13:13 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:6413:0:640:1bc4:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id 5D5A85F5A2; Wed, 12 Apr 2023 23:13:09 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 6DdMe83DTCg0-Edqpl9XL; Wed, 12 Apr 2023 23:13:08 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681330388; bh=nDQdIUgXkfuFO2aEGvBIzezjT2SRx6hGtoGdMIZ21hg=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=aOCdZPfJ5P/Pdf7cD1FqRagZIIxbkph79dBCFxFUxE3QlM/aofuvfXDHwfZyrAbM3 fCPv7TCHYWrX+0EIppkyPPZ7noRlJYVyfFwd/i3DpnElQzKGl+Gv+OjZXAXwNmd4lj dPm0/nYU9ZrG4468wwodm2P/HDIebnG+yT3SLPOo= Authentication-Results: mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 69E3F27C0054; Wed, 12 Apr 2023 16:13:06 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 12 Apr 2023 16:13:06 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekiedgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuhffvvehfjggtgfesthekredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgidrrhhuqeenucggtffrrg htthgvrhhnpeelhfegudettdeltdfgfeetgedugfduhfevheefteeiledtudevuedtteev vdfhueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gughhuthhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeffeefleel heehvddqvdelgeejjeejjeeiqdgughhuthhovheppeihrghnuggvgidrrhhusehfrghsth hmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 16:13:03 -0400 (EDT) Content-Language: en-US In-Reply-To: <263c2966-acff-436a-43fd-20f9da8986fb@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259811 Archived-At: 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. 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.