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#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes Date: Mon, 27 Mar 2023 04:29:12 +0300 Message-ID: <7e84105a-7506-5e7a-5cca-bd83b6982d75@yandex.ru> References: <87fs9yur7r.fsf@gmail.com> <83h6uc549z.fsf@gnu.org> <665745A2-FDC8-45DE-BFF5-2F688FC85431@gmail.com> <491b788f-c3c3-4877-daa0-f515be9f3a17@yandex.ru> <83sfduelab.fsf@gnu.org> <8FC25A01-6934-43BB-899C-CA5926BEA3CF@gmail.com> <83jzz5c8ml.fsf@gnu.org> <83edpdc6sn.fsf@gnu.org> <1ca302bf-99dc-7f9e-8544-063064a1cb21@yandex.ru> <831qlcdisi.fsf@gnu.org> <398721ad-79b0-3f6d-97b3-4902d9bfbe39@yandex.ru> <83wn34c2qa.fsf@gnu.org> <3b3d82d1-f0f6-a768-a5db-8dc9386a5a34@yandex.ru> <83r0tcbz8g.fsf@gnu.org> <1967361679760225@umbzx4hqxrw5qxo7.sas.yp-c.yandex.net> <83mt40bxzd.fsf@gnu.org> <83jzz4bugh.fsf@gnu.org> <35322CB1-DF75-47C1-9B66-21260C437006@gmail.com> <1ef42ce9-e7a5-5a21-e4a4-f8affb45541d@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30776"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cc: Wilhelm Kirschbaum , Eli Zaretskii , 62333@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 27 03:30:32 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 1pgbgr-0007hY-7W for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 03:30:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgbgT-00046R-5m; Sun, 26 Mar 2023 21:30:05 -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 1pgbgR-00045y-Rp for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 21:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgbgR-00080j-IK for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 21:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgbgQ-00084b-U9 for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 21:30: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: Mon, 27 Mar 2023 01:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62333 X-GNU-PR-Package: emacs Original-Received: via spool by 62333-submit@debbugs.gnu.org id=B62333.167988056330958 (code B ref 62333); Mon, 27 Mar 2023 01:30:02 +0000 Original-Received: (at 62333) by debbugs.gnu.org; 27 Mar 2023 01:29:23 +0000 Original-Received: from localhost ([127.0.0.1]:46151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgbfn-00083G-0K for submit@debbugs.gnu.org; Sun, 26 Mar 2023 21:29:23 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:52942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgbfl-000832-4g for 62333@debbugs.gnu.org; Sun, 26 Mar 2023 21:29:21 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id l37so4135444wms.2 for <62333@debbugs.gnu.org>; Sun, 26 Mar 2023 18:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679880555; 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=1jedoUjaH7MTHs7RdF7as8WovRGrdotTAPYrlWTrvXM=; b=BBlnKt/HwUhzYhr/wk6GaiAGeQcPn6aFzCqOJZ7ywlJEKwskfCb4Wi8wvuGixxasrO N0bSkUOOP2tmUwQFdOIQzdS8rSiT0dkarDXjyn+hJTr/yRFB3ch1uypNQ/4yzdeFmKQb x0URdImDqE6pC+pqZXya22Jn5+WlOaweh8kswre7lpf+ANrsqmXH5Cz9GBDZOU3O0q6M pWcvU5fuF9WQCnGn/Uj+AAX5VyFPK2055d1feCMmBmaHonwWlhLwSWvO3y0rvpjRVBFZ 8gcD/NXQpo47XlzorVmOeHL9UZrYbQKLpfEGinwYhDvkQVrmmXkeIgoMiZuj+zFGUkZn 5mcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679880555; 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=1jedoUjaH7MTHs7RdF7as8WovRGrdotTAPYrlWTrvXM=; b=eHVZyuh9TUCmi+ZRqEkHTaN+q3qpxDnTpZOwoLIF1vS2lyRlo4IqpE5wST2NHC64XS hYD9rrN5EhkcLsWWcI9YuPFrj3oJ6xlD+rrjRBCLr/WFWYMTKVBkOHq1IRumhpJShAmi fD4wF90HdurXOcbXiplBQS/R9KXLs0FwmOvGwap6eHDnx4bAX1pWfb25CFIVMY4PSm7T /VUlnc2C+G0bAO8l2W6S0BJazu9jzTlZmX7dSEvaTmRIqoAd4PwkUaIM7lUY2BvHTq6P 39jW5pHuHgtKOlX7uDfTcKy8HbGjOEv1FPPYpy4RbhphEQWZwMMzN7QPKFIQdOvlCs+m jyJg== X-Gm-Message-State: AO0yUKUFTHZEPtjzxeE17lQO6j8mNLhGAtcfZRnCncAiOb7ptWl5E8W6 QAJ4FBjL9Xdx0HoN5jpNoWY= X-Google-Smtp-Source: AK7set+lFKv3qa+to8s79i3SmtgfkjQFHBAe4ZZ8qmnhp8mN1wUoMp1RX+10NsQtKy2uzQevBp5M3Q== X-Received: by 2002:a7b:cb92:0:b0:3ea:ed4d:38f6 with SMTP id m18-20020a7bcb92000000b003eaed4d38f6mr8151134wmi.4.1679880554951; Sun, 26 Mar 2023 18:29:14 -0700 (PDT) Original-Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id k22-20020a05600c1c9600b003eda46d6792sm6901036wms.32.2023.03.26.18.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Mar 2023 18:29:14 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:258706 Archived-At: On 27/03/2023 01:52, Yuan Fu wrote: > If we can pull it off, a user only need to specify what is a pair and how to find the matching pair according to the language grammar, and the rest is automatic (a tree-sitter function for show-paren-data-function and blink-matching-paren). Sounds good. Indeed, for this feature a registry of opener-closers should suffice. Another command that could use it, is an implementation of backward-up-list. Somehow the default up-list manages to use SMIE's forward-sexp-function (and backward...) definitions automatically, but not tree-sitter's. I've been told it's expected for now, so I think opener-closers are the missing piece (either to enhance treesit-forward-sexp/treesit-backward-sexp to resemble the originals more closely, or to implement treesit-backward-up).