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#61235: 30.0.50; tree-sit: `treesit-node-check' lacks a way to tell if a node belongs to a deleted parser Date: Tue, 07 Feb 2023 05:31:11 +0200 Message-ID: <83ilgep2ww.fsf@gnu.org> References: <83edr3q8ez.fsf@gnu.org> <87o7q7dl4o.fsf@masteringemacs.org> <83a61rq6ck.fsf@gnu.org> <87k00uexdt.fsf@masteringemacs.org> <835yceris5.fsf@gnu.org> <87fsbievbi.fsf@masteringemacs.org> <83y1paq0pd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24425"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61235@debbugs.gnu.org, mickey@masteringemacs.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 07 04:32:21 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 1pPEiT-00068i-BF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Feb 2023 04:32:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPEiB-0002Tf-Rp; Mon, 06 Feb 2023 22:32:03 -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 1pPEiA-0002TR-Ef for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 22:32:02 -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 1pPEi9-0005B0-NV for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 22:32:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPEi9-0007Hk-JT for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 22:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2023 03:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61235 X-GNU-PR-Package: emacs Original-Received: via spool by 61235-submit@debbugs.gnu.org id=B61235.167574066427933 (code B ref 61235); Tue, 07 Feb 2023 03:32:01 +0000 Original-Received: (at 61235) by debbugs.gnu.org; 7 Feb 2023 03:31:04 +0000 Original-Received: from localhost ([127.0.0.1]:50568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPEhD-0007GT-Mk for submit@debbugs.gnu.org; Mon, 06 Feb 2023 22:31:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPEhC-0007Ft-Oo for 61235@debbugs.gnu.org; Mon, 06 Feb 2023 22:31:03 -0500 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 1pPEh7-00054S-Cn; Mon, 06 Feb 2023 22:30:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0eQuJkKVvkLI/IwNDtWHJtKHnGR1iHq5ZF0ENmO9atg=; b=noERorO5LPMWciiowdnC vQzHh/IKjdqzPsMtjj3ySCyWIu3C5NfubvOUUnjn4qCwmRA+CZGbjnl7+iUj47EGTLtH/r2aAiH7l n829B8HgA36ZziMqp5sGp0+foI8Tb6PNZt9gXCtFg5ZC8tMd9+FvFlWqj8Q7xSzGaQXo22CduzsCQ MulUDo+M62BrMvqOTc/mBbsPT8BkCTQ/A2zt4pCkk14xYmVEEc3IWDLZTxhT8vz8ZXSzeSCbE8V5e rf2jvAHhgY4yaRTJmsANFnNoyaoqCH8fu+Kzn0nbkIRD5a23gKeVFUIkpF3peg4/UVjON09J0P4ub NZiFkDWqa1D3qQ==; 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 1pPEh6-0003WK-Ry; Mon, 06 Feb 2023 22:30:57 -0500 In-Reply-To: (message from Yuan Fu on Mon, 6 Feb 2023 19:00:30 -0800) 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:255017 Archived-At: > From: Yuan Fu > Date: Mon, 6 Feb 2023 19:00:30 -0800 > Cc: Mickey Petersen , > 61235@debbugs.gnu.org > > > Yuan, any reason not to extend treesit-node-check instead? > > I did extend treesit-node-check in the patch. But I also added a function treesit-parser-live-p, which makes the same check but directly on a parser. It just made sense to me that if we let treesit-node-check check the nodes’ parser’s status, we’d also add a function to allow directly checking the status of a parser. That additional function would signal an error in the case discussed here, so I'm not sure we should add it in that shape, or at all. Why isn't treesit-node-check enough?