From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 12 Jun 2021 11:02:36 -0700 Message-ID: <17a0163ce60.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> References: <83im2lbqmv.fsf@gnu.org> <179f6e4fa40.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <83fsxpbpn9.fsf@gnu.org> <83k0n09tkp.fsf@gnu.org> <837dj09p0e.fsf@gnu.org> <20210611232535.b4dyu3a2yxvdixys@Ergus> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25895"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: AquaMail/1.29.2-1810 (build: 102900008) Cc: acm@muc.de, Ergus , emacs-devel@gnu.org, Eli Zaretskii , rudalics@gmx.at To: Stefan Monnier , Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 12 20:05:37 2021 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 1ls80n-0006YM-4J for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 20:05:37 +0200 Original-Received: from localhost ([::1]:44342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls80m-0000Vz-1k for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 14:05:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls7yA-0008Au-Up for emacs-devel@gnu.org; Sat, 12 Jun 2021 14:02:56 -0400 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]:56928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls7y6-0001p9-7o; Sat, 12 Jun 2021 14:02:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:Date:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6h1jV+X7BeRLnfg1OI2Dha4CW33BZF7D1jB/Cum/QXU=; b=hZJH5UhouAxid4brWfdyXB37qL pz+Y7Gx6bp4O76DEZtYBkBeG7Rtgu5jab3OrgtfsP1h6lEaVzMzNG7b8NzILd+xxi+dPtdFCZNz/I pOfjB376MXvWIgJthmGUSG1i0ST5VNxvzLG+744ZZ8tlxrkFnCnEZL56cXYyz9nfq4XKHsfZSjB71 xghEtvse+ylGmveaI9E0BSRPLcVERtvxylnzVjRi9y5v4aeEaAihs6aTNUkSTcw2YgiIWce23DtAM A95Yh7TswTSBEgK6yJtA2R/+iCNLxnNxL7zI6d3RGujA6aaqca/GYGi1kEIRWxf+HfrKoFCGzVISA YoPtVM4Q==; Original-Received: from 5.sub-174-194-200.myvzw.com ([174.194.200.5]:11598 helo=[100.112.62.55]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.89) (envelope-from ) id 1ls7xv-0005YL-Eg; Sat, 12 Jun 2021 11:02:39 -0700 In-Reply-To: Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:270779 Archived-At: On June 12, 2021 10:25:19 AM Stefan Monnier wrote: >>> Agreed. Maybe a first step would be to get copyright assignments and >>> include the tree sitter module in GNU ELPA? >> If I read some of these mails correctly it seems like that wouldn't be >> possible due to interest from some of the parties involved in the main >> package. I don't know the details on that, though. > > Before we start a parallel effort, we definitely should make every effort > to get copyright assignments for the existing code. Maybe we can't take > the package as-is because some contributors won't accept to sign the > paperwork, but we can probably get paperwork for a significant fraction > of the code. > > That would already help reduce duplicated efforts. > > This is very important, not just to reduce the amount of work, but also > to avoid alienating interested parties. > >> And Eli seems unhappy with what's there. > > That doesn't mean we have to start over from scratch. > >> As for making a little more concrete proposal for how to move forward, >> would this be something like what we want? >> - create/use c or rust bindings > > I think we'd want to link to the C API of tree-sitter. > There's no point going through Rust at this point, AFAICT. > >> - create an elisp-layer for interaction with the parse tree >> - hook fontification and indentation into that elisp-layer > > Sounds about right. > > > Stefan It's very important that the actual parsers be modules, at least optionally. It must be possible to customize and develop on a running Emacs, without a restart. To do that, if we stick with a model where generated parsers are in C, we must unload and reload compiled code. I am convinced we can make the module interface efficient enough for this to work without measurable overhead.