From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode Date: Mon, 3 Apr 2023 01:43:40 +0300 Message-ID: <9a3d2866-c24c-05bc-3258-2f09cfed66c8@yandex.ru> References: <8fa7abb8-d9ce-e39e-6507-53c52749ac79@yandex.ru> <612A0BCF-7E29-4C3F-AFB5-3AB71F32B786@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Cc: bosko.ivanisevic@gmail.com, 62416@debbugs.gnu.org, Juri Linkov To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 03 00:44:10 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 1pj6Qk-0001sz-Mc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Apr 2023 00:44:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pj6Qe-0007aq-6x; Sun, 02 Apr 2023 18:44:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pj6Qc-0007YI-PJ for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 18:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pj6Qc-00050r-Fc for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 18:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pj6Qc-0005So-09 for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 18:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2023 22:44: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.168047543120973 (code B ref 62416); Sun, 02 Apr 2023 22:44:01 +0000 Original-Received: (at 62416) by debbugs.gnu.org; 2 Apr 2023 22:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:42936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pj6QQ-0005SC-JJ for submit@debbugs.gnu.org; Sun, 02 Apr 2023 18:43:50 -0400 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:53159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pj6QO-0005Ru-KW for 62416@debbugs.gnu.org; Sun, 02 Apr 2023 18:43:49 -0400 Original-Received: by mail-wm1-f54.google.com with SMTP id l37so16020421wms.2 for <62416@debbugs.gnu.org>; Sun, 02 Apr 2023 15:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680475423; 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=vCkGlEkAbKWfkdROSjCBkPr9txK3Xilh1bcnw+4WyT8=; b=PymnVRt+E5NXR1qSWM+nEjyGWMxVctlNRp4ElzHoqetcP0SGNF3xIqsownerxZGJMX EXHF9sto2lHdbC48EmlsAZT5eX/WMZ7IovyirmaFp+NvITgbvK9XucZIogfZX7mU/wLd rj7EctOxW3x6lJ4iTwn8I3AYIsl8EF0E3tg6bUa5EMnGNvk2JOuCp8g9WoH8p+XV9Mer xPmuiTc8kkJ2XkcMnFivitWMVlVmgoyeQIuPdgO53T2+pz0ynXtnYxVN1DdD4AoPb5HN 25mH5IjLM02Yp97lJ3dZJFuGYoKKDaFvIQkrssn0zz6OGDV+mmCpn5oHB8RICPfBBBmW BKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680475423; 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=vCkGlEkAbKWfkdROSjCBkPr9txK3Xilh1bcnw+4WyT8=; b=diDtGcl5dw108noqpeMvzvZWw8ZYCz6PosBlv+Jw4+b6asoAfX2a5JeajRlPH0dcma KbJHxatuNUzxYqbqnJJQNmeijqL51uTEYvrMHXYiosbcElUCAsdZY9LBFzdTKlIamX6w 4PRXZvQ+e6hdR3y1FGuvLjuSLkqlGpddfS8r6chSt+dKl2kyLpgjVU8CJFmiDY9Ao2mo P3AMQ2LSt7yWiSLUitfHlhq1ttUvk5Ut1ppcSabBFRb2YYoOLpVTLveb+DibKvVaKb3P n5Z3x0tqgVrES4hehQkJsweTikm15yzvaSXm/5ZalY1FJypuCHCiXjuLlgSOhHM/f5tI P5og== X-Gm-Message-State: AO0yUKWhSLzJ952YGWbo7ZBAvfpLwJm66tCzvGUc7wC0EtGS6gsVBnvG RWVRR94q1QBpqGpHRayP/LA= X-Google-Smtp-Source: AK7set9YG7IRx1bj1eHvimOZY5I++1cV93DMDiT+LX25YL3Swf2SThpZVwb0vOntBpyeYIZyo0XvIQ== X-Received: by 2002:a7b:cb94:0:b0:3ee:2552:7512 with SMTP id m20-20020a7bcb94000000b003ee25527512mr24863196wmi.13.1680475422735; Sun, 02 Apr 2023 15:43:42 -0700 (PDT) Original-Received: from [192.168.1.2] ([31.216.80.60]) by smtp.googlemail.com with ESMTPSA id m18-20020a7bca52000000b003ee44b2effasm10167892wml.12.2023.04.02.15.43.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Apr 2023 15:43:42 -0700 (PDT) Content-Language: en-US In-Reply-To: <612A0BCF-7E29-4C3F-AFB5-3AB71F32B786@gmail.com> 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:259142 Archived-At: On 03/04/2023 01:34, Yuan Fu wrote: > >> On Mar 30, 2023, at 2:32 AM, Dmitry Gutov wrote: >> >> On 30/03/2023 10:47, Yuan Fu wrote: >> >>>> 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. >>> Have someone fixed these two cases? Because when I tried to invoke >>> (treesit-forward-sexp), point moved to the closing bracket/paren. >> From which position? When point is right before '{', it doesn't move in my testing. It does move when it was before '%'. > Ok, I see it. I’ll try to see what’s going on when I find some time. There is nothing surprising in this behavior, given the current implementation: it doesn't examine the text in the buffer, just uses the parse tree, And there is no trace of these parens/braces in the parse tree. >>> Anyway, I just wonder if there’s any fundamental shortcoming with how >>> treesit-beginning/end-of-thing works? >> I don't know. Seems like this method is good for a lot of things, but some fiddly details are going to be different from the default forward-sexp. >> >> ruby-mode's sexp navigation is also not ideal in its own way, and it's been useful anyway. > One thing I noticed is that treesit-forward-sexp uses treesit-beginning/end-of-thing, which jumps out of the parent when there is no more siblings to go to. The default forward-sexp obviously doesn’t do this. Perhaps we should stay in the same level in tree-sitter-forward-sexp too. That's a different aspect of its behavior. One that makes 'backward-up-list' fail to work, IIUC.