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: Sat, 25 Mar 2023 15:44:18 +0200 Message-ID: <1ca302bf-99dc-7f9e-8544-063064a1cb21@yandex.ru> References: <87fs9yur7r.fsf@gmail.com> <2fd8f2b8-d9c4-c825-a789-f2d42324859f@yandex.ru> <09539C5E-23DA-4B00-A3F6-873A41D6A2CE@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> 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="15653"; 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: wkirschbaum@gmail.com, casouri@gmail.com, 62333@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 25 14:45:16 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 1pg4Cq-0003nz-9c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 14:45:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg4Ce-00083F-N9; Sat, 25 Mar 2023 09:45: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 1pg4Cd-000830-3z for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:45: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 1pg4Cc-0008Ne-KQ for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pg4Cc-00076F-Ar for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:45: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: Sat, 25 Mar 2023 13:45: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.167975186827234 (code B ref 62333); Sat, 25 Mar 2023 13:45:02 +0000 Original-Received: (at 62333) by debbugs.gnu.org; 25 Mar 2023 13:44:28 +0000 Original-Received: from localhost ([127.0.0.1]:42202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg4C4-00075C-Hc for submit@debbugs.gnu.org; Sat, 25 Mar 2023 09:44:28 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:55114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg4C3-00074z-4Z for 62333@debbugs.gnu.org; Sat, 25 Mar 2023 09:44:27 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id s13so2580859wmr.4 for <62333@debbugs.gnu.org>; Sat, 25 Mar 2023 06:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679751861; 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=k4728vb+cvQaKGoZGvTFibWdW7gImRp63o7CgC47YF0=; b=Du5lnnn1pzfYl9/QS+n5D3VLfRvhOsKeW7ol9qMMhen7Jrfk/+9dyomLsi4XdNLLSj OTglSq7AwEvg2FyiItDAmq5FrcGrtuiL4D0MaGdhUu9NiVIOrR/qpQDwwed2oxFngVPS e4uPBoSzjj8fBffdddfNJ1r1i/cXuHO30rTs2BSs+IY4H6pwKkQroomqXve50kAAQr3t noD6eJoafGjXLeUey37nYvBU4j1k+lskaRDqUYGQJX7VgE9EnHUiBy5gNFIJ6cuy4/6R XIGQVDxihtdTwahQhuD5KP0xfFi2hCICQner6wS+V+1xzFHhesqD+Bbq/1ie2pefnHpR KcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679751861; 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=k4728vb+cvQaKGoZGvTFibWdW7gImRp63o7CgC47YF0=; b=MeI7uQLl1ubyJKQBlVQnZIjEyfkGjyUBIRRYVZsmv0UDy2PpcWaiFvqREMzXzQ56IJ HF0bjHTRh12DH/zFGC4V64SMvWgxJl6SGnBW31xnl/vRD8tMHh24tConyJW/kvePvaja ww52FLoFvd2Ha1E/Rozgo8sPkgvZxli/JSip9n5t9QJcEjb+axMPlM6uTv6kFFJgmNMJ moaZh0L6qM+M9S7RzhlmEEEZxm8UKOEu4u57VnJjzu/23wZLvjtxh+4tnWMd9+SaEMar K0bkrwsOLdBgVXIpXSTNozgq8r4VlBtdhc8t2t/7kyH4ru9T6rlmZAY43i/ODoHtOdi0 /jiw== X-Gm-Message-State: AO0yUKXZVsrxiCfvv2kFxxp6QiGAlR8wmKTmQ3ynsHS4dqoCKvOabWvr TN5q4pJfemslOjsVGZ84Jrs= X-Google-Smtp-Source: AK7set/fDYx3TpfThB1LYK5fJUdtW5QddfHZXzHJxjLYzLRhEzKD0BS1ekVFE/TyBh+Wk3LS8dRpBg== X-Received: by 2002:a05:600c:2157:b0:3ed:cf2a:3fe8 with SMTP id v23-20020a05600c215700b003edcf2a3fe8mr5361422wml.8.1679751860525; Sat, 25 Mar 2023 06:44:20 -0700 (PDT) Original-Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id h3-20020a05600c314300b003e1202744f2sm2946246wmo.31.2023.03.25.06.44.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Mar 2023 06:44:20 -0700 (PDT) Content-Language: en-US In-Reply-To: <83edpdc6sn.fsf@gnu.org> 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:258570 Archived-At: On 25/03/2023 15:14, Eli Zaretskii wrote: >> Date: Sat, 25 Mar 2023 15:00:24 +0200 >> Cc:wkirschbaum@gmail.com,casouri@gmail.com,62333@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 25/03/2023 14:34, Eli Zaretskii wrote: >>> Is there any real reason blink-matching-open narrows the buffer? If >>> we could remove that narrowing, the problem with the parser's taking >>> notice of it would be gone. >> Performance: to avoid scanning for the matching paren too far in the buffer. > If that's the only reason, then tree-sitter based modes could widen > back in their sexp-moving functions, since they use the parse data for > this, right? Not necessarily: it doesn't know the purpose for which the narrowing was applied. Could be for a mixed-major-mode thing, or some other purpose. Long lines? Do we recall the exact design idea why tree-sitter visibility is limited by the narrowing bounds? Because if we wanted to widen in all similar situations, we might as well make it not obey the narrowing at all.