From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Date: Wed, 05 Apr 2023 19:25:46 +0300 Organization: LINKOV.NET Message-ID: <861qkyfg8l.fsf@mail.linkov.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37211"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 62086@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 05 18:30:36 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 1pk61r-0009Ya-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Apr 2023 18:30:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pk61P-0005Q7-C8; Wed, 05 Apr 2023 12:30:07 -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 1pk61L-0005Pk-J8 for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 12:30: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 1pk61K-0004Fn-O2 for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 12:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pk61K-0000rR-AZ for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 12:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 16:30: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.16807121583217 (code B ref 62086); Wed, 05 Apr 2023 16:30:02 +0000 Original-Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 16:29:18 +0000 Original-Received: from localhost ([127.0.0.1]:52519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk60c-0000po-D4 for submit@debbugs.gnu.org; Wed, 05 Apr 2023 12:29:18 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:59205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk60b-0000pW-Bx for 62086@debbugs.gnu.org; Wed, 05 Apr 2023 12:29:17 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2AD0024000C; Wed, 5 Apr 2023 16:29:09 +0000 (UTC) In-Reply-To: <0bd5f2b8-6f0b-09d6-6240-38c742eca19f@yandex.ru> (Dmitry Gutov's message of "Wed, 5 Apr 2023 17:58:38 +0300") 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:259278 Archived-At: > There is no mechanism for precedence in the current implementation. We can > try ignoring the implicit parens in the parenless method calls, > though. Like this: I don't know how many users might still want to skip implicit parens. Maybe this could be customizable with another list that by default includes "argument_list". It's nice that it's doable with the current treesit features. > +(defun ruby-ts--sexp-p (node) > + ;; Skip parenless calls (implicit parens are both non-obvious to the > + ;; user, and might take over when we want to just over some physical > + ;; parens/braces). > + (or (not (equal (treesit-node-type node) > + "argument_list")) > + (equal (treesit-node-type (treesit-node-child node 0)) > + "("))) Maybe something similar could be used to detect '[' in 'h[:key]' to match the corresponding ']'.