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#60237: 30.0.50; tree sitter core dumps when I edebug view a node Date: Tue, 28 Feb 2023 00:45:51 +0200 Message-ID: References: <9FCDA5B7-D216-45B1-8051-35B05633BEFB@gmail.com> <83sfeukwsb.fsf@gnu.org> <574817C4-3FD8-43EA-B53C-B2BCB60A6D0A@gmail.com> <87a610wyod.fsf@masteringemacs.org> <875ybnwm2r.fsf@masteringemacs.org> <8A0520AE-7C8C-43D2-BE93-E80D5CC8856C@gmail.com> <871qmbw55n.fsf@masteringemacs.org> <4FF7BE3E-A966-4419-AA22-BAF57D1EF792@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="14283"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: Po Lu , Eli Zaretskii , 60237@debbugs.gnu.org To: Yuan Fu , Mickey Petersen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 27 23:47:15 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 1pWmH4-0003YS-Li for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Feb 2023 23:47:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWmGu-0005Qj-Fk; Mon, 27 Feb 2023 17:47:04 -0500 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 1pWmGt-0005Q3-4O for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 17:47:03 -0500 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 1pWmGs-0005n1-MO for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 17:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWmGs-0000Of-If for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 17:47:02 -0500 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 Feb 2023 22:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60237 X-GNU-PR-Package: emacs Original-Received: via spool by 60237-submit@debbugs.gnu.org id=B60237.16775379621422 (code B ref 60237); Mon, 27 Feb 2023 22:47:02 +0000 Original-Received: (at 60237) by debbugs.gnu.org; 27 Feb 2023 22:46:02 +0000 Original-Received: from localhost ([127.0.0.1]:49139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWmFt-0000Mn-Dk for submit@debbugs.gnu.org; Mon, 27 Feb 2023 17:46:01 -0500 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:38544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWmFr-0000MR-Ba for 60237@debbugs.gnu.org; Mon, 27 Feb 2023 17:45:59 -0500 Original-Received: by mail-ed1-f48.google.com with SMTP id cy6so32324280edb.5 for <60237@debbugs.gnu.org>; Mon, 27 Feb 2023 14:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=hwiXOLj0M6SIWBuVe0lwH7wA3vC5a+CZidRakLvMiTc=; b=ezuLBoORC18aRnvNK5ToBN9FKNm0ZNs5vYu0wuYSR+bCBjWCQmlnq5xlySItQZbXj9 SeAozDjoM5BSSGX7ZneWFKLVUKPGd/fpAwKMlwzRFWzTid2sxTsyNluNBkGjGKqN9cI4 oFWJLAgX0cAmE8Fb5muYg898WqENYQjfcjdjgxUR8HhaB/5uGEdUjL61LcXBlJx4M/OQ waqm6k5dggY5BOVPav4z6ujyPSl+QGZG1KVDLi1Yk8DdSV4R9S89OGDG8DNsrTWIiSP6 0qukbDRqp4++abMCgSZFkMIsmBgJtTQ0l53ZBngFemY3klDJ01VLOZ/wI+u015EMEiCM IAZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=hwiXOLj0M6SIWBuVe0lwH7wA3vC5a+CZidRakLvMiTc=; b=McLi2TLs3pxJ7Lg1lWeQAyh6aIEhSoJbyIRWOmzcqbv0OnrPxg1AtZqoKI0wiQN4eY hsWFyp0jmzHNLU4YT5ScFumripqvuty4AtTQwxRZS/9FiZxTYglkuw6N0dDcDbd5G2jM AdhXdaxUHnf5vmx4qAmh14/iPV11/09QCYlCavknktibF8QCosb8wJotISKrcbfwiECj q9DCFg7ipGPE2E/wveZ+737JAAn3IlpvDGavgFDxFpRp3BL9E6/7jRkB4Zc9QRznZIrY V8QqPWGG98kdQlJFKWCVM15NYyqIDPRYC7D5/aDtXRY3z0fape0v5uKqfcPRfUPQBoU7 Bo/w== X-Gm-Message-State: AO0yUKWDx3b+ZI94YoAIiZjKKVz3QAZ5EXTw494wYICMqQc1aTF8lGEm vcOjHaCvNLbiOULQDByB6WI= X-Google-Smtp-Source: AK7set+rVaBbQYWcx/V3Qp2U4bfZorMSWOd7zAL1lPogb2t18+rCimQc9RRrY6yN5SBuJwmnYvxVbg== X-Received: by 2002:aa7:d6c7:0:b0:4ad:828b:970 with SMTP id x7-20020aa7d6c7000000b004ad828b0970mr1031330edr.33.1677537953433; Mon, 27 Feb 2023 14:45:53 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z27-20020a50cd1b000000b004af516b5010sm3622259edi.94.2023.02.27.14.45.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Feb 2023 14:45:53 -0800 (PST) Content-Language: en-US In-Reply-To: <4FF7BE3E-A966-4419-AA22-BAF57D1EF792@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:256921 Archived-At: On 28/02/2023 00:37, Yuan Fu wrote: >> My main interest is now refactoring and how to best do it. If TS can >> do some of it, then all the better. I realise it was never meant to, >> but if we can continue accessing the information contained in a node >> even if it is outdated, then that could be useful, however niche. > I guess “refactoring” includes not only whitespace changes but also some structural changes like slurping (or whatever it’s called), right? If you want to do structural changes, tree-sitter probably can’t help you much, as you observed. Maybe it’s better to “export” the tree-sitter tree to your own tree and do transformations with it? Maybe that’s already what you does now. > Or simply produce all the editing information up front, and then modify the buffer in different places in one swoop. Just like treesit-indent-region does. That almost the same as described, but doesn't require creating a parallel parse tree hierarchy.