From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mickey Petersen 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: Wed, 08 Feb 2023 08:41:35 +0000 Organization: Mastering Emacs Message-ID: <87357geefk.fsf@masteringemacs.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> <877cwtew8o.fsf@masteringemacs.org> <5F2D3873-1CC2-4820-A0F5-F15BF0DDCEDD@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7611"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e @VERSION@; emacs 30.0.50 Cc: Eli Zaretskii , 61235@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 08 09:43:26 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 1pPg33-0001sa-JE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Feb 2023 09:43:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPg2j-00025w-N1; Wed, 08 Feb 2023 03:43:05 -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 1pPg2h-00025j-4k for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 03:43: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 1pPg2g-0002ov-EA for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 03:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPg2g-0001NR-2c for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 03:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mickey Petersen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Feb 2023 08:43:02 +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.16758457575261 (code B ref 61235); Wed, 08 Feb 2023 08:43:02 +0000 Original-Received: (at 61235) by debbugs.gnu.org; 8 Feb 2023 08:42:37 +0000 Original-Received: from localhost ([127.0.0.1]:54763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPg2H-0001Mn-4w for submit@debbugs.gnu.org; Wed, 08 Feb 2023 03:42:37 -0500 Original-Received: from mail-db8eur05on2105.outbound.protection.outlook.com ([40.107.20.105]:21600 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPg2E-0001MU-Q1 for 61235@debbugs.gnu.org; Wed, 08 Feb 2023 03:42:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EFNFWKaLCGlTeTypRJcS9AmAHpIgDEVgsA91g2m07CbkwpCJN08kqTW9HzH8UF/pFE8/QQqo7Wp9SZgfyASZWFNpyJfCXGihSCDDKR21+u65cWH4Mkh9Gm6Bb3yD92suBUewJAOoEO793h9Q/iGfHUQx0eeQMz6CUuA9eYg9uIe9KUkUhwjt7r/12POrg2kMHt/J/zuDlWzxev+MaB0C1mPxP5iqPTnsqSvei4vHD+GD/QgyWwX/PXjkpH8nL6N5S7CDgn5Pwi62vcq2Bh3JsFRPH9AA+lHWRPqlCOxxsPQVSKt8FNSLaD8EQgAyDzCcUsBcMV6AKOqqI6D94acBwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wbZZiw1L/isv6Qg6O9mzkHRWd6I1MiI5gurTMtEJz4I=; b=X5ygfxjX7/lOANSKgktMPvdNQyNABwpHkvepVx9gp1fRrEv2G8vxpaba6wKOlvs9LfuiK5hz46XYC1fAlMJvVmSeXbNwv9LKbil8iT6pmu+po/f8EtudZX7IkOaOrfw6TKc1zQ0PnjKnhgFxZPeDXmDHJUFAan7E7D93650aiUrixS0XMLrDa0o9AjXT/ojcjewb2QnBoWO4KRYnLOErsKalxhLPFjQxrvjHbXJzLNZBjjOIqBWyfn/vDycbvBkkc+LfMAfNCIJqd8dxjTo4Vs3iP1zOi8ONPI6zkYxANZk1oNhyIFtNs6JH76HO3FkLGJF5HApb3KtlSWRbxZTWbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 178.79.136.144) smtp.rcpttodomain=debbugs.gnu.org smtp.mailfrom=masteringemacs.org; dmarc=pass (p=none sp=none pct=100) action=none header.from=masteringemacs.org; dkim=pass (signature was verified) header.d=masteringemacs.org; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semantical.onmicrosoft.com; s=selector1-semantical-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wbZZiw1L/isv6Qg6O9mzkHRWd6I1MiI5gurTMtEJz4I=; b=s9IZOjX0Gf50QImDorZL7QfuZH3Y2CEQSrxXn7pGQEamKUwyZxU9+/rMLudrphSqwmgu6d+3b/xXGl1vQsOpBZzX5KC5plA1WdGOVi7YxIsYgBYEfJ4466XgCxRgH7mOG61oGgplfvyHi2xQZ85ncplUyLD+JYMOIr5/WQt0MOg= Original-Received: from LO2P123CA0076.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::9) by LO6P265MB6735.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:307::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 08:42:28 +0000 Original-Received: from CWLGBR01FT041.eop-gbr01.prod.protection.outlook.com (2603:10a6:600:138:cafe::ab) by LO2P123CA0076.outlook.office365.com (2603:10a6:600:138::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 08:42:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 178.79.136.144) smtp.mailfrom=masteringemacs.org; dkim=pass (signature was verified) header.d=masteringemacs.org;dmarc=pass action=none header.from=masteringemacs.org; Received-SPF: Pass (protection.outlook.com: domain of masteringemacs.org designates 178.79.136.144 as permitted sender) receiver=protection.outlook.com; client-ip=178.79.136.144; helo=semantical.co.uk; pr=C Original-Received: from semantical.co.uk (178.79.136.144) by CWLGBR01FT041.mail.protection.outlook.com (10.152.40.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 08:42:26 +0000 Original-Received: by semantical.co.uk (Postfix, from userid 5001) id 956DC114003; Wed, 8 Feb 2023 08:42:26 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=masteringemacs.org; s=masteringemacs.org; t=1675845746; bh=wbZZiw1L/isv6Qg6O9mzkHRWd6I1MiI5gurTMtEJz4I=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=k2wGsrB72hne61xvfXP1HzVzNoiF2eDOxXmSU7jbtFqc3fudpWiafp2WvNAEf8nXR TWVLWwdRYwP21JxzTUHEQOmHQSgOgBxwpQnFIJdEKzcMmQQ44iuLm7Jbo2SavQodja tqQZ5TnGwBtrAvIltsJVrHHNZy5CmX0zmUMHQtYE= In-reply-to: <5F2D3873-1CC2-4820-A0F5-F15BF0DDCEDD@gmail.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CWLGBR01FT041:EE_|LO6P265MB6735:EE_ X-MS-Office365-Filtering-Correlation-Id: 86c1e1e0-89c5-4f5d-efa7-08db09b0682d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A9tDgvgjEm1BDuc61Ikb6oDoANlGhthodXHnmc16zBZfqQlxcjpKVJxDLUqMwW7J71iuLPKfx0lbaacnSq1MjHc41YC92XpAzKimaQQfFo+hYI3Fc0trIyl2CsPt5qdlblSBXFBaa2SdusXYkkpbvGROLfTumNZoCDz3D9VDsU1Mq4HF85kFNW5jc0O0s4NA8gEVxvWnCATCxfnIt9bp6KIGvYTlET+YnoykLWZie3JefjhoEl7Fx3kmSadTaSl3wzIS8Z+egetueqyuEeSojNqWyHGmluhvjpIopi02CwiFSlr/ZvBp3XB/G9iCwpHBjaBhxUsmrgh8sv4KpD0SELqkIF4aE2CAFL+HrEV/g3nYd5f8XrK0IMktVvCSqgRi5KU/1pqbmzkTRc9BCYKEEbpLrDKXlgpb5lJVPO9mXKGpm0E6XUt4lvcQsSU1JTKZxvP4/kaNdrw6Dia1XzwLCc/NNglS2/g8xFFAvOwtCtyCVj9JAXhXQW9lljA+hO9OPf52n07C30IUEiEpyCZbWfuA92ha1gwwhxF+SqXKYO7xHmv4333UpdjjSlGpwmXaGcyhPTfseXvkBebnRPJjIqzEXstN83DA97DGZpSxh+VddcvS5Z9k9qkorX8dBNeub+CgM2adrtA450Ff2MyOGOVKtISQWnq06107N4FcrH7w4vVFZE2Wly8quOh+0OkZb6lsaSWr/wWxkkxZvVclQE174454x9D8Z88YEAlo1pQ1fobC7lrk3e3uxLJrb SmwlO3KNqYbQlZT/vNLIHSedmkIW4XO/R3TuEKuFYDHqyvho69tVYBEkgpknNoqY7IM X-Forefront-Antispam-Report: CIP:178.79.136.144; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:semantical.co.uk; PTR:semantical.co.uk; CAT:NONE; SFS:(13230025)(376002)(346002)(396003)(39830400003)(136003)(451199018)(46966006)(36840700001)(26005)(186003)(53546011)(2906002)(6266002)(6666004)(36756003)(5660300002)(478600001)(356005)(82310400005)(8936002)(41300700001)(40480700001)(6862004)(2616005)(36916002)(47076005)(8676002)(36860700001)(336012)(70586007)(70206006)(4326008)(83380400001)(86362001)(7636003)(316002)(42186006)(7596003)(38230200001)(81973001)(43043002)(79816003)(14776008); DIR:OUT; SFP:1102; X-OriginatorOrg: masteringemacs.org X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 08:42:26.9323 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 86c1e1e0-89c5-4f5d-efa7-08db09b0682d X-MS-Exchange-CrossTenant-Id: a4e27e3d-bab0-45e8-8942-e64cf9fbd34f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a4e27e3d-bab0-45e8-8942-e64cf9fbd34f; Ip=[178.79.136.144]; Helo=[semantical.co.uk] X-MS-Exchange-CrossTenant-AuthSource: CWLGBR01FT041.eop-gbr01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO6P265MB6735 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:255110 Archived-At: Yuan Fu writes: >> On Feb 7, 2023, at 12:03 AM, Mickey Petersen = wrote: >> >> >> Yuan Fu writes: >> >>>> On Feb 6, 2023, at 7:21 AM, Eli Zaretskii wrote: >>>> >>>>> From: Mickey Petersen >>>>> Cc: casouri@gmail.com, 61235@debbugs.gnu.org >>>>> Date: Mon, 06 Feb 2023 14:08:46 +0000 >>>>> >>>>> All I want is a way for treesit-node-check to tell me if the node >>>>> belongs to a dead or alive parser. >>>> >>>> That'd be fine by me, but the patch posted by Yuan was a different >>>> one. >>>> >>>> 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=E2=80=99 parser=E2=80=99s status, we= =E2=80=99d also add a >>> function to allow directly checking the status of a parser. >>> >>> Micky, the function I added (and the extension to treesit-node-check) >>> checks that the parser is not deleted AND its buffer is live. That >>> makes the most sense to me, but would it cause any problem for your >>> use case? >> >> Thanks for turning around the features so fast. >> >> I can use `treesit-node-buffer' and `buffer-live-p' to accomplish >> that, so perhaps leaving out that check makes sense? > > I=E2=80=99m hoping to write the function as I described, ie, return t onl= y if > the parser is not deleted and its buffer is live. So I wonder if this > definition of =E2=80=9Clive=E2=80=9D would work for you? Sounds good to me, and I think others will find it useful as well!