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.devel Subject: Re: Tree sitter: allowing access to `ts_tree_get_changed_ranges()' from elisp Date: Sat, 26 Nov 2022 17:32:31 +0200 Message-ID: <83cz99spdc.fsf@gnu.org> References: <87mt8dep1e.fsf@polaris64.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12443"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Simon Pugnet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 16:32:43 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 1oyxAZ-00031b-JN for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 16:32:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyxA0-00061S-8t; Sat, 26 Nov 2022 10:32:08 -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 1oyx9z-00061J-8Z for emacs-devel@gnu.org; Sat, 26 Nov 2022 10:32:07 -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 1oyx9y-0008HP-MQ; Sat, 26 Nov 2022 10:32:06 -0500 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=Tbjg1f4WehXpvupnl9+Cs+nPasAeWOe4QZC33zC3Ve0=; b=emSJp/mokd0n GRc6rh/mfDu8EUkDCatrebVRpgpBnw5HhXFs+mwjW7EsG2xydGw6ADI5Bi8ohEtBDfnPd1kVqLAxZ wPafgkdTVZMGlvfR6lof6ixnBu+co/ff00JFrYh9B/zxRhd7eRsGEIYl2VKnJ5KOdjx3NrWrc41iB xtV+la71A/1EqcwF4yM1e22eKqx/ThIFNwyLFZa6AnVkxbpXpNO1idu8qpS1eqVzu5W13Rddnnk4z LItLa6e/WV/DnpeoVKTliXqellNe5uNG+X36QdyWBAu+OjHrwseMpOsvenMtLbqa+2FYplRFNBEVk rCUi1CJRpSeeK9aoQap3Og==; 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 1oyx9y-0003tb-0F; Sat, 26 Nov 2022 10:32:06 -0500 In-Reply-To: <87mt8dep1e.fsf@polaris64.net> (message from Simon Pugnet on Sat, 26 Nov 2022 15:57:33 +0100) 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:300572 Archived-At: > 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.