From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes Date: Mon, 27 Mar 2023 08:24:42 +0000 Message-ID: <728618716b8c5349d27e@heytings.org> References: <87fs9yur7r.fsf@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> <3d64520c-54da-a04a-ed0d-a66b4e753f8a@yandex.ru> <831qlcaysh.fsf@gnu.org> <29679184-7366-0167-9e94-def97048f663@yandex.ru> <83v8inal29.fsf@gnu.org> <9886ffa5-ead2-50d5-a325-f6704b736ada@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3343"; mail-complaints-to="usenet@ciao.gmane.io" Cc: wkirschbaum@gmail.com, Eli Zaretskii , casouri@gmail.com, 62333@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 27 10:25:28 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 1pgiAQ-0000ed-J3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 10:25:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgiA5-0008KL-3g; Mon, 27 Mar 2023 04:25: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 1pgiA3-0008K5-Ac for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 04:25: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 1pgiA3-0007IR-1T for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 04:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgiA2-0002zZ-H9 for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 04:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Mar 2023 08:25: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.167990548811470 (code B ref 62333); Mon, 27 Mar 2023 08:25:02 +0000 Original-Received: (at 62333) by debbugs.gnu.org; 27 Mar 2023 08:24:48 +0000 Original-Received: from localhost ([127.0.0.1]:46442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgi9o-0002yv-7e for submit@debbugs.gnu.org; Mon, 27 Mar 2023 04:24:48 -0400 Original-Received: from heytings.org ([95.142.160.155]:55900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgi9l-0002yk-FN for 62333@debbugs.gnu.org; Mon, 27 Mar 2023 04:24:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1679905484; bh=kQVtVdwW4zNMyMBDKre3S9KHLmRYr4ScXoss+4XbRcc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=H1PDfh+o6TdzFu/7Y1SbwXGUigxecGfFDP3QyPqwI0RamFSY58Hc/o8gGuXoyDXKu 9yWHyj7acjN1McrHYY6RlE2W6T/g0E3BJo9fI0oDFDYOCcXGzTC+C3tRP/fSQk9WnV /+YSjY3DNxSoVIWbezIN/CuHWTu4FhHmgJjJT5y2gAKX2tOojRpg9Cj7p3T3NlTzuh fyVpx6cS1zmZrWSO6ke9wBh1LTaCWwf0sVuAqUnvsfk0ivk2GSwKli4DwE61J2DeCR 1fxwXBosFvGCt6L0o0mRuTbL0r2dP0Gk4yhG1lY95uHZTr1fseaZYafb9NJcK/6WrF 4UHw1GDY2GxlQ== In-Reply-To: <9886ffa5-ead2-50d5-a325-f6704b736ada@yandex.ru> 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:258713 Archived-At: >>>> Again, I'm talking about using a parser library. We may need to >>>> introduce a way of limiting the parser to a certain range of buffer >>>> text positions, independently of narrowing. >>> >>> Except it's already limited by narrowing. >> >> Which is a fragile, semi-broken means, as we all know. > > What is a broken mess, is user-level narrowing. And how the downstream > code can never guess the purpose the narrowing was applied for. > Note that this is what labeled narrowings attempts to solve. It's perhaps not the best way to deal with code that has existed for a long time (because such code is not prepared to handle that kind of narrowing gracefully), but I don't see why it couldn't be used in new code/modes such as tree-sitter ones. It is independent of user-level narrowing, and downstream code can act differently depending on the reason for which the narrowing was applied.