From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 12 Jun 2021 19:54:30 +0200 Message-ID: <20210612175430.rrlyxhynraqqxn5n@Ergus> References: <83k0n09tkp.fsf@gnu.org> <837dj09p0e.fsf@gnu.org> <20210611232535.b4dyu3a2yxvdixys@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24679"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , Eli Zaretskii , dancol@dancol.org, acm@muc.de, rudalics@gmx.at, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 12 19:56:43 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 1ls7sB-0006J5-JK for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 19:56:43 +0200 Original-Received: from localhost ([::1]:37552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls7sA-0003yQ-5h for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 13:56:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls7qI-00029B-1y for emacs-devel@gnu.org; Sat, 12 Jun 2021 13:54:46 -0400 Original-Received: from sonic302-3.consmr.mail.bf2.yahoo.com ([74.6.135.42]:38888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ls7qF-0005jS-8k for emacs-devel@gnu.org; Sat, 12 Jun 2021 13:54:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1623520481; bh=/bTVopk/5aCtD99CCtZxiczQFChXycc8/BCpmrWJcCI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=Ygr/6Fu6b/w9diT2nSuTAVUmwp58imsuQCd/D0XSs2CxtdP8qBU4ET4XN8zIoakPcYT17qRzxsnk+4p8yRjaPy0yOM8pSwVc5IAa6xjFhvu2SoY9cnYSnJu75BGZ50rCvIzI5/Vx9hYbLRniMb2WavzrNgAeKKBnSydMmMEuFfQtI0pAJaGZ/LX+akLOt/sx22mqU48B+PziLiiEC7UymFWdOEXAItUkyz4NRrs2ozZ8uN0Su5hSiIfOaksB/Jv+UYwZWjDe4qcYInSRGHw8tnjXpDvspf18mKiquGFf7/PgEPBgxC6QDyjjuubGUgsu+yqEMstjs9VianDQFbHfkQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1623520481; bh=3P0IxqHxCHr7/DaM9kd7W+VEUAd8FPa9ZldUoWfVWkQ=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=d0JvmKYxcrzxT+xyAEM1xCKYXUA13t9WeysA/OrErU/Rrdw22vcfDVx45XREwodO9TOcrbK2hsltdNPToppiLVbBEeV3Z4UQwmQNhBgEgfg4aR4lSLstB1Nb3zlPsxjx/B4tlb6e40Nsq/vnICFrLyf39nFNydkA0iumC7Yi31wE4glmTxZr/DIWFisW0GTje1yjEOY0QMpMHOThCoGoILNvZamcz93ZtEy15m+cxmjFt0pPcBov6OoTVlrL/sZRWVcSlbMTbG/pCdSQf428mSEVQiL+4X0+npugmDWr2zFKzne5RfVXy/jehRHkHI8JWVNt+36J3MzInBw8b/Y5Sg== X-YMail-OSG: vvXtSW8VM1nGpHK7CarxcjAeCVbl2kBjVP9WhS46Qks181MFlDBGYg7jr5ozcn9 COu9eJh_b7etNvCRNVZd7iSRuJSM2aVJPw9WUHj758zgOaiQ7_qbkVmBxkJgYEWOBvF3VOIj7UVc AJIuiMCvlmRt2Nlx6TBo1GF8oEmsKC1_9WPQajSbLS8P2mu.ccHSXEt1UHKuIUZ4IU2hsd5Z3ay2 u0w2xDtA9FUW1oqbgloNEHid2yR6qjteO1JyP8wcPQdIsr19YgOFviTJlaCwAQF.HjTex96rgmVT wge848omOqahjeRv4iwKIBbiHI4sb1COhQ1Ew.wBv_6iA5jrz0B6grTOOux6TPbemqEWQKEoWwaD XCnX3pUaW1Tc.Fm86t7Ze_iz18JkyM6WiXzLX.pJV1G0hVssus9lJkMLD_L1sdpA7H_AWOUqFeUZ vawxz8QJd9jSCowhK_Zb5KrwtdE2OIz49snPh8C0i6ZKqf1YZVUsB1cssEn86z_rynxhEBjVlpx. 5_kzMyxAe81WoQz1hV.z1gK2ttfsUAk.x2O5G6s3Pz0xXzvsv2dBnGtmEZogmHXVYFb4Vr1sjrMQ SIprdzZLs29hBeG4iidZ1O8PEGqVKFgEBnHUSc7hKalUJ3oxzbgUsWSulX6uk6_bDQiUEHj4RQmF A8WdlrK6U.phD1CFv_swBRd676XD18DWH53cXsHyFBEV22K0mSSFTDu05gnJkrYwl6k7038ThrCf bDLhMC45f.6Z_ZiMCULZ9LRApSfgMCYkPrM2zGbDjt6wroiT4_8ByHKGu_urF0vzDIU92A0Rer9q 430qg0Gru7XT79MZSl66b2srO3WSDx06IftrNd.HPP X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Sat, 12 Jun 2021 17:54:41 +0000 Original-Received: by kubenode517.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9a29ed8c3ad2e4f20e3503916a81cad6; Sat, 12 Jun 2021 17:54:34 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.18368 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.135.42; envelope-from=spacibba@aol.com; helo=sonic302-3.consmr.mail.bf2.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:270778 Archived-At: On Sat, Jun 12, 2021 at 01:25:14PM -0400, 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. > I agree, but it looks like Eli wants a different approach for the calling and a part of the performance issues come from the font-lock and Lisp hooks and translations forth and back. Something that a package implemented with modules still do at some level. Will you write to the authors on GH? There are only 17 contributors, so not a crazy number of copyrights to get. What is wondering me is that managing copyright usually is a never ending problem. We are still waiting for use-package to get all of them. And every time we say to gather copyrights then there is a dead time and the topic is forgotten after a while. The package was designed to be an external feature so it may use some "inefficient" solutions (lisp calls from C, substring, font-lock init functions) that could be cleaned and improvement to access internal C code directly; that will require a deeper knowledge of the package and emacs C code to be handled, and I don't know how available will be the developers to do so. >> And Eli seems unhappy with what's there. > >That doesn't mean we have to start over from scratch. > That's true. But the approach implemented with modules or internally in emacs may be very different right? >> 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 > >