From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes Date: Tue, 28 Mar 2023 14:30:34 +0300 Message-ID: <83jzz1865h.fsf@gnu.org> References: <87fs9yur7r.fsf@gmail.com> <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> <728618716b8c5349d27e@heytings.org> <83bkke9uue.fsf@gnu.org> <728618716b5bdf2ef2da@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13546"; mail-complaints-to="usenet@ciao.gmane.io" Cc: wkirschbaum@gmail.com, casouri@gmail.com, 62333@debbugs.gnu.org, dgutov@yandex.ru To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 28 13:31: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 1ph7Xn-0003Ht-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Mar 2023 13:31:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ph7Xf-0004i6-LX; Tue, 28 Mar 2023 07:31:07 -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 1ph7Xb-0004hU-1X for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 07:31: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 1ph7Xa-0002l1-P3 for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 07:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ph7Xa-000614-BJ for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 07:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Mar 2023 11:31: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.168000304020741 (code B ref 62333); Tue, 28 Mar 2023 11:31:02 +0000 Original-Received: (at 62333) by debbugs.gnu.org; 28 Mar 2023 11:30:40 +0000 Original-Received: from localhost ([127.0.0.1]:49065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ph7XE-0005Nf-DB for submit@debbugs.gnu.org; Tue, 28 Mar 2023 07:30:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ph7XA-00052D-JE for 62333@debbugs.gnu.org; Tue, 28 Mar 2023 07:30:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ph7X5-0002fN-4n; Tue, 28 Mar 2023 07:30:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yDDBVJy1MHRyS+Kb1QPeSS/AdvxUyThdHk1CYr0PvW8=; b=lgnz6zUSeG7C ry1vprwZwCT6aq38zrbFgfaf0syGtx6DWCXu7oymV4L1GOyVZf3yMdVwwqH8jbaz6t42RNUnAdPh9 D9/QcX+ubc53nDseLsySkn5YlQzmGOsIWkbizVgAC8jxKobZRWvWJCITHdYyAt1ItqYZWLnxgRpJN 1fBPRv7cHKMNAQ1KC5WYaBK2AAABLnBBc3z9EKfWCZMRDNZTHGC5gyVQ6uGic3o2YdIM2/fZGHYLW 7ITcStH8OazWjZQHp774Ao127PIkc2QxC5a/H5sBEQEPMsgGRATHZ3yJZoyPFIKKDA0Vpxa8hSNPJ YKwWPa8pfUzIv6NsQRDAMA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ph7X4-0004yr-14; Tue, 28 Mar 2023 07:30:30 -0400 In-Reply-To: <728618716b5bdf2ef2da@heytings.org> (message from Gregory Heytings on Mon, 27 Mar 2023 20:05:07 +0000) 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:258795 Archived-At: > Date: Mon, 27 Mar 2023 20:05:07 +0000 > From: Gregory Heytings > cc: dgutov@yandex.ru, wkirschbaum@gmail.com, casouri@gmail.com, > 62333@debbugs.gnu.org > > > Labeled narrowing cannot solve this because it does nothing to alleviate > > the problems with user-defined narrowing. So if the user narrows the > > buffer, we cannot do anything to safely widen in the general case, and > > labeled narrowing cannot help us. > > I must be missing something, but I don't understand what you mean. If a > user has narrowed a buffer to a certain region A-B, and if we want to > limit a parser to a certain region C-D, we can do that safely with > > (with-narrowing C D :label 'parser-library BODY) (You mean with-restriction.) > which will work, independently of the A-B narrowing set by the user, and > will reset the narrowing to A-B upon return. It will only work if [C..D] is inside [A..B]. It will not work if a Lisp program wants to widen [A..B], i.e. if [C..D] is larger than [A..B].