From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Date: Wed, 12 Apr 2023 14:50:04 -0700 Message-ID: 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> <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19908"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 23:51:42 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 1pmiNS-0004zs-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 23:51:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmiMv-0004H6-UM; Wed, 12 Apr 2023 17:51:10 -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 1pmiMp-0004Dv-RY for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:51:03 -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 1pmiMp-0007b9-96 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmiMp-0002BT-5d for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:51:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 21:51:03 +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.16813362248004 (code B ref 62086); Wed, 12 Apr 2023 21:51:03 +0000 Original-Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 21:50:24 +0000 Original-Received: from localhost ([127.0.0.1]:42000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiMB-00024z-Ns for submit@debbugs.gnu.org; Wed, 12 Apr 2023 17:50:24 -0400 Original-Received: from mail-pj1-f54.google.com ([209.85.216.54]:44859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiMA-00024I-NL for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 17:50:23 -0400 Original-Received: by mail-pj1-f54.google.com with SMTP id jx2-20020a17090b46c200b002469a9ff94aso11307366pjb.3 for <62086@debbugs.gnu.org>; Wed, 12 Apr 2023 14:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681336216; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dgDge1H3Q33TPZCdMhcaATwiJE0cQN6NAL8aTeAHlPo=; b=dOG/n9YQCnfYfAqfAswz9Mx3sMo+Tw5VayRkFxK7MTXr9eky+DjQ2W/WOAZMJh4t09 lCib9bFtK+lFl8PDvAdF1oEB9k3NcBlgwHUzyvYTtWnvSCXyqxzEUPREhaeDofWvKMCb 3bgv8lAY6bOAb/hcqFGZSq3pdT0JMpfgao6AUmSmqOI5My3Y/vRUsWrpsnuhuAGOvVpf whNQ9gTtQdNLOjpLdasZiaD+8rMBMq6X24CNWfnINzRh+9xtLyqTBYuctaKpmyIJM+Mf lZd07A0TEIOoLsW5OffNJYuC+U5JW+DjpDd4vxRDcL8WjDsYLxmb6KiavEx7h0XXWTfZ KBGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681336216; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dgDge1H3Q33TPZCdMhcaATwiJE0cQN6NAL8aTeAHlPo=; b=aeUsokLZU1uaPdotyMq6KjnNj9roXO8UARKwVmL5Sle3nQ77a+QV5lCU6DAwFj2DJY U6A3WNN4BzFwwnqYEljkXDOlPysDSObju3O+FdWgj/xSJv2RgF6kETQ++3Ju/0sx5LPh rf11jlM7a15tcvn1n7mGzB6jQpS9An+QPOjTNFNZbg0LUXWiw22EgrlYdKmF2YAISTLx iCxO6CFlJG23NMJVBr6T4PURBtbsft4nmftgStoG017ahAPsOdwfamQB5iBMPec2YSGw Bl0GbzTL94LnO2AQvghj21VxaoTL/K17H3gN/IIJhpc78cA9G0HpDctOvIjdCYBR19a5 izQw== X-Gm-Message-State: AAQBX9cGMC2MHczb1w0ytMW3wm0bC4LVJO10qsyI25nZswWM01TVsCtD PSxyS1J4KpI7S7OuJ6k9kkI= X-Google-Smtp-Source: AKy350aQJwg4YFy7fydhvoib1kiEQRns0OQeCtNoRdtna+rM4Nrwr6CBGdT8t4hJjorhIb5FQsaidQ== X-Received: by 2002:a05:6a20:b291:b0:d9:b0b5:fdaf with SMTP id ei17-20020a056a20b29100b000d9b0b5fdafmr4031109pzb.48.1681336216463; Wed, 12 Apr 2023 14:50:16 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id z6-20020aa785c6000000b00571cdbd0771sm12209286pfn.102.2023.04.12.14.50.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2023 14:50:16 -0700 (PDT) In-Reply-To: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> X-Mailer: Apple Mail (2.3731.500.231) 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:259815 Archived-At: > On Apr 12, 2023, at 1:13 PM, Dmitry Gutov wrote: >=20 > 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 =E2=80=9Canything = but some very small punctuation and delimiters=E2=80=9D? >> Pretty much. If I understood you correctly. >> E.g. in ruby-ts-mode identifiers and numbers are also sexps. >=20 > Allow me to update that. >=20 > =46rom 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. >=20 > 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=E2=80=99s 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=