From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Mar 2023 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 62086@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167838285931990 (code B ref -1); Thu, 09 Mar 2023 17:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2023 17:27:39 +0000 Received: from localhost ([127.0.0.1]:53031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paK3G-0008Ju-Ne for submit@debbugs.gnu.org; Thu, 09 Mar 2023 12:27:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:44512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paK3F-0008Jk-FR for submit@debbugs.gnu.org; Thu, 09 Mar 2023 12:27:37 -0500 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 1paK3F-0004ec-8a for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2023 12:27:37 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paK3D-0006Ly-OJ for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2023 12:27:37 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 83348100006 for ; Thu, 9 Mar 2023 17:27:33 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET Date: Thu, 09 Mar 2023 19:24:40 +0200 Message-ID: <86y1o5op2v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.231; envelope-from=juri@linkov.net; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) 'C-M-f' ('forward-sexp') commands currently are unusable in master because they skip too much. So I relied on word motion commands like 'M-f' ('forward-word') to move in ruby-ts-mode. But unfortunately some recent change broke even word motion in emacs-29, so no motion commands can be used in ruby-ts-mode, only motion by characters can be used with 'C-f' ('forward-char'). Here is a recipe for recent regression in emacs-29: 0. emacs -Q 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET 2. M-x ruby-ts-mode RET 3. move point to after the first letter 'c' 4. type 'M-f' ('forward-word') It skips two words in symbols. I don't know if the second bug is related to this, but while in the same file, also type 'C-M-l' ('reposition-window'). It raises the error: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) treesit-end-of-defun() end-of-defun(-1) reposition-window(nil nil) reposition-window(nil 89) funcall-interactively(reposition-window nil 89) command-execute(reposition-window) This regression is also recent. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Mar 2023 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16783853153904 (code B ref 62086); Thu, 09 Mar 2023 18:09:02 +0000 Received: (at 62086) by debbugs.gnu.org; 9 Mar 2023 18:08:35 +0000 Received: from localhost ([127.0.0.1]:53075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paKgs-00010u-Tf for submit@debbugs.gnu.org; Thu, 09 Mar 2023 13:08:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paKgr-00010g-Hd for 62086@debbugs.gnu.org; Thu, 09 Mar 2023 13:08:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paKgm-0006GC-39; Thu, 09 Mar 2023 13:08:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dOkOUNrr6fePqwu6tJqLQtq0BxJA+KOdzCSiw9RzNUM=; b=clldquNLgfwE hw2DmwBbvBcA4nO4Z9MVwx0i9xuFokIwqyRC3qqcrckyhUhWGDF8PuQEaVeapwLhZ9uPz5XzBzx70 jUc5gCpphiCdDOUsVyOhcUZexsaOIedPhDunLDV0I0SZoVwoiDOObFor+tyF/PTHUBeM67JLSRnqR YOxlsV7RfoezOd4Pu6f2V8OzKmBjtpMmx3e8aM3C7fhj6WPuoB+k5EudUur9EMWo0LB/1mANrKmRn 2QrUCNn3l+apK8h24BTjpRhZpcjnvqF04s/tTfoWstFD/ickceFF9KliuXuMFnhm7CVCylWOBDJXd E6Be0GG63JfEzFnLAi7EOw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paKgl-0004Os-GX; Thu, 09 Mar 2023 13:08:27 -0500 Date: Thu, 09 Mar 2023 20:08:15 +0200 Message-Id: <83fsad23xs.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86y1o5op2v.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 09 Mar 2023 19:24:40 +0200) References: <86y1o5op2v.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Thu, 09 Mar 2023 19:24:40 +0200 > > 'C-M-f' ('forward-sexp') commands currently are unusable in master > because they skip too much. So I relied on word motion commands like > 'M-f' ('forward-word') to move in ruby-ts-mode. But unfortunately > some recent change broke even word motion in emacs-29, so no motion commands > can be used in ruby-ts-mode, only motion by characters can be used with > 'C-f' ('forward-char'). Here is a recipe for recent regression in emacs-29: > > 0. emacs -Q > 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET > 2. M-x ruby-ts-mode RET > 3. move point to after the first letter 'c' > 4. type 'M-f' ('forward-word') > > It skips two words in symbols. I guess this is because of the syntax-table properties that ruby-ts-mode puts on the buffer text? > I don't know if the second bug is related to this, but while > in the same file, also type 'C-M-l' ('reposition-window'). > It raises the error: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > treesit-end-of-defun() > end-of-defun(-1) > reposition-window(nil nil) > reposition-window(nil 89) > funcall-interactively(reposition-window nil 89) > command-execute(reposition-window) > > This regression is also recent. I seem to unable to reproduce this. Maybe it happens only in some particular place in the file? From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Mar 2023 22:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.167839934526673 (code B ref 62086); Thu, 09 Mar 2023 22:03:01 +0000 Received: (at 62086) by debbugs.gnu.org; 9 Mar 2023 22:02:25 +0000 Received: from localhost ([127.0.0.1]:53259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paOLA-0006w9-JZ for submit@debbugs.gnu.org; Thu, 09 Mar 2023 17:02:24 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:38885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paOL8-0006vv-QJ for 62086@debbugs.gnu.org; Thu, 09 Mar 2023 17:02:23 -0500 Received: by mail-ed1-f44.google.com with SMTP id cw28so12944199edb.5 for <62086@debbugs.gnu.org>; Thu, 09 Mar 2023 14:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678399336; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=weX9bnKK1c/XWW19YYTU7QffmfTW7PDiWL3HpX0lnKM=; b=e9H759d6dWu2dwKPFCY6rBugo7GYq5g/QZiLF73IH6AjzkRXihAf2CgwStapwa7+N+ hrTsySBdLP73k6dnrXLNhmxg3hzJ0a1IeMOsHu30tmAzoZbb1jR8t/QdO2zMIqqDkD06 rcan5E/cQwnme+2WKKpY5iTVcvBTLnXz75QRT+wuQzBjg/lmaej6YlzWFVDRHeWNOCQp q/kBwqwTT96lgG49LJn4JYqgkC5KjIr6KkZAMUo+Tc8sQV66l8yt0kyZQxI3Uk2ZYtHC H4bSg3hgzKxsh7VO4fT7cR1UVbdjtmh7GY51i+gFzhpjKLfTO85Z/lo3UySrxYXQ9/yC gDiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678399336; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=weX9bnKK1c/XWW19YYTU7QffmfTW7PDiWL3HpX0lnKM=; b=6cegFB/VPVutcSgbIQ5Q9BcCTMkx6vNJpyZApQd4EJtdpdSPe5+yzeVCx6lAgsZ05/ eDnvKfqGNk1APg0j64GSBA/yEaGgrCJE96rmB1MLK44/55BTvbz5zv7LF7Jn108aZex4 0WpSrvLAzG2m9iXl+pnz0UVHy2NYJ+jhopUA8sGEmlvyK+OnC9Ub7d5pBdkvOF6i3hG5 DOjsSsr+lcSGXFetINFCrN6EZkne5Vzh2RBgMByAfLFn8X/q1nDKoXnDvnm03H7FQFi2 /MvzqUFajsbu+wVZZcH/XO66VCfquU/qZrS7Y2g69a7TWFBXsL5ReA3Oq72826Hn2jKn nLDA== X-Gm-Message-State: AO0yUKVPHeBf8oCVA8O5gx01srdXxV/fD+oysdwdyMlZs7LoAQbrvigO JGFOuU3xqBrKRUT8wIpQc2k= X-Google-Smtp-Source: AK7set9l3ot18qsihmyNF9ZntAhcJsmHritKliE5wQl29+5dZH8B3uvjxPZPZyvdSVKSNCIQaspy+Q== X-Received: by 2002:a17:907:320a:b0:87a:ee05:f7b with SMTP id xg10-20020a170907320a00b0087aee050f7bmr27600915ejb.24.1678399336403; Thu, 09 Mar 2023 14:02:16 -0800 (PST) Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id q27-20020a50c35b000000b004c4eed3fe20sm232998edb.5.2023.03.09.14.02.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Mar 2023 14:02:15 -0800 (PST) Message-ID: <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> Date: Fri, 10 Mar 2023 00:02:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US References: <86y1o5op2v.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86y1o5op2v.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) Hi! Thanks for the report. On 09/03/2023 19:24, Juri Linkov wrote: > 'C-M-f' ('forward-sexp') commands currently are unusable in master > because they skip too much. I'm happy to discuss this sometime later, in a different report, preferably after Emacs 29's pre-release drops. We'd probably just need to tweak the relevant regexp. But from what I see, most of the possible confusion stems from it jumping over implicit parens, just like over explicit ones. The addition of binary operators and assignments might also have something to do with it. > So I relied on word motion commands like > 'M-f' ('forward-word') to move in ruby-ts-mode. But unfortunately > some recent change broke even word motion in emacs-29, so no motion commands > can be used in ruby-ts-mode, only motion by characters can be used with > 'C-f' ('forward-char'). Here is a recipe for recent regression in emacs-29: > > 0. emacs -Q > 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET > 2. M-x ruby-ts-mode RET > 3. move point to after the first letter 'c' > 4. type 'M-f' ('forward-word') > > It skips two words in symbols. I might have been too eager in propertizing symbol contents with the "symbol" syntax. Now fixed in emacs-29, commit ecdfd584a52. > I don't know if the second bug is related to this, but while > in the same file, also type 'C-M-l' ('reposition-window'). > It raises the error: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > treesit-end-of-defun() > end-of-defun(-1) > reposition-window(nil nil) > reposition-window(nil 89) > funcall-interactively(reposition-window nil 89) > command-execute(reposition-window) > > This regression is also recent. I've managed to reproduce this, but only once. Do you see this every time? From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2023 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.167843416424066 (code B ref 62086); Fri, 10 Mar 2023 07:43:01 +0000 Received: (at 62086) by debbugs.gnu.org; 10 Mar 2023 07:42:44 +0000 Received: from localhost ([127.0.0.1]:53583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paXOm-0006G5-7z for submit@debbugs.gnu.org; Fri, 10 Mar 2023 02:42:44 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:59665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paXOk-0006Fs-Rq for 62086@debbugs.gnu.org; Fri, 10 Mar 2023 02:42:43 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8567D24000A; Fri, 10 Mar 2023 07:42:34 +0000 (UTC) From: Juri Linkov In-Reply-To: <83fsad23xs.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Mar 2023 20:08:15 +0200") Organization: LINKOV.NET References: <86y1o5op2v.fsf@mail.linkov.net> <83fsad23xs.fsf@gnu.org> Date: Fri, 10 Mar 2023 09:29:01 +0200 Message-ID: <86v8j9gjkq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I don't know if the second bug is related to this, but while >> in the same file, also type 'C-M-l' ('reposition-window'). >> It raises the error: >> >> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) >> treesit-end-of-defun() >> end-of-defun(-1) >> reposition-window(nil nil) >> reposition-window(nil 89) >> funcall-interactively(reposition-window nil 89) >> command-execute(reposition-window) >> >> This regression is also recent. > > I seem to unable to reproduce this. Maybe it happens only in some > particular place in the file? It happens everywhere in that file with ruby-ts-mode in 'emacs-29 -Q'. To get the backtrace, I set debug-on-error to t. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2023 07:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.167843416924082 (code B ref 62086); Fri, 10 Mar 2023 07:43:02 +0000 Received: (at 62086) by debbugs.gnu.org; 10 Mar 2023 07:42:49 +0000 Received: from localhost ([127.0.0.1]:53586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paXOq-0006GM-II for submit@debbugs.gnu.org; Fri, 10 Mar 2023 02:42:48 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:34201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paXOo-0006Fw-Dk for 62086@debbugs.gnu.org; Fri, 10 Mar 2023 02:42:46 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9A297FF80B; Fri, 10 Mar 2023 07:42:38 +0000 (UTC) From: Juri Linkov In-Reply-To: <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> (Dmitry Gutov's message of "Fri, 10 Mar 2023 00:02:14 +0200") Organization: LINKOV.NET References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> Date: Fri, 10 Mar 2023 09:35:46 +0200 Message-ID: <86bkl1gj15.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> 'C-M-f' ('forward-sexp') commands currently are unusable in master >> because they skip too much. > > I'm happy to discuss this sometime later, in a different report, preferably > after Emacs 29's pre-release drops. We'd probably just need to tweak the > relevant regexp. > > But from what I see, most of the possible confusion stems from it jumping > over implicit parens, just like over explicit ones. The addition of binary > operators and assignments might also have something to do with it. That's the problem: some implicit parens are unexpected. But let's adjust this later in another report. >> So I relied on word motion commands like >> 'M-f' ('forward-word') to move in ruby-ts-mode. But unfortunately >> some recent change broke even word motion in emacs-29, so no motion commands >> can be used in ruby-ts-mode, only motion by characters can be used with >> 'C-f' ('forward-char'). Here is a recipe for recent regression in emacs-29: >> 0. emacs -Q >> 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET >> 2. M-x ruby-ts-mode RET >> 3. move point to after the first letter 'c' >> 4. type 'M-f' ('forward-word') >> It skips two words in symbols. > > I might have been too eager in propertizing symbol contents with the > "symbol" syntax. Now fixed in emacs-29, commit ecdfd584a52. Thanks, I confirm this is fixed. >> I don't know if the second bug is related to this, but while >> in the same file, also type 'C-M-l' ('reposition-window'). >> It raises the error: >> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p >> nil) >> treesit-end-of-defun() >> end-of-defun(-1) >> reposition-window(nil nil) >> reposition-window(nil 89) >> funcall-interactively(reposition-window nil 89) >> command-execute(reposition-window) >> This regression is also recent. > > I've managed to reproduce this, but only once. Do you see this every time? I see it only in some files in test/lisp/progmodes/ruby-mode-resources/ e.g. ruby-parenless-call-arguments-indent.rb, ruby-method-call-indent.rb, ruby-block-indent.rb. But not in e.g. ruby-after-operator-indent.rb. Also everywhere in test/lisp/progmodes/js-resources/js-indent-init-dynamic.js, js-indent-init-t.js. But not in e.g. js-chain.js. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2023 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Yuan Fu Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16784662386037 (code B ref 62086); Fri, 10 Mar 2023 16:38:02 +0000 Received: (at 62086) by debbugs.gnu.org; 10 Mar 2023 16:37:18 +0000 Received: from localhost ([127.0.0.1]:55655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pafk6-0001ZI-FD for submit@debbugs.gnu.org; Fri, 10 Mar 2023 11:37:18 -0500 Received: from mail-ed1-f45.google.com ([209.85.208.45]:33456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pafk5-0001Z0-4m for 62086@debbugs.gnu.org; Fri, 10 Mar 2023 11:37:17 -0500 Received: by mail-ed1-f45.google.com with SMTP id a25so23004067edb.0 for <62086@debbugs.gnu.org>; Fri, 10 Mar 2023 08:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678466231; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=VXj2iI4UHoLlO5PGpmfuhmsmDadq12QZhO/LVAfZ7o0=; b=HufESQkpzYwhH2AC0UmkfBNZzHJjS7dwij4qXKEmBXOMS2XT9tn+zedMBiwOk1VBM4 hyfKFSEJd6NNDAnVwbmOU130IxYXMMvoUDFrUVwrRWG0ChMWlbiSul3DsF0zXyyp5++4 7sC+rWQmyPTXCL1QunMenh8jeDrteR0YlwciRSQIvOQyhOtJqR3VcLK7ub1vm8UUb7g7 0Aiuol89wkuUnSNWNTNBvPxNzUC7hx6N6H46SkPN76DkMM0lcPV99MYunblUwo59KhuJ WQaXefkGr54EogOcMFS/03yZhVBAh3mTL02YS61PpeslEeUbBSiQTK5AfCLUq2djJCSt ZL4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678466231; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VXj2iI4UHoLlO5PGpmfuhmsmDadq12QZhO/LVAfZ7o0=; b=b8uZG9mvoaE5mhnBbGU24nv5fs38b7qwsxjwhhMENyL+OjHzTC5ami8WH1X3c30iBa awnkInGeX7NlyHpx9imGVNuYUFnQJ30kzWWT3JtNWxMgk0YWI9dsfRT88Fjdj2LUqoqQ Pw2ikm22KoLMxFV3X7GDOITnYBMl73sr2eAvVe8sObRcLGloiPitY+7r81za8GYIQSfE C8MPpKrGwFPjtumD3dcYuUvdoJhWSahv25kgemIQL1Ff9w9H1fqf6CaQDOvOeA1BtBqj CbJ1trTcnpbLxhac5WWrbjCQGPzljEvWSgCkUYzNCZBADrKHEQSTfH5blVfBiN88OoJc qzhQ== X-Gm-Message-State: AO0yUKU+2d7bciL0Au6h18qDRIBIE4A74uAfEdCvfMuEXJv/mtgcrD8a IdzWXpZDJaKKpp/cRI41r84= X-Google-Smtp-Source: AK7set9yofrHBzdbZki434qfRRl/9k9aaE2EJY+x51bMdB8KLiGHNgPxn3JoHAqQojgBab1PCpEyzA== X-Received: by 2002:a17:906:308e:b0:8f8:375e:f0b6 with SMTP id 14-20020a170906308e00b008f8375ef0b6mr27343469ejv.58.1678466231035; Fri, 10 Mar 2023 08:37:11 -0800 (PST) Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id w7-20020a50d787000000b004c19f1891fasm215028edi.59.2023.03.10.08.37.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Mar 2023 08:37:10 -0800 (PST) Message-ID: <7cd4d8d5-1bf9-1138-f95f-12933316ed72@yandex.ru> Date: Fri, 10 Mar 2023 18:37:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86bkl1gj15.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86bkl1gj15.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 10/03/2023 09:35, Juri Linkov wrote: >>> I don't know if the second bug is related to this, but while >>> in the same file, also type 'C-M-l' ('reposition-window'). >>> It raises the error: >>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p >>> nil) >>> treesit-end-of-defun() >>> end-of-defun(-1) >>> reposition-window(nil nil) >>> reposition-window(nil 89) >>> funcall-interactively(reposition-window nil 89) >>> command-execute(reposition-window) >>> This regression is also recent. >> I've managed to reproduce this, but only once. Do you see this every time? > I see it only in some files in test/lisp/progmodes/ruby-mode-resources/ > e.g. ruby-parenless-call-arguments-indent.rb, ruby-method-call-indent.rb, > ruby-block-indent.rb. But not in e.g. ruby-after-operator-indent.rb. > Also everywhere in test/lisp/progmodes/js-resources/js-indent-init-dynamic.js, > js-indent-init-t.js. But not in e.g. js-chain.js. Thanks, I can repro. I might have been trying the wrong binding at the end last night (C-l instead of C-M-l). The fix seems to be easy: diff --git a/lisp/treesit.el b/lisp/treesit.el index c118f5d52a4..b271a1f0c4b 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1882,6 +1882,7 @@ treesit-end-of-defun `treesit-defun-skipper'." (interactive "^p\nd") (let ((orig-point (point))) + (if (or (null arg) (= arg 0)) (setq arg 1)) (catch 'done (dotimes (_ 2) ; Not making progress is better than infloop. But I'm not quite sure if that is what we want to do. More naturally, I think, would be to remove the argument from treesit-end-of-defun altogether (and adjust the code accordingly), because end-of-defun-function is documented to take no arguments. The only other place where treesit-end-of-defun seems to be used is the binding set up by treesit-major-mode-setup. Why not keep the default bindings for these? When beginning-of-defun-function and end-of-defun-function are set appropriately, they should work fine. Don't they? Cc'ing Yuan on that subject. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 13 03:35:35 2023 Received: (at control) by debbugs.gnu.org; 13 Mar 2023 07:35:35 +0000 Received: from localhost ([127.0.0.1]:33525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbciU-0002Je-Ti for submit@debbugs.gnu.org; Mon, 13 Mar 2023 03:35:35 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:53309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbciR-0002JC-4w for control@debbugs.gnu.org; Mon, 13 Mar 2023 03:35:31 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 6B02D2000A for ; Mon, 13 Mar 2023 07:35:23 +0000 (UTC) From: Juri Linkov To: control@debbugs.gnu.org Subject: Re: bug#62086: 29.0.60; ruby-ts-mode regressions In-Reply-To: <7cd4d8d5-1bf9-1138-f95f-12933316ed72@yandex.ru> (Dmitry Gutov's message of "Fri, 10 Mar 2023 18:37:08 +0200") Organization: LINKOV.NET References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86bkl1gj15.fsf@mail.linkov.net> <7cd4d8d5-1bf9-1138-f95f-12933316ed72@yandex.ru> Date: Mon, 13 Mar 2023 09:29:41 +0200 Message-ID: <861qlt3y8q.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 62086 29.0.60 thanks From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 16:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.1680539404760 (code B ref 62086); Mon, 03 Apr 2023 16:30:06 +0000 Received: (at 62086) by debbugs.gnu.org; 3 Apr 2023 16:30:04 +0000 Received: from localhost ([127.0.0.1]:45077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjN4G-0000C7-0Z for submit@debbugs.gnu.org; Mon, 03 Apr 2023 12:30:04 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:51167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjN4E-0000Aj-2m for 62086@debbugs.gnu.org; Mon, 03 Apr 2023 12:30:02 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 1AE4424000C; Mon, 3 Apr 2023 16:29:54 +0000 (UTC) From: Juri Linkov In-Reply-To: <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> (Dmitry Gutov's message of "Fri, 10 Mar 2023 00:02:14 +0200") Organization: LINKOV.NET References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> Date: Mon, 03 Apr 2023 19:29:27 +0300 Message-ID: <86cz4l7zjk.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET >> 2. M-x ruby-ts-mode RET >> 3. move point to after the first letter 'c' >> 4. type 'M-f' ('forward-word') >> It skips two words in symbols. > > I might have been too eager in propertizing symbol contents with the > "symbol" syntax. Now fixed in emacs-29, commit ecdfd584a52. Thanks. Here is a new problem: @foo, @bar = baz.( some_arg ) 'C-M-f' and 'C-M-b' skip @foo and @bar. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168055453314872 (code B ref 62086); Mon, 03 Apr 2023 20:43:01 +0000 Received: (at 62086) by debbugs.gnu.org; 3 Apr 2023 20:42:13 +0000 Received: from localhost ([127.0.0.1]:45389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjR0H-0003ro-AA for submit@debbugs.gnu.org; Mon, 03 Apr 2023 16:42:13 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:34391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjR0F-0003rX-7S for 62086@debbugs.gnu.org; Mon, 03 Apr 2023 16:42:11 -0400 Received: by mail-wr1-f44.google.com with SMTP id v1so30672710wrv.1 for <62086@debbugs.gnu.org>; Mon, 03 Apr 2023 13:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680554525; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=Q9nLLMVuK8LQbSTJwoSfgQEcXZDGAD7ZkDkXvY/HvLU=; b=Vo52hJu9GN/hlEauJEaQ3t1ZPZTW4sXfNQVAEjgcrOman3BjJWj8PHORi/BWXFKZ2X zIRiBENnvdyihojM50Ujbq0MWi/+o6MgWxbbjIPzUHMTQzQ/5A8ODp3cgSD5VfdOPu/F TM+V2Z7+BAQdjLkfffGxqQQeyj90vZMMQIFFxoRH/GdASqFlW78VooRAjUEwy0zIWCQ5 DFnkkWiBn5yB06tL7Dc8ayRt0OKER/dfI2N2JhdDcAbQNaiQiVV6PaXndSVMkKU2c737 bOx9rT1/F+/TevBezZZKZ3SVZxrMi8yHorICmO32IrIzUVJ+whpdLWsl9OBzUjBe6TTf qfLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680554525; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Q9nLLMVuK8LQbSTJwoSfgQEcXZDGAD7ZkDkXvY/HvLU=; b=2BsiknuUrC2fz89ZhtB7QqRyK1VNPZbGMuZg23/Ek0BYEiega/CAi/e8QcVzJQoolV 4XY4G9jjXP639kRd/6pS4my/xlwz9/+V8J3AVob6pDBpb64vPRsd/EzCaW5iqGsolIov isy/7x5XCIGbOf0r+29tPYPosQL/xzAbI8Kr5akkocteeNJSM2wvs4H4rzZA1KIQYYaU d3Pi1GKYmQV4925j3nmK8KDR7lLfyYObN33H5ocaCLVBtjxmoXnvPhsmyyO2oVP6iDLN AiU46Ma8XHLM+htNu9WYEEK6VYXhjc19qYWjQ+F1VcLOFBdarQ7Hcn/RvWocX9T9+DFV IW6w== X-Gm-Message-State: AAQBX9fur/HSZ8vLhrbpTRfNn/uizHXfg6mfqS4zsATZN8itiut9zHSE weAqCEYUIGZVquLrNEh86G8dFCZgZlZK6A== X-Google-Smtp-Source: AKy350Y0f1UOvXb2vRH3AO4/p5MvfeIdDiakKOj9b80yrn0FntkCGxNoI2U6ink7EgfNWF8i4l7aMQ== X-Received: by 2002:a5d:4d11:0:b0:2d2:d324:e44f with SMTP id z17-20020a5d4d11000000b002d2d324e44fmr26684414wrt.16.1680554525370; Mon, 03 Apr 2023 13:42:05 -0700 (PDT) Received: from [192.168.1.2] ([31.216.80.60]) by smtp.googlemail.com with ESMTPSA id j4-20020a5d5644000000b002d9568395f8sm10550118wrw.36.2023.04.03.13.42.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Apr 2023 13:42:05 -0700 (PDT) Message-ID: Date: Mon, 3 Apr 2023 23:42:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86cz4l7zjk.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86cz4l7zjk.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 03/04/2023 19:29, Juri Linkov wrote: >>> 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET >>> 2. M-x ruby-ts-mode RET >>> 3. move point to after the first letter 'c' >>> 4. type 'M-f' ('forward-word') >>> It skips two words in symbols. >> I might have been too eager in propertizing symbol contents with the >> "symbol" syntax. Now fixed in emacs-29, commit ecdfd584a52. > Thanks. Here is a new problem: > > @foo, @bar = baz.( > some_arg > ) > > 'C-M-f' and 'C-M-b' skip @foo and @bar. Also fixed in commit bd5c1d1cbbd. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Apr 2023 07:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168059394326986 (code B ref 62086); Tue, 04 Apr 2023 07:40:02 +0000 Received: (at 62086) by debbugs.gnu.org; 4 Apr 2023 07:39:03 +0000 Received: from localhost ([127.0.0.1]:46481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjbFv-00071B-Fj for submit@debbugs.gnu.org; Tue, 04 Apr 2023 03:39:03 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:46813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjbFt-00070X-7F for 62086@debbugs.gnu.org; Tue, 04 Apr 2023 03:39:02 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 68A35100008; Tue, 4 Apr 2023 07:38:52 +0000 (UTC) From: Juri Linkov In-Reply-To: (Dmitry Gutov's message of "Mon, 3 Apr 2023 23:42:04 +0300") Organization: LINKOV.NET References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86cz4l7zjk.fsf@mail.linkov.net> Date: Tue, 04 Apr 2023 10:16:47 +0300 Message-ID: <86ttxww12o.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Here is a new problem: >> @foo, @bar = baz.( >> some_arg >> ) >> 'C-M-f' and 'C-M-b' skip @foo and @bar. > > Also fixed in commit bd5c1d1cbbd. Thanks, I confirm these fixed. I wonder is it possible to fix more. Many parens/brackets are still not matched in e.g. test/lisp/progmodes/ruby-mode-resources/ruby.rb such as parens in def argument list: def test1(arg) and in method (a + b), and brackets in case translation in ['th', orig_text, 'en', trans_text] puts "English translation: #{orig_text} => #{trans_text}" in {th: orig_text, ja: trans_text} => whole Also square brackets are not matched by 'C-M-f' in h[:key] From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 00:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168065322221263 (code B ref 62086); Wed, 05 Apr 2023 00:08:01 +0000 Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 00:07:02 +0000 Received: from localhost ([127.0.0.1]:50471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjqg2-0005Wt-0H for submit@debbugs.gnu.org; Tue, 04 Apr 2023 20:07:02 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:40953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjqg0-0005WF-8B for 62086@debbugs.gnu.org; Tue, 04 Apr 2023 20:07:01 -0400 Received: by mail-wr1-f45.google.com with SMTP id t4so29250493wra.7 for <62086@debbugs.gnu.org>; Tue, 04 Apr 2023 17:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680653214; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=gXBov44u3zTj72bqm8CtJDvfq047t0bUy9SWdUL880c=; b=gfEtGmrQVkGwRX7/FbqlkV3S4TL/+/113AyyxmZ1yCheQDj+EnTl1rjIh//m9UssYg tDJB85e4TyohSOBxbX6dHjwO+7juYHd8uEptHA2ENk/ZJ+6GX+DACG6B9AN15X3msorx ijsntJdrnmiffdawBr9X+DY7JtM6JnhoyCRZRyffl8q21zNtximvEIXur/57mCgKsZY8 AC9Rl45+FU+xRjwVtCLi4N2piSrrrWRc63/E+txWcrckgTkWdVl0ohcAWNwtt+3FAz0j Qjk9hoJzriUkix1CL7OugttFv7Sr8J6Q5w+L2S0nhj33iLg4qUO7cKORzET72wEPtke0 irIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680653214; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gXBov44u3zTj72bqm8CtJDvfq047t0bUy9SWdUL880c=; b=ppj6qNsWFI8GIJR8Ee1MS+mNPi2IP/KC05bdIwMrF/tnxBjSJfP/wifOwkj0BHLGym u6glT5qg6dZ4rgbIvUQxU939CAQIT1U2N48YFKIwBN4jf/dMd7w8+PG+w9oREe3Iw4BS qfVKo6BdPJZxMBfrDMzsL077qUwgNN0pWsn4lTTGLLGXJiSjxDWC5cdFtIZHKm640sR3 bthTwatDGeoS+bSPrc0Z/97r+ucnU7I3i3UVDh4JtO2PQ2nSSTLWKtp3fahKySEuHpSh 82fqcFDj8Ls044+0DjnsfpEySWl8Ru3fc/vmzmzD3ncYTGwPctHBqaLZxibUsdNf8C96 1Agw== X-Gm-Message-State: AAQBX9eOBYU46U8qrS2PkhNYyysJcvF/ze2sga2mbZPJnrNtXxFiyles DNM2G/swWQ/uwyghVhdXLwc= X-Google-Smtp-Source: AKy350aUn9wivkjz6cjJ9ghq15jFvRTlywpVMPyfuER/Babn9lBQC7O1xcyhTyqKqBT5OyqLkJNJzg== X-Received: by 2002:a05:6000:1805:b0:2d3:9c5a:8d70 with SMTP id m5-20020a056000180500b002d39c5a8d70mr3479372wrh.12.1680653214180; Tue, 04 Apr 2023 17:06:54 -0700 (PDT) Received: from [192.168.1.2] ([31.216.80.60]) by smtp.googlemail.com with ESMTPSA id p8-20020a5d68c8000000b002c55521903bsm13416027wrw.51.2023.04.04.17.06.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Apr 2023 17:06:53 -0700 (PDT) Message-ID: Date: Wed, 5 Apr 2023 03:06:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86cz4l7zjk.fsf@mail.linkov.net> <86ttxww12o.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86ttxww12o.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 04/04/2023 10:16, Juri Linkov wrote: > I wonder is it possible to fix more. > Many parens/brackets are still not matched in e.g. > test/lisp/progmodes/ruby-mode-resources/ruby.rb > such as parens in def argument list: > > def test1(arg) This one was a regression from the addition of strict bos/eos anchors, now fixed. > and in > > method (a + b), When you say that this is broken, do you mean that these parens get jumped over unexpectedly (with forward-sexp movement ending at the end of the arguments list)? This is an artefact of the implementation of treesit-forward-sexp. It might be possible to improve, but from a brief dig, it has some internal logic. So some care would need to be taken to decide which contract nedds changing. > and brackets in > > case translation > in ['th', orig_text, 'en', trans_text] > puts "English translation: #{orig_text} => #{trans_text}" > in {th: orig_text, ja: trans_text} => whole Now fixed. Also, "case" matches "end" with this syntax too now. > Also square brackets are not matched by 'C-M-f' in > > h[:key] And this, surprisingly, seems impossible to handle just using treesit-sexp-type-regexp. The brackets are present in the tree, but they are not at the ends of any node. So that will require some custom Lisp, I guess. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 06:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16806761118508 (code B ref 62086); Wed, 05 Apr 2023 06:29:02 +0000 Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 06:28:31 +0000 Received: from localhost ([127.0.0.1]:50674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjwdD-0002D5-3t for submit@debbugs.gnu.org; Wed, 05 Apr 2023 02:28:31 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:47601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjwdA-0002Ce-U8 for 62086@debbugs.gnu.org; Wed, 05 Apr 2023 02:28:29 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 414D1100003; Wed, 5 Apr 2023 06:28:20 +0000 (UTC) From: Juri Linkov In-Reply-To: (Dmitry Gutov's message of "Wed, 5 Apr 2023 03:06:52 +0300") Organization: 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> Date: Wed, 05 Apr 2023 09:24:24 +0300 Message-ID: <865yaakfs7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I wonder is it possible to fix more. >> Many parens/brackets are still not matched in e.g. >> test/lisp/progmodes/ruby-mode-resources/ruby.rb >> such as parens in def argument list: >> def test1(arg) > > This one was a regression from the addition of strict bos/eos anchors, now > fixed. Maybe there are more types that now are not found, but probably easier to add them one by one after testing than to try finding all of them in https://github.com/tree-sitter/tree-sitter-ruby/blob/master/src/node-types.json or in https://github.com/tree-sitter/tree-sitter-ruby/blob/master/src/grammar.json >> and in >> method (a + b), > > When you say that this is broken, do you mean that these parens get jumped > over unexpectedly (with forward-sexp movement ending at the end of the > arguments list)? It seems natural to expect that when point is on an opening paren/bracket then 'C-M-f' should jump to its closing pair. At least, this is more WYSIWYG. > This is an artefact of the implementation of treesit-forward-sexp. > It might be possible to improve, but from a brief dig, it has some > internal logic. So some care would need to be taken to decide which > contract nedds changing. This is an example where explicit parens conflict with implicit parens. Visible parens have the type "parenthesized_statements", but invisible parens have the type "argument_list". Both start at the same position. So maybe treesit-forward-sexp should prefer the former over the latter? And in a similar case method [], arg2 maybe "array" should take precedence over "argument_list". >> Also square brackets are not matched by 'C-M-f' in >> h[:key] > > And this, surprisingly, seems impossible to handle just using > treesit-sexp-type-regexp. The brackets are present in the tree, but they > are not at the ends of any node. So that will require some custom Lisp, > I guess. This is the same problem that occurs in other places such as in "#{ddf}" where only '#' but not '{' matches '}'. So adding "element_reference" will allow to jump only from the beginning of an identifier. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168070672924219 (code B ref 62086); Wed, 05 Apr 2023 14:59:02 +0000 Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 14:58:49 +0000 Received: from localhost ([127.0.0.1]:52410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk4b2-0006IZ-WE for submit@debbugs.gnu.org; Wed, 05 Apr 2023 10:58:49 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:51793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk4b0-0006IK-Fy for 62086@debbugs.gnu.org; Wed, 05 Apr 2023 10:58:47 -0400 Received: by mail-wm1-f46.google.com with SMTP id o32so21050072wms.1 for <62086@debbugs.gnu.org>; Wed, 05 Apr 2023 07:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680706720; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=tJtDUUVgDh1d28BrA6vxFldiq1mABxcCycN3n3AwbUU=; b=pPYORPBKV71m7XHnI8gviwEjEDbEbs2LB85VoXLYvrV0JNfJgsLQSLwAKCoe4tTEIG qxmy1BGJLgPQyLRwBHeYkmJNngxZrmrT0P6q270NeUDIz9Uz/isYiyfCCibpYVqWev7F c2r0/gOSQOOZnz0HS29xLyGg87qF36s0FgjssYPV3IuuBI+end5A3vPTd4vuedSGggfa g8YCY+1rqbRcRSi07AUs55s0x0tGPHBc/ROtY+D98/Lxn799aVBl/FeGM6wcAfEjCqB4 5314ce+Eg0a4AMTa0pdh51B8T2Hh1NlCdqMyPcdM1n0X7a3y8U7RPZFPM9NDpCeBXzsl XxnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680706720; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tJtDUUVgDh1d28BrA6vxFldiq1mABxcCycN3n3AwbUU=; b=VesVH9vhiPtWcQMBXb3pgF2w4m3S22pQo314NdpnO9HujuzsmbBppTaupeIAIQvGhp ybW35xaSQxdSFOJfE1DN2sImWcUJvnCxNgF8wCvdqEvUIS0M1OGOsVeVRkPc+pBWEL/P 6sRtGrJm7EGZg7HO3EU24QRDPuF8wITyblwMsgt548mOHPdNb73gKAGsSf9llTMyyLix qzOJFQXi79/4Hcwr3k/8IL5SRxQsm965xYOuAzqBUShOzW4A+wN3sNbmCZ8Ksnfp4Iz0 2dQFtUTSjllfJjx8YnXUkFXazYtBrmBt2dSSGfOPOUeWAFH7kGDBreTCAB8Lbo+0Oorz un3Q== X-Gm-Message-State: AAQBX9cCXsdeGPa5e0pqDfenVTf/QRzYIvgqgnaSUpZADmm5Hch9hz5+ x6bmf5fgxMyfMnQT3Qf18pA= X-Google-Smtp-Source: AKy350Z+QseVRveqjcmNnKuWr+kGUdmPY2iyPEmJmA7VFKNXzlTh+RLoVDfrKQRjSeQcn2lnmEtnyQ== X-Received: by 2002:a05:600c:3b0e:b0:3ee:f91:19aa with SMTP id m14-20020a05600c3b0e00b003ee0f9119aamr2140054wms.0.1680706720371; Wed, 05 Apr 2023 07:58:40 -0700 (PDT) Received: from [192.168.1.2] ([31.216.80.60]) by smtp.googlemail.com with ESMTPSA id j1-20020a05600c1c0100b003f0548d00f1sm5496339wms.1.2023.04.05.07.58.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 07:58:39 -0700 (PDT) Message-ID: <0bd5f2b8-6f0b-09d6-6240-38c742eca19f@yandex.ru> Date: Wed, 5 Apr 2023 17:58:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> From: Dmitry Gutov In-Reply-To: <865yaakfs7.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 05/04/2023 09:24, Juri Linkov wrote: >>> I wonder is it possible to fix more. >>> Many parens/brackets are still not matched in e.g. >>> test/lisp/progmodes/ruby-mode-resources/ruby.rb >>> such as parens in def argument list: >>> def test1(arg) >> >> This one was a regression from the addition of strict bos/eos anchors, now >> fixed. > > Maybe there are more types that now are not found, but probably easier > to add them one by one after testing than to try finding all of them in > https://github.com/tree-sitter/tree-sitter-ruby/blob/master/src/node-types.json > or in > https://github.com/tree-sitter/tree-sitter-ruby/blob/master/src/grammar.json Yep. And we've hopefully more-or-less covered the existing grammar at this point. >>> and in >>> method (a + b), >> >> When you say that this is broken, do you mean that these parens get jumped >> over unexpectedly (with forward-sexp movement ending at the end of the >> arguments list)? > > It seems natural to expect that when point is on an opening paren/bracket > then 'C-M-f' should jump to its closing pair. At least, this is more WYSIWYG. > >> This is an artefact of the implementation of treesit-forward-sexp. >> It might be possible to improve, but from a brief dig, it has some >> internal logic. So some care would need to be taken to decide which >> contract nedds changing. > > This is an example where explicit parens conflict with implicit parens. > Visible parens have the type "parenthesized_statements", but invisible > parens have the type "argument_list". Both start at the same position. > So maybe treesit-forward-sexp should prefer the former over the latter? > And in a similar case > > method [], > arg2 > > maybe "array" should take precedence over "argument_list". 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: diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index ddf2ee98c3b..cf8f1b0d315 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -1086,6 +1086,15 @@ ruby-ts--syntax-propertize (put-text-property pos (1+ pos) 'syntax-table (string-to-syntax "!")))))))) +(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)) + "("))) + (defvar-keymap ruby-ts-mode-map :doc "Keymap used in Ruby mode" :parent prog-mode-map @@ -1114,6 +1123,7 @@ ruby-ts-mode (setq-local treesit-defun-type-regexp ruby-ts--method-regex) (setq-local treesit-sexp-type-regexp + (cons (rx bol (or "class" "module" @@ -1147,7 +1157,8 @@ ruby-ts-mode "instance_variable" "global_variable" ) - eol)) + eol) + #'ruby-ts--sexp-p)) ;; AFAIK, Ruby can not nest methods (setq-local treesit-defun-prefer-top-level nil) >>> Also square brackets are not matched by 'C-M-f' in >>> h[:key] >> >> And this, surprisingly, seems impossible to handle just using >> treesit-sexp-type-regexp. The brackets are present in the tree, but they >> are not at the ends of any node. So that will require some custom Lisp, >> I guess. > > This is the same problem that occurs in other places such as in "#{ddf}" > where only '#' but not '{' matches '}'. So adding "element_reference" > will allow to jump only from the beginning of an identifier. Right, except it's worse because the identifier is usually much longer than one character. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions 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 X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16807121583217 (code B ref 62086); Wed, 05 Apr 2023 16:30:02 +0000 Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 16:29:18 +0000 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 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 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2AD0024000C; Wed, 5 Apr 2023 16:29:09 +0000 (UTC) From: Juri Linkov In-Reply-To: <0bd5f2b8-6f0b-09d6-6240-38c742eca19f@yandex.ru> (Dmitry Gutov's message of "Wed, 5 Apr 2023 17:58:38 +0300") Organization: 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> Date: Wed, 05 Apr 2023 19:25:46 +0300 Message-ID: <861qkyfg8l.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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 ']'. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16807126084143 (code B ref 62086); Wed, 05 Apr 2023 16:37:02 +0000 Received: (at 62086) by debbugs.gnu.org; 5 Apr 2023 16:36:48 +0000 Received: from localhost ([127.0.0.1]:52531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk67s-00014k-2D for submit@debbugs.gnu.org; Wed, 05 Apr 2023 12:36:48 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk67p-00014P-Kx for 62086@debbugs.gnu.org; Wed, 05 Apr 2023 12:36:46 -0400 Received: by mail-wr1-f46.google.com with SMTP id h17so36800519wrt.8 for <62086@debbugs.gnu.org>; Wed, 05 Apr 2023 09:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680712600; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=wMDnoWH4CKOvLHpkARUTbTR6BqFqyUo/82QhTK1K+vg=; b=O4J4q5E5Cu1zsoSxS6ZHzf2WOe2zr25OSVkwcWLc+70fS5vn42RH0GrW7IJ0m519Kg kxu3nQ4i5kjK9ludRkaxS9SzBnvOwGsAdq+aqeN4hKLlUtW1/hu3hijUQN7BAJHNz2SJ zTasEic67Z5Qxn2IqmyS3s+qiuuIjiBmJQToqFFcX4iq1ueBPXvT0cw7dQ4VRtouhNb4 rS1SGiZR5Zlv3x8QYlUAbSzBFUY7a1ZVf1/Nirejzi9hzuntlysXmMcMd99egWWhnbdq LZb17mQcvVQ9gH0pk/KU9ORfA2fmEsGnbBGM39VRMOT0LbOSJlP556Y78y6Y2vAPU2W4 T3uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680712600; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wMDnoWH4CKOvLHpkARUTbTR6BqFqyUo/82QhTK1K+vg=; b=1TONxsvs4qtSzanmB2c4YTBNf/ZXfroCiFHO0GXhis72MRQ9phrQmmS47BqQI4LY1x lEeH412cXXAE7tEcuyIvVyMgvcyZvHUmeQ8/0yvAYArNsgqByDJusSxhcwJrp0/X3QVt z6XGJHY3O9HJ7ufolgocBnXk2bxrWUR/g1OPRvDV8OLb+GE9Q/cUJuTn0vCBbag/bruF SzZcakL2FFPyOIFxhl/m9kEdIc2giXUMVp6wnhFfFBPqfwO9eLgKE3KN3R78nnBlgBVV 9QQka4d2e7Kn7Vey/GkWevJcNaAeraU7odHq2aWWyNwDrPNwDZHrncKCSOSRjNA5ujC/ /dxQ== X-Gm-Message-State: AAQBX9eIOw8DoahYvbMoov/dgR1AuTYCgka3tAHHUTPuwt01ppRTeN9g s8tnv9D+s0xIqY1ga4xcLac= X-Google-Smtp-Source: AKy350Z76t3OH88qpoJFoeayVgOeoRnzHr8eAzhcCuMv4pcZU7FCzi4u4R5Mztvr/yeXIYgtMJJc/A== X-Received: by 2002:a5d:4e4c:0:b0:2ce:a95e:8c77 with SMTP id r12-20020a5d4e4c000000b002cea95e8c77mr4652170wrt.34.1680712599674; Wed, 05 Apr 2023 09:36:39 -0700 (PDT) Received: from [192.168.1.2] ([31.216.80.60]) by smtp.googlemail.com with ESMTPSA id b6-20020a5d5506000000b002e463bd49e3sm15367498wrv.66.2023.04.05.09.36.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 09:36:39 -0700 (PDT) Message-ID: <9ceb589f-9325-1607-d1b5-5fd56cb8c3ec@yandex.ru> Date: Wed, 5 Apr 2023 19:36:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> From: Dmitry Gutov In-Reply-To: <861qkyfg8l.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 05/04/2023 19:25, Juri Linkov wrote: >> 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. Calls with both physical and implicit parens have this type. I'd rather not add user option in advance, let's try to work out what looks like the most reasonable behavior, and then add them after specific requests. >> +(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 ']'. It doesn't look like that, no. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Apr 2023 16:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168123229711791 (code B ref 62086); Tue, 11 Apr 2023 16:59:02 +0000 Received: (at 62086) by debbugs.gnu.org; 11 Apr 2023 16:58:17 +0000 Received: from localhost ([127.0.0.1]:38082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmHJx-000346-0M for submit@debbugs.gnu.org; Tue, 11 Apr 2023 12:58:17 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:43121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmHJv-00033r-1Z for 62086@debbugs.gnu.org; Tue, 11 Apr 2023 12:58:16 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 14E61C0002; Tue, 11 Apr 2023 16:58:07 +0000 (UTC) From: Juri Linkov In-Reply-To: <9ceb589f-9325-1607-d1b5-5fd56cb8c3ec@yandex.ru> (Dmitry Gutov's message of "Wed, 5 Apr 2023 19:36:37 +0300") Organization: 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> <861qkyfg8l.fsf@mail.linkov.net> <9ceb589f-9325-1607-d1b5-5fd56cb8c3ec@yandex.ru> Date: Tue, 11 Apr 2023 19:53:53 +0300 Message-ID: <86y1myxsrq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain I don't know if opening a new bug report is needed. Actually I'm doing the same thing for more ts-modes - trying to find a set of node names that match parens/brackets. So maybe this patch makes sense too: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=treesit-sexp-type-regexp.patch diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index d773b4a41f4..e55d26177af 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -927,7 +927,9 @@ c-ts-base-mode "qualifier" "type" "parameter" - "expression" + ;; "expression" + "argument_list" + "identifier" "literal" "string"))) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f68ecb6fa6c..3876a5b54f1 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3827,7 +3827,9 @@ js--treesit-sentence-nodes "See `treesit-sentence-type-regexp' for more information.") (defvar js--treesit-sexp-nodes - '("expression" + '("expression" ;; SHOULD NOT MATCH "expression_statement", BUT SHOULD MATCH "parenthesized_expression" + "parenthesized_expression" + "formal_parameters" "pattern" "array" "function" @@ -3845,7 +3847,13 @@ js--treesit-sexp-nodes "undefined" "arguments" "pair" - "jsx") + "jsx" + "statement_block" + "object" + "object_pattern" + "named_imports" + "class_body" + ) "Nodes that designate sexps in JavaScript. See `treesit-sexp-type-regexp' for more information.") @@ -3893,7 +3901,7 @@ js-ts-mode (regexp-opt js--treesit-sentence-nodes)) (setq-local treesit-sexp-type-regexp - (regexp-opt js--treesit-sexp-nodes)) + (rx-to-string `(seq bol (or ,@js--treesit-sexp-nodes) eol))) ;; Fontification. (setq-local treesit-font-lock-settings js--treesit-font-lock-settings) --=-=-=-- From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Apr 2023 23:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 62086@debbugs.gnu.org, Yuan Fu , Theodor Thornhill Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168125583020797 (code B ref 62086); Tue, 11 Apr 2023 23:31:01 +0000 Received: (at 62086) by debbugs.gnu.org; 11 Apr 2023 23:30:30 +0000 Received: from localhost ([127.0.0.1]:38506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmNRW-0005PN-C3 for submit@debbugs.gnu.org; Tue, 11 Apr 2023 19:30:30 -0400 Received: from forward501b.mail.yandex.net ([178.154.239.145]:43646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmNRT-0005PD-UO for 62086@debbugs.gnu.org; Tue, 11 Apr 2023 19:30:29 -0400 Received: from mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:912:0:640:e196:0]) by forward501b.mail.yandex.net (Yandex) with ESMTP id 9A94D5F0B2; Wed, 12 Apr 2023 02:30:25 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id MUfrWn3W04Y0-OWCg4xG8; Wed, 12 Apr 2023 02:30:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681255825; bh=gQNBinAmlOPhX1k6GHnhvzDvJX/XStFHmnCCaWavik8=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=mVGA+9iSQuSyWlKvmdfj5wrok/QH3N5Rr66+XReYZoloP1yKrgDbZhKBaZ/uPT9Dk 5+HZMXtma6iRN9QcotP55wpBN8Q+zBL0Px5kmbUW8sEBRH37QrRAVciW7aEwvSrqfg OD5ZTycW9jpxKNWv0eiRWZ2RgwqR8/3bldAbVEmA= Authentication-Results: mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id ABDCE27C0054; Tue, 11 Apr 2023 19:30:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 11 Apr 2023 19:30:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekhedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnheptdffgeegkeelteevtdekleethfeftdduvdegkedtkedujefhfedtveeftdff udevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Apr 2023 19:30:20 -0400 (EDT) Message-ID: Date: Wed, 12 Apr 2023 02:30:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> From: Dmitry Gutov In-Reply-To: <86y1myxsrq.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 11/04/2023 19:53, Juri Linkov wrote: > I don't know if opening a new bug report is needed. > Actually I'm doing the same thing for more ts-modes - > trying to find a set of node names that match parens/brackets. > So maybe this patch makes sense too: These look sensible to me. I think we should give a chance to the authors to chime in, though. > treesit-sexp-type-regexp.patch > > diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el > index d773b4a41f4..e55d26177af 100644 > --- a/lisp/progmodes/c-ts-mode.el > +++ b/lisp/progmodes/c-ts-mode.el > @@ -927,7 +927,9 @@ c-ts-base-mode > "qualifier" > "type" > "parameter" > - "expression" > + ;; "expression" > + "argument_list" > + "identifier" > "literal" > "string"))) > > diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el > index f68ecb6fa6c..3876a5b54f1 100644 > --- a/lisp/progmodes/js.el > +++ b/lisp/progmodes/js.el > @@ -3827,7 +3827,9 @@ js--treesit-sentence-nodes > "See `treesit-sentence-type-regexp' for more information.") > > (defvar js--treesit-sexp-nodes > - '("expression" > + '("expression" ;; SHOULD NOT MATCH "expression_statement", BUT SHOULD MATCH "parenthesized_expression" > + "parenthesized_expression" > + "formal_parameters" > "pattern" > "array" > "function" > @@ -3845,7 +3847,13 @@ js--treesit-sexp-nodes > "undefined" > "arguments" > "pair" > - "jsx") > + "jsx" > + "statement_block" > + "object" > + "object_pattern" > + "named_imports" > + "class_body" > + ) > "Nodes that designate sexps in JavaScript. > See `treesit-sexp-type-regexp' for more information.") > > @@ -3893,7 +3901,7 @@ js-ts-mode > (regexp-opt js--treesit-sentence-nodes)) > > (setq-local treesit-sexp-type-regexp > - (regexp-opt js--treesit-sexp-nodes)) > + (rx-to-string `(seq bol (or ,@js--treesit-sexp-nodes) eol))) > > ;; Fontification. > (setq-local treesit-font-lock-settings js--treesit-font-lock-settings) From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 07:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16812831624528 (code B ref 62086); Wed, 12 Apr 2023 07:07:02 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 07:06:02 +0000 Received: from localhost ([127.0.0.1]:38839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmUYM-0001Ax-Cl for submit@debbugs.gnu.org; Wed, 12 Apr 2023 03:06:02 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:40925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmUYJ-0001AS-O7 for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 03:06:01 -0400 Received: by mail-pl1-f174.google.com with SMTP id q2so15306794pll.7 for <62086@debbugs.gnu.org>; Wed, 12 Apr 2023 00:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681283153; 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=m0gn+CU7Va/TqP8rnH80Gry1se3MLaywFNKQZ7xlDhc=; b=KuB9mgUTAZ+ECfjK7UV4nvqjW4hPbLepKLsMfNVjTsih/sfYAVXo6VjJa1k8JUuTlL XcvVP9YnmMyaEm3SGV8G2jdo/T0RVED9Y32hoHcp3bYGsIxGhSp8n5V77GgIIZQ4bDtM p6BxHN4rwkXjxTAq8zmvM/Z7okHgHmnAKDWfgMRQcYuJQA3+aOZlP7kCeMPXR6yqk4a/ K/O8anTxGK4G6H45Weuiyd8UtanDt2NxPg67HYsGNERogAbYxEb7OE+rOlZDhH/rX10J bfz1ogKIDu7mKcUsjQkrD7NgRNWejUf4dMDZYYD+FDxAUEKpx7qfnR4Cy7rnZDPp1urL QiKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681283153; 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=m0gn+CU7Va/TqP8rnH80Gry1se3MLaywFNKQZ7xlDhc=; b=Sn+6xgdclCe7fIUuNMYNDB+NP4mPlqH0aH32SLf+6/rZb10evJj4DgTY7hHKikVAY5 3jC2pV5pRuAX26QjDb1MpZhNQJ2i+kj0JsezbKTy+RZccPSFVr7HTji1zxRcVN7Dpu5c gi1lC5+s3BsXDOhMkK2ll7K4PcZ/HB871BoMKo81v3jmB5unfOKvp1uABWpI3+jq5Bfq vMblzhv97BXm36kK0R1RqeCGh1p27VgfNY4mRnBS2p5BN55aXRYo9b+SQgWdlzrXOXjR z7lb7/3/xck9qwwXwN5b/b2KDZIGO5afuur7BXOpk2eJRlME/LhHNgjBK6uoWRsOjTIS J3Pw== X-Gm-Message-State: AAQBX9cnEaMK9ex3MXI75o+SL1KfPb8P32MNMPBT+xG4E+sb1bFpYk9Z aaE9wNFZvyab85eZa0pZrvs= X-Google-Smtp-Source: AKy350Y/nRmrw2rh2ooXbQWQuphrAsbSOFUsuiaWFUKRsYUIFqoGHv1sDvpfJuqTHBLYkR9T5muZ8w== X-Received: by 2002:a05:6a20:8048:b0:dd:c64a:5417 with SMTP id f8-20020a056a20804800b000ddc64a5417mr13185492pza.18.1681283153565; Wed, 12 Apr 2023 00:05:53 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id h26-20020a62b41a000000b0062dd1c0cbe7sm10915943pfn.71.2023.04.12.00.05.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2023 00:05:53 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) From: Yuan Fu In-Reply-To: Date: Wed, 12 Apr 2023 00:05:41 -0700 Content-Transfer-Encoding: quoted-printable 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> X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 11, 2023, at 4:30 PM, Dmitry Gutov wrote: >=20 > On 11/04/2023 19:53, Juri Linkov wrote: >> I don't know if opening a new bug report is needed. >> Actually I'm doing the same thing for more ts-modes - >> trying to find a set of node names that match parens/brackets. >> So maybe this patch makes sense too: >=20 > These look sensible to me. >=20 > I think we should give a chance to the authors to chime in, though. >=20 >> treesit-sexp-type-regexp.patch >> diff --git a/lisp/progmodes/c-ts-mode.el = b/lisp/progmodes/c-ts-mode.el >> index d773b4a41f4..e55d26177af 100644 >> --- a/lisp/progmodes/c-ts-mode.el >> +++ b/lisp/progmodes/c-ts-mode.el >> @@ -927,7 +927,9 @@ c-ts-base-mode >> "qualifier" >> "type" >> "parameter" >> - "expression" >> + ;; "expression" >> + "argument_list" >> + "identifier" >> "literal" >> "string"))) >> diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el >> index f68ecb6fa6c..3876a5b54f1 100644 >> --- a/lisp/progmodes/js.el >> +++ b/lisp/progmodes/js.el >> @@ -3827,7 +3827,9 @@ js--treesit-sentence-nodes >> "See `treesit-sentence-type-regexp' for more information.") >> (defvar js--treesit-sexp-nodes >> - '("expression" >> + '("expression" ;; SHOULD NOT MATCH "expression_statement", BUT = SHOULD MATCH "parenthesized_expression" >> + "parenthesized_expression" >> + "formal_parameters" >> "pattern" >> "array" >> "function" >> @@ -3845,7 +3847,13 @@ js--treesit-sexp-nodes >> "undefined" >> "arguments" >> "pair" >> - "jsx") >> + "jsx" >> + "statement_block" >> + "object" >> + "object_pattern" >> + "named_imports" >> + "class_body" >> + ) >> "Nodes that designate sexps in JavaScript. >> See `treesit-sexp-type-regexp' for more information.") >> @@ -3893,7 +3901,7 @@ js-ts-mode >> (regexp-opt js--treesit-sentence-nodes)) >> (setq-local treesit-sexp-type-regexp >> - (regexp-opt js--treesit-sexp-nodes)) >> + (rx-to-string `(seq bol (or = ,@js--treesit-sexp-nodes) eol))) >> ;; Fontification. >> (setq-local treesit-font-lock-settings = js--treesit-font-lock-settings) >=20 Actually, would it make sense to define sexp as =E2=80=9Canything but = some very small punctuation and delimiters=E2=80=9D? I changed the = definition of c-ts-mode-sexp-type-regexp to that (see bug#62302). It = seems to work just fine. Of course, if there are problems we can revert = back. Yuan= From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 07:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, juri@linkov.net Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16812846206873 (code B ref 62086); Wed, 12 Apr 2023 07:31:01 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 07:30:20 +0000 Received: from localhost ([127.0.0.1]:38882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmUvr-0001mm-Pp for submit@debbugs.gnu.org; Wed, 12 Apr 2023 03:30:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmUvp-0001mZ-De for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 03:30:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmUvi-00057x-Dd; Wed, 12 Apr 2023 03:30:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pOrDFKljjSD1hnyo1o+2y7k6iHkDjVa+LjAYGjnKZUM=; b=bPWsjNp9xy8R GB2gdjDiMGVuv8WKd7771whxZUZH57f0Oea9tL7u6Ezi7v6sM3FMUPJOatQn77gIyGRQ73Lu5xpXt AJZKl9mUUd/22SWy/QDuUcrw2gx18KMUPlM4k386sGxRE8X7wS001VCUq/RLtRsdWfmgso2xW+7+t iKXk2rh6rWAJuvBsyHggHXnpJnlvEETk1Cr11bQyol5+zppDczPZagq34yHrPMgOK8lpSL8K8VMYf zjpr8BkP/vBDLTHzaUUcxsYsj46BjM2VqLYg2RKf+ZHVNiRCw6WOwYaCw5ikSy5CmUx+c+fvUf6go krajTPBShLuEPUazUKdowQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmUvf-0003s6-AG; Wed, 12 Apr 2023 03:30:09 -0400 Date: Wed, 12 Apr 2023 10:30:51 +0300 Message-Id: <83a5zd8slw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Dmitry Gutov on Wed, 12 Apr 2023 02:30:19 +0300) 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> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 62086@debbugs.gnu.org, Yuan Fu , > Theodor Thornhill > Date: Wed, 12 Apr 2023 02:30:19 +0300 > From: Dmitry Gutov > > On 11/04/2023 19:53, Juri Linkov wrote: > > I don't know if opening a new bug report is needed. > > Actually I'm doing the same thing for more ts-modes - > > trying to find a set of node names that match parens/brackets. > > So maybe this patch makes sense too: > > These look sensible to me. > > I think we should give a chance to the authors to chime in, though. > > > treesit-sexp-type-regexp.patch > > > > diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el > > index d773b4a41f4..e55d26177af 100644 > > --- a/lisp/progmodes/c-ts-mode.el > > +++ b/lisp/progmodes/c-ts-mode.el > > @@ -927,7 +927,9 @@ c-ts-base-mode > > "qualifier" > > "type" > > "parameter" > > - "expression" > > + ;; "expression" > > + "argument_list" > > + "identifier" > > "literal" > > "string"))) Can someone please tell which problem(s) this is supposed to fix, and on what branch? This bug report has "29.0.60" in the title, but it starts with describing what happens on master. On the emacs-29 branch C-M-f doesn't use treesit capabilities, at least not in c-ts-mode. So I'm confused regarding the scope and the purpose of this proposal. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuan Fu Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168131349819070 (code B ref 62086); Wed, 12 Apr 2023 15:32:01 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 15:31:38 +0000 Received: from localhost ([127.0.0.1]:40811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcRd-0004xV-WA for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:31:38 -0400 Received: from forward501a.mail.yandex.net ([178.154.239.81]:43190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcRa-0004x0-TW for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 11:31:36 -0400 Received: from mail-nwsmtp-smtp-production-main-31.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-31.vla.yp-c.yandex.net [IPv6:2a02:6b8:c18:58f:0:640:3768:0]) by forward501a.mail.yandex.net (Yandex) with ESMTP id 88BC15F029; Wed, 12 Apr 2023 18:31:32 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-31.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id TVY7kx0DeiE0-KCNauJZK; Wed, 12 Apr 2023 18:31:31 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681313492; bh=9aHQ+aOxOfohm6ktqxHsCXRygX13aFx4JXY69l5oSZs=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=hfSnrvn98wJ7VH72QHAid3GLoXR2HWObP/lRBoMooasqSJrfqXMmEitP3uhiL0+lo fo1dHkLp8kbmpKOLn9FBQ/3zEs85texqq8PW7axD72k9PmthbPSV+flvSF6dZol4Ue iizWp1jcTGm/akGvbu4fRzYMZFJkTZIkUqMS48PY= Authentication-Results: mail-nwsmtp-smtp-production-main-31.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 810E427C0054; Wed, 12 Apr 2023 11:31:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 12 Apr 2023 11:31:29 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekiedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepgfejhfduffegvdevtefhgfettefgfeelgfelffehgeehhfeiudehfedvffeg teegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 11:31:27 -0400 (EDT) Message-ID: <263c2966-acff-436a-43fd-20f9da8986fb@yandex.ru> Date: Wed, 12 Apr 2023 18:31:25 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 62086@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, juri@linkov.net Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168131351719112 (code B ref 62086); Wed, 12 Apr 2023 15:32:01 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 15:31:57 +0000 Received: from localhost ([127.0.0.1]:40817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcRx-0004yC-Az for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:31:57 -0400 Received: from forward500b.mail.yandex.net ([178.154.239.144]:59068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcRu-0004y2-ST for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 11:31:56 -0400 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 forward500b.mail.yandex.net (Yandex) with ESMTP id A20305F53B; Wed, 12 Apr 2023 18:31:53 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id oVYJT01Dga60-BocPBudo; Wed, 12 Apr 2023 18:31:52 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681313512; bh=C08avUw9KzbceE3sLdCs6IW7+vUHnsuPiEuqeoMiiO4=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=X3EtcpWTfgd/DYK+j4bqGX6yL0vHWEcgtF9WtvVffK3jhTKZaPsscNlVX9IwCgHTQ +mEfmNhieJuMiH7wY9Swt3lHTnBOYMXRf8KlHuHCpRRkusnWZcwjSYtgUhsvWgqbOb ieSdRkHz7xMUZb6aDIli9WPhZbJkawGqfcgRD7rY= Authentication-Results: mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 4895727C0054; Wed, 12 Apr 2023 11:31:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 12 Apr 2023 11:31:50 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekiedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnheptdffgeegkeelteevtdekleethfeftdduvdegkedtkedujefhfedtveeftdff udevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 11:31:48 -0400 (EDT) Message-ID: <81cffe61-4509-f085-6bb6-25ecca6470e6@yandex.ru> Date: Wed, 12 Apr 2023 18:31:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> <83a5zd8slw.fsf@gnu.org> From: Dmitry Gutov In-Reply-To: <83a5zd8slw.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 12/04/2023 10:30, Eli Zaretskii wrote: > Can someone please tell which problem(s) this is supposed to fix, and > on what branch? This bug report has "29.0.60" in the title, but it > starts with describing what happens on master. On the emacs-29 branch > C-M-f doesn't use treesit capabilities, at least not in c-ts-mode. So > I'm confused regarding the scope and the purpose of this proposal. Indeed, it's only for master. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, juri@linkov.net Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168131398120097 (code B ref 62086); Wed, 12 Apr 2023 15:40:02 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 15:39:41 +0000 Received: from localhost ([127.0.0.1]:40928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcZR-0005E5-HQ for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:39:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcZP-0005Dq-KZ for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 11:39:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmcZI-0001U2-M0; Wed, 12 Apr 2023 11:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rjK6E2ejPy12nF6P5QdwjkZ7PWK/1118Jco/jgwwdWE=; b=rwreS0O8cxoE 3JOGKQqN+DBJVtgdST5RElLLjxiXaY07vNQtpKRH/Bd7AYMwVIgYlpGPXfuxykLAhbYrlXseQ7/BZ HF4Lap1V3TImTO7X8q1C3IFUu53ka4k9eLPndlza5EdGaJKpS0SG36/B1qXwwgli1ICNUJtrIalwV N03HdOhCupnevwG9uutcLH8exU7DmbQV/qVMAKD+j7O4PPv9i+cyUIRT8Ar30AE+xVyhDNcuRoB9P LqCYEd9xVeiQKt6zisV/lKidmm8JrvvAZrUscwq/yvKT4I9pCX8UT9f5dSm3IgSVlx2PONvq/aMbU yogzXWQb5FCp2Gvz6tCgGg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmcZ5-0002jA-Rr; Wed, 12 Apr 2023 11:39:30 -0400 Date: Wed, 12 Apr 2023 18:40:05 +0300 Message-Id: <838rex6re2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <81cffe61-4509-f085-6bb6-25ecca6470e6@yandex.ru> (message from Dmitry Gutov on Wed, 12 Apr 2023 18:31:46 +0300) 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> <83a5zd8slw.fsf@gnu.org> <81cffe61-4509-f085-6bb6-25ecca6470e6@yandex.ru> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 12 Apr 2023 18:31:46 +0300 > Cc: 62086@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, > juri@linkov.net > From: Dmitry Gutov > > On 12/04/2023 10:30, Eli Zaretskii wrote: > > Can someone please tell which problem(s) this is supposed to fix, and > > on what branch? This bug report has "29.0.60" in the title, but it > > starts with describing what happens on master. On the emacs-29 branch > > C-M-f doesn't use treesit capabilities, at least not in c-ts-mode. So > > I'm confused regarding the scope and the purpose of this proposal. > > Indeed, it's only for master. Thanks. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions 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 X-GNU-PR-Keywords: To: Yuan Fu Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168133039429448 (code B ref 62086); Wed, 12 Apr 2023 20:14:02 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 20:13:14 +0000 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 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 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) 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 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) 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 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 16:13:03 -0400 (EDT) Message-ID: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> Date: Wed, 12 Apr 2023 23:13:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US From: Dmitry Gutov 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> In-Reply-To: <263c2966-acff-436a-43fd-20f9da8986fb@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions 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 X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16813362248004 (code B ref 62086); Wed, 12 Apr 2023 21:51:03 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 21:50:24 +0000 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 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 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) 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) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) From: Yuan Fu In-Reply-To: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> Date: Wed, 12 Apr 2023 14:50:04 -0700 Content-Transfer-Encoding: quoted-printable 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> X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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= From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuan Fu Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.16813366069282 (code B ref 62086); Wed, 12 Apr 2023 21:57:02 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 21:56:46 +0000 Received: from localhost ([127.0.0.1]:42024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiSM-0002Pc-1s for submit@debbugs.gnu.org; Wed, 12 Apr 2023 17:56:46 -0400 Received: from forward501b.mail.yandex.net ([178.154.239.145]:57010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiSI-0002PR-2I for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 17:56:44 -0400 Received: from mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:1d93:0:640:7571:0]) by forward501b.mail.yandex.net (Yandex) with ESMTP id 7CD565F3B3; Thu, 13 Apr 2023 00:56:40 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id bueHoo3DZ0U0-HPrFRzB3; Thu, 13 Apr 2023 00:56:39 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681336599; bh=aIgnQM6q2l8r5+GKH94D977m653mjcwEDrnun/vLN30=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=K+62Fw/06oFSLcr8ROa+ZZGaZGQvkAiwZxHMt8u/BwkTAyybIHPP0lEoVPs0FEMR9 avUQ2gkcyfmgdnHSt67oiXVI7D3fzQbjZBN8qpYECElOyEcM93QhNcVhrAtEbojwaX f9yoJAT0PkobDr/NjPA1wRD61RA//skGwCNBDJM8= Authentication-Results: mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 65C0F27C005B; Wed, 12 Apr 2023 17:56:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 12 Apr 2023 17:56:37 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekjedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepgfejhfduffegvdevtefhgfettefgfeelgfelffehgeehhfeiudehfedvffeg teegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 17:56:35 -0400 (EDT) Message-ID: Date: Thu, 13 Apr 2023 00:56:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US 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> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 13/04/2023 00:50, Yuan Fu wrote: > > >> On Apr 12, 2023, at 1:13 PM, Dmitry Gutov 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. forward-word works for minor elements, but the sub-expression can be, for example, a parenthesized expression (with "real" parens). It's definitely something that can be discussed, but the above guideline seems to me like something that puts the user more in control. Because as handy jumping over statements can be, it's usually not what one is trying to do. >> 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. Yes, that can work. Only when the excluded type names a one-char long, though, because Elisp has no lookahead. In ruby-ts-mode there are longer excluded types. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 22:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168133753310876 (code B ref 62086); Wed, 12 Apr 2023 22:13:01 +0000 Received: (at 62086) by debbugs.gnu.org; 12 Apr 2023 22:12:13 +0000 Received: from localhost ([127.0.0.1]:42038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmihJ-0002pM-43 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 18:12:13 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:34738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmihG-0002p5-4H for 62086@debbugs.gnu.org; Wed, 12 Apr 2023 18:12:11 -0400 Received: by mail-pl1-f176.google.com with SMTP id h24so13113181plr.1 for <62086@debbugs.gnu.org>; Wed, 12 Apr 2023 15:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681337524; 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=wx86c6vT5sEwZLfV3LB9oBGvtkkiMMLAtccE6towOMM=; b=HRBLoU65RRNalzQDPGk7DARnxi6YelMRRKWgIdhodsVrJd5/mIBfsvPJJO0xxqGVbY 6fdtRKyaQi4CxzMghaWlOLfClCXtRdxdoRQPdpe1U5DHeLsrebgCJXVdTOTgp8YhmpqE swJgLeicOggl0HLIKOiofVh7dOPTmq5JOTBLGqI8DYYTLeTj4Z1mk9Y2X6C3V/GEoiao JQeuvrAq5hEO1Lhc6hC19a9ZAkXzXMyE1ybCy0m+2qBbQPhKXLWZcWL4mSzfLAcTw3Tp eFUKZznJ1uxuZdkcfsoYtuy0t2WlGdaQZoHy+ytiHykA4c+ATWzfzLAoNb6H4hpIr9Xv 1/qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681337524; 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=wx86c6vT5sEwZLfV3LB9oBGvtkkiMMLAtccE6towOMM=; b=HUKf6EHxSgOwZNy2r7Q2WAoNPQBOzi0+Ig263OXkHWtIP5PsWnEkByd4gWYO+SOYV7 lhgTHkdPm9IaafQf1pqXXdZJFCvG8zV6JPu4uxK1cKPQ0JMVNhaxwsfig6B++S575rDY 3t/VNiFDycw2fo0CxmKXiy5ipbSXfMYC16cIdnPYaZN7opAf8ql/79VMxG+CJgX8cwSL TL3sYcqvpnU7Ho1bJmoc0zeMc2Rl+pT2qeKspWHkpfsXTzbAPn45dfVuHUEC4w4dz3gS FJRsWk2+ABBfk9XUXG9+VycfpfKmLeKK+6MVX7exh3ywiIgctmn9vcNqNKoCv2UdazFI 1XtA== X-Gm-Message-State: AAQBX9d3P9tgjoTZHUtVJVx/xJeScPDtRsM5pjYhiIjknESkia31pxeo UYi5ub7g2d/Nb76JUVpRP4k= X-Google-Smtp-Source: AKy350a/V/Z1XKOgzqJNuQiN9xTT/gkxV1zZk3f6Kej7j2Ow1HbzrV0q3N4cFIpQe+wmrSx56E1Pdw== X-Received: by 2002:a17:90a:294e:b0:246:882f:e28a with SMTP id x14-20020a17090a294e00b00246882fe28amr793739pjf.13.1681337523987; Wed, 12 Apr 2023 15:12:03 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id e6-20020a170902d38600b001966d94cb2esm53774pld.288.2023.04.12.15.12.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2023 15:12:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) From: Yuan Fu In-Reply-To: Date: Wed, 12 Apr 2023 15:11:52 -0700 Content-Transfer-Encoding: quoted-printable 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> X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 12, 2023, at 2:56 PM, Dmitry Gutov wrote: >=20 > On 13/04/2023 00:50, Yuan Fu wrote: >>> 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. >=20 > forward-word works for minor elements, but the sub-expression can be, = for example, a parenthesized expression (with "real" parens). >=20 > It's definitely something that can be discussed, but the above = guideline seems to me like something that puts the user more in control. = Because as handy jumping over statements can be, it's usually not what = one is trying to do. >=20 >>> 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. >=20 > Yes, that can work. Only when the excluded type names a one-char long, = though, because Elisp has no lookahead. In ruby-ts-mode there are longer = excluded types. Actually, I=E2=80=99m working on extending the =E2=80=9Cpattern=E2=80=9D = treesit-search-forward and friends can accept. Right now it has to be a = regexp or a pred function. I plan to extend it to regexp | function | = (regexp . function) | (or =E2=80=A6) | (not =E2=80=A6) = | (verbatim string) I=E2=80=99m not yet sure about the performance implication of the = recursive patterns (or and not). And I=E2=80=99m not sure if verbatim is = necessary, but I guess having it wouldn=E2=80=99t hurt. Yuan= From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Apr 2023 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Yuan Fu , Theodor Thornhill Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168140810822050 (code B ref 62086); Thu, 13 Apr 2023 17:49:02 +0000 Received: (at 62086) by debbugs.gnu.org; 13 Apr 2023 17:48:28 +0000 Received: from localhost ([127.0.0.1]:44723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pn13c-0005ja-4R for submit@debbugs.gnu.org; Thu, 13 Apr 2023 13:48:28 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pn13X-0005ie-Ev for 62086@debbugs.gnu.org; Thu, 13 Apr 2023 13:48:26 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B8C57240005; Thu, 13 Apr 2023 17:48:15 +0000 (UTC) From: Juri Linkov In-Reply-To: <1df48560-a14c-9414-5e9e-97b5109e4aa4@yandex.ru> (Dmitry Gutov's message of "Wed, 12 Apr 2023 23:13:02 +0300") Organization: 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> <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> Date: Thu, 13 Apr 2023 20:42:27 +0300 Message-ID: <865y9zznjx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. Ideally, all previously supported pairs of braces/brackets/parens and symbols should be navigated with 'C-M-f' plus a very small number of constructs with "implicit parens" such as do...end, def...end, etc. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Apr 2023 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Yuan Fu , Theodor Thornhill Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168149202815716 (code B ref 62086); Fri, 14 Apr 2023 17:08:02 +0000 Received: (at 62086) by debbugs.gnu.org; 14 Apr 2023 17:07:08 +0000 Received: from localhost ([127.0.0.1]:47489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnMtA-00045P-IL for submit@debbugs.gnu.org; Fri, 14 Apr 2023 13:07:08 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:59037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnMt4-00044q-Kw for 62086@debbugs.gnu.org; Fri, 14 Apr 2023 13:07:07 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 06655E0003; Fri, 14 Apr 2023 17:06:54 +0000 (UTC) From: Juri Linkov In-Reply-To: <865y9zznjx.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 13 Apr 2023 20:42:27 +0300") Organization: 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> <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> <865y9zznjx.fsf@mail.linkov.net> Date: Fri, 14 Apr 2023 20:03:43 +0300 Message-ID: <86zg7as8eo.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> 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. > > Ideally, all previously supported pairs of braces/brackets/parens and > symbols should be navigated with 'C-M-f' plus a very small number > of constructs with "implicit parens" such as do...end, def...end, etc. Plus braces/brackets/parens inside comments and strings. From unknown Sat Aug 16 16:11:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62086: 29.0.60; ruby-ts-mode regressions Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2023 00:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 62086@debbugs.gnu.org, Theodor Thornhill , Juri Linkov Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.1681517358448 (code B ref 62086); Sat, 15 Apr 2023 00:10:01 +0000 Received: (at 62086) by debbugs.gnu.org; 15 Apr 2023 00:09:18 +0000 Received: from localhost ([127.0.0.1]:47919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnTTh-00007A-Pt for submit@debbugs.gnu.org; Fri, 14 Apr 2023 20:09:18 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:52504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnTTg-00006q-1b for 62086@debbugs.gnu.org; Fri, 14 Apr 2023 20:09:16 -0400 Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-63b60366047so404339b3a.1 for <62086@debbugs.gnu.org>; Fri, 14 Apr 2023 17:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681517350; x=1684109350; 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=XkTGVwC30v2vb2LlqTuEYSeXmhSpZHv19aJcYV4UdtY=; b=ZYzRxxaPjxiuzuY3v4LW4p3KL+qJDGfd0AzjZNBiTbVS944qP/0TSXT5Tcm0VZMZJr s4TOjGTRB6KHwYZPt1dI5bO5E88Mz43RDtuR+SR5t2d6S6E4BdDUbFvcjoKyk3dMlM2V l5z5brrgme7uGthHld2rkmj4ckh5Dn6lFQMXMQmihkBK/VI4VGBBt5vsmEZyPYG2C0NP dca9eqocFrJZb+E46Uohg90V94SXr2PXhf+gQij1i5myCrov3LwTXJGJtzB6gB2kDDX7 NytNvfwdBEVNbaQURSggVJ73A0aPl3i2cleTqxmtwg6wAJahj/XXj1DuCX66p7rOq8l2 t5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681517350; x=1684109350; 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=XkTGVwC30v2vb2LlqTuEYSeXmhSpZHv19aJcYV4UdtY=; b=V6+Wau3uJVx0fLJTPoIdU8eFeVZVogcQEwHLRqq1QWprKR1kn3iKK3hXvAlneJ/Nkb 5I6hp2YAx6tHI3G2jdax3RKTWLRtnZ3H/28/3vfl/1bGxVS5PYNyOvclwR32wO0BVwCA XmPI+ow6KlkZx/bRYdUQBUkWCYCP9IFYSE1cdSvpNPgLNFLAlnabSRVDL1/P+3MQKEEE AC38q7zXTd5/hqpoIu0atvyhp7uG691bDgVpBKUp0hYaW81PssiuQpcBdI1Ac9zV6U4F Zt2/0pOsFY32tgF4NJQ/xGlOjDXP9Q+/iIDLhriS4qMwj//BYCI/1VXVBU8tAdJ3YzPA YaHA== X-Gm-Message-State: AAQBX9fJqWHQNs1ktcVU+K1twcH2YWMdrgwszGr4pfLj/9mLjwpst5g7 OfGNYkPvDD2KJuBnui4p3ko= X-Google-Smtp-Source: AKy350ZJowD5w4uUcg/0kDbAStT584w+w1C7hdlFq+fBNA0I+o/C7VzlfO23Mp+5OMof9u4rmW5a0w== X-Received: by 2002:a05:6a00:1587:b0:635:cfa6:ee5d with SMTP id u7-20020a056a00158700b00635cfa6ee5dmr11964276pfk.7.1681517350015; Fri, 14 Apr 2023 17:09:10 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id j8-20020aa78008000000b0062e00158bf3sm3669262pfi.175.2023.04.14.17.09.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2023 17:09:09 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) From: Yuan Fu In-Reply-To: Date: Fri, 14 Apr 2023 17:08:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8C5A5F3B-634F-4B2A-A5F7-7E3E26C78073@gmail.com> 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> X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 12, 2023, at 3:11 PM, Yuan Fu wrote: >=20 >=20 >=20 >> On Apr 12, 2023, at 2:56 PM, Dmitry Gutov wrote: >>=20 >> On 13/04/2023 00:50, Yuan Fu wrote: >>>> 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. >>=20 >> forward-word works for minor elements, but the sub-expression can be, = for example, a parenthesized expression (with "real" parens). >>=20 >> It's definitely something that can be discussed, but the above = guideline seems to me like something that puts the user more in control. = Because as handy jumping over statements can be, it's usually not what = one is trying to do. >>=20 >>>> 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. >>=20 >> Yes, that can work. Only when the excluded type names a one-char = long, though, because Elisp has no lookahead. In ruby-ts-mode there are = longer excluded types. >=20 > Actually, I=E2=80=99m working on extending the =E2=80=9Cpattern=E2=80=9D= treesit-search-forward and friends can accept. Right now it has to be a = regexp or a pred function. I plan to extend it to regexp | function | = (regexp . function) | (or =E2=80=A6) | (not =E2=80=A6) = | (verbatim string) >=20 > I=E2=80=99m not yet sure about the performance implication of the = recursive patterns (or and not). And I=E2=80=99m not sure if verbatim is = necessary, but I guess having it wouldn=E2=80=99t hurt. >=20 > Yuan Ok, I added experimental support for those patterns (except for = verbatim) and a central place to define things: treesit-thing-settings. = If you define a =E2=80=98block in treesit-thing-settings, you can use = =E2=80=98block for treesit-thing-at-point, treesit-beginning-of-thing, = etc. Yuan=