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 integration on feature/tree-sitter Date: Fri, 17 Jun 2022 08:23:58 +0300 Message-ID: <83tu8jq2vl.fsf@gnu.org> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <871qvorqvv.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="587"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 07:25:08 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 1o24Tk-000AXH-Fq for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 07:25:08 +0200 Original-Received: from localhost ([::1]:39526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o24Ti-00052N-J3 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 01:25:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o24Si-0004LY-82 for emacs-devel@gnu.org; Fri, 17 Jun 2022 01:24:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o24Sh-0002nZ-Vq; Fri, 17 Jun 2022 01:24:03 -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=UAPXm76OLa4y8Sk6uN/A59t9sulgwbARndOwqlRpMsI=; b=qONmQPovewbz 5LtO7dnGA1gsUu16hdAswvAru6Ao+XJ80MzAh06MT/0uy7a0iYWz07+iz8/19Tl0AaB4xgj5mfofW v41fPhQu0UBnAoPwT9x3MrkLhYbRzaR4+ZV1oI6IwQJjmqsXsLkyDBklsqhi3hX2x6ftu5hoovL1A jeNdhjmxpe6dFMc3G4QTlhCpSz0PBaugpxsA5krEUp4vPSAlmkjl+6Ay2E5lFKGzx6GDO6SDs8k7k VbIzUmvkRLGx1L+f1h7iXc5vu3A0P5n1yslxPLDYgykhyH2S3XizMtJHLErjRxqox8zoPeN+cwwYf 4PKEoV5kG5F04+g5hgnBdA==; Original-Received: from [87.69.77.57] (port=3654 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 1o24Sh-00034J-9X; Fri, 17 Jun 2022 01:24:03 -0400 In-Reply-To: <871qvorqvv.fsf@localhost> (message from Ihor Radchenko on Fri, 17 Jun 2022 10:00:04 +0800) 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" Xref: news.gmane.io gmane.emacs.devel:291266 Archived-At: > From: Ihor Radchenko > Cc: Emacs Devel > Date: Fri, 17 Jun 2022 10:00:04 +0800 > > Would it be possible to expose ts_record_change to Elisp? > > I am asking in the interest of Org mode parser that is also parsing the > buffer AST and tracks buffer modifications. Please tell more about the need. I'm not happy with exposing this to Lisp, and don't understand why the low-level parts of parsing the buffer AST should be written in Lisp in the first place. The tree-sitter branch does this in C for that very reason. We could rename ts_record_change to something more general, of course, and make it available even if Emacs is not compiled with TS, if it can be useful for other needs.