From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode Date: Tue, 28 Mar 2023 09:31:52 +0300 Organization: LINKOV.NET Message-ID: <86o7odmlnr.fsf@mail.linkov.net> References: <9cfb677e-2c3b-94f3-e09f-8b231dd9b8f5@yandex.ru> <86v8iomzk3.fsf@mail.linkov.net> <7f03efd3-b3d8-2a93-3414-63a7a2604943@yandex.ru> <86v8imfrbt.fsf@mail.linkov.net> <385443e1-4d17-317b-decf-36a3cf50111e@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26685"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: =?UTF-8?Q?Bo=C5=A1ko_?= =?UTF-8?Q?Ivani=C5=A1evi=C4=87?= , 62416@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 28 08:39:37 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ph2zZ-0006oh-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Mar 2023 08:39:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ph2zA-0004Hx-4t; Tue, 28 Mar 2023 02:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ph2z4-0004Hc-Et for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 02:39:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ph2yz-0002Dp-TY for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 02:39:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ph2yz-0001MJ-OE for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 02:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Mar 2023 06:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62416 X-GNU-PR-Package: emacs Original-Received: via spool by 62416-submit@debbugs.gnu.org id=B62416.16799854945147 (code B ref 62416); Tue, 28 Mar 2023 06:39:01 +0000 Original-Received: (at 62416) by debbugs.gnu.org; 28 Mar 2023 06:38:14 +0000 Original-Received: from localhost ([127.0.0.1]:48733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ph2yE-0001Kv-Jg for submit@debbugs.gnu.org; Tue, 28 Mar 2023 02:38:14 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:54243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ph2yD-0001KU-9N for 62416@debbugs.gnu.org; Tue, 28 Mar 2023 02:38:14 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 5F0BE240002; Tue, 28 Mar 2023 06:38:04 +0000 (UTC) In-Reply-To: <385443e1-4d17-317b-decf-36a3cf50111e@yandex.ru> (Dmitry Gutov's message of "Mon, 27 Mar 2023 20:28:32 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258780 Archived-At: >> This will break other cases, e.g. >> b = %Q{This is a "string"} >> c = %w!foo >> bar >> baz! >> d = %(hello (nested) world) >> when point is after "b", 'C-M-f' will move to "c" instead of the end of >> line. > > That is because the string literals aren't recognized as sexps yet. Try > this: > > @@ -1129,8 +1129,11 @@ ruby-ts-mode > "block" > "do_block" > "begin" > - "binary" > - "assignment"))) > + "integer" > + "simple_symbol" > + "string" > + "string_array" > + ))) Thanks, this definitely is an improvement since it handles all mentioned cases. However, there are still a lot of more things that need fixing. When point is on the left curly bracket in b = %Q{This is a "string"} 'C-M-f' doesn't move to the right curly bracket. Also double quotes inside the string are not matched by 'C-M-f'. In d = %(hello (nested) world) 'C-M-f' doesn't move to the closing parens from opening parens. Looking at test/lisp/progmodes/ruby-mode-resources/ruby.rb for example here curly brackets are not matched with 'C-M-f C-M-b' in string interpolation and regexps: "abc/#{ddf}ghi" /foo/xi != %r{bar}mo.tee Do you think it is possible to handle these cases by crafting treesit-sexp-type-regexp?