From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Pugnet Newsgroups: gmane.emacs.devel Subject: Re: Tree sitter: allowing access to `ts_tree_get_changed_ranges()' from elisp Date: Sat, 26 Nov 2022 16:53:23 +0100 Message-ID: <87ilj1emkh.fsf@polaris64.net> References: <87mt8dep1e.fsf@polaris64.net> <83cz99spdc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19452"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 17:40:44 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oyyEN-0004qt-Jy for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 17:40:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyyDY-0002rd-2P; Sat, 26 Nov 2022 11:39:52 -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 1oyxY0-0002Y1-QY for emacs-devel@gnu.org; Sat, 26 Nov 2022 10:56:56 -0500 Original-Received: from mout-y-209.mailbox.org ([91.198.250.237]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oyxXy-0003vq-Ht; Sat, 26 Nov 2022 10:56:56 -0500 Original-Received: from smtp102.mailbox.org (unknown [91.198.250.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4NKGZ765h4z9sbP; Sat, 26 Nov 2022 16:56:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net; s=MBO0001; t=1669478207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b4O1ex4lZFUYyVoBfnkPMEiAKbbwG+aZa5nlFf8YcAo=; b=Uby1RfaR56o8Ax4txUnrlB6bOWmt4PIK9y8DrLWCenK4KddHJdt5iCNpcdt2NrtLpRkb66 xpJOkyoVzPh9+fTbyLUNMCY2FtDgeceSUnzzRQHb1NYyHrzcw1kkG1Aaz9I18M5EkWrtcC Jcruw4ULjtoAikaNs5P2bwvlwC91haEqiE+CInlZrYHQz7l7nKYO1HZMJf26B/Cg2BaPeW 9XZrj/ttKlejd0CR9E9KzDUZhuBERCM9Gb20O0zQNnhgbWVkCitsTMnGSf7HXOxugQMRlL A2hpsLvyqcolEluyn91yJ6FulynC9NF2O6RKHBtQA0sFiRJ+VHYYdXHzQhfTBQ== In-reply-to: <83cz99spdc.fsf@gnu.org> X-Rspamd-Queue-Id: 4NKGZ765h4z9sbP Received-SPF: pass client-ip=91.198.250.237; envelope-from=simon@polaris64.net; helo=mout-y-209.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 26 Nov 2022 11:39:50 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300574 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Eli Zaretskii writes: >> From: Simon Pugnet >> Date: Sat, 26 Nov 2022 15:57:33 +0100 >> >> I've checked src/treesit.c and I can see that there is a >> `ts_tree_get_changed_ranges()' function, presumably from the >> underlying tree sitter library. However I don't think this is being >> exposed to elisp. Would it be possible to allow this information to >> be >> provided to elisp somehow? > > It's exposed to Lisp via the parser's after-change notifiers. See > treesit-parser-add-notifier. Thank you; yes I can now see that `treesit-parser-add-notifier' should allow me to do what I need to do. Kind regards, -- Simon Pugnet https://www.polaris64.net/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCAAyFiEEO/eF3hYsAMj7Tab9uhNZqCwLPvkFAmOCNz4UHHNpbW9uQHBv bGFyaXM2NC5uZXQACgkQuhNZqCwLPvnNwA/9F99BxnBnX90WtWExUKgOssqY1wFA DCU9OZcUrY6M/7Q3IOYKUwizNqoo353HJgzj9zAre5ur7nhbyqOIzuDArHClJWkf pB5lFnZ04qJX3CX/wx3rngIuzUz++dkj+YxqR7VH6H4e3DaFcF4LbfgaU9QCHabO 9RU0eJg1v4VctC/ZfAuNcIDBy6pUD4uz4M4CaHfgglP+kVqU6ENM1h9gmBbnt3un NzXB6IoWiYp4bg0RKk14awt3edfvj9LT2rsul/bgP9cXnvgeYr+CTM5mjJ40uLxf RdCv71gAQFGZoRM/bgHH3cma0Vg72peknyX+oprnBL649+VzypkiWHDylzDMimmW Kfb026YxabWY2CNSQevqDyyxLhrFAJR2NDMXe2aRM9UwWEfZXx2vPUpICXzq5UED pmRcQVvBB83FQ6uIn6yEHcOM37Ec68Bc9AdW3sizWu23/inPaBKC7NQ28YtImprs 2quXrP+5QRyl0LsuQrmVB0p3DdycsNiuBpA7wqkU1ZQeIbB1kvvGdmdwpubb59pa V7YQb4rQBinN+Tgf0NnPQdtkn4j5zFKgJKn9pn0Z7pK0w7ZImGCYMw+nyWPVeyPP FP1jCj4+K8a+6Cco2ZV+4eO9nwv/mnp/+UrdHxtz5zmjr+cFiGBn09gcled3SWBw O0IH9ksXkk6ZjKY= =9UVf -----END PGP SIGNATURE----- --=-=-=--