From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Ergus <spacibba@aol.com>
Newsgroups: gmane.emacs.devel
Subject: Re: cc-mode fontification feels random
Date: Sat, 12 Jun 2021 20:39:44 +0200
Message-ID: <20210612183944.56pvknmhdjotfzs5@Ergus>
References: <f1d3738b-b35d-b585-a596-147445784fd6@dancol.org>
 <jwvr1h8z2su.fsf-monnier+emacs@gnu.org> <837dj09p0e.fsf@gnu.org>
 <jwvbl8cyy5o.fsf-monnier+emacs@gnu.org>
 <20210611232535.b4dyu3a2yxvdixys@Ergus>
 <m1k0mz1wxr.fsf@Frende-MacBook.lan>
 <jwvzgvvuryv.fsf-monnier+emacs@gnu.org>
 <m1tum33wlp.fsf@Frende-MacBook.lan>
 <jwvmtrvt341.fsf-monnier+emacs@gnu.org>
 <17a0163ce60.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org>
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="26888"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
 Theodor Thornhill <theo@thornhill.no>, Eli Zaretskii <eliz@gnu.org>,
 acm@muc.de, rudalics@gmx.at, emacs-devel@gnu.org
To: Daniel Colascione <dancol@dancol.org>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 12 20:41:10 2021
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1ls8ZC-0006nC-22
	for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 20:41:10 +0200
Original-Received: from localhost ([::1]:49110 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1ls8ZA-0005dv-CO
	for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 14:41:08 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46618)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spacibba@aol.com>) id 1ls8Y1-0004pK-8S
 for emacs-devel@gnu.org; Sat, 12 Jun 2021 14:39:57 -0400
Original-Received: from sonic304-9.consmr.mail.bf2.yahoo.com ([74.6.128.32]:37861)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spacibba@aol.com>) id 1ls8Xy-00086V-IF
 for emacs-devel@gnu.org; Sat, 12 Jun 2021 14:39:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1623523191; bh=5hXKuUwnAVFT3m0AhFE5Gx9uoLFelu3Qo3f2242fGfA=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To;
 b=EEa0KZY2o+cYaf+0d1cm/qghsTQiBVfe18c8CgTHfApDQqlYdyMea0fcGeiNvIjYBOODFnatKwAoRCbdOhd882VYKSAn7kzCQks77BAemjF44fwxalcbYa7VRjzwetmzPG2504qm5usWPHiOSGI6lKNtgC42vklgJrwE0yLNSitoPNMCd0vhJs/CXPz1JzwfZxqKvaTjnlkO8jkJ9Z6oLMYj8jnXCPjrSxIqk2YllZ04JEaDywj2zdR9DiqbtyZKEmFmmk3FpJZDYiE7rYJldmXCg8CqoaF84mQ+ArdpGW9E/fzg6Dq6qeUNMPmljIR3RQWtd0vn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J7vIoFMKeRQGrtjv4yeXWe1lXxsvJZh_LM8PXkmnDm24zF.qvOuy6vDQcErbn
 G70Rv4id7QVC9aA3AE_krsiFTvcx7wtANKDek.Id6S4QlDx2K6QXMs0szmL.umEbtb1Jkx0ZzU6I
 H8rkcYMkebTDWTWUrp.McMFjLNpAEmPXwImjGKjWFXWoEFMSOINijam7I7UiFyB4.EYXNDix_tsn
 EVrkH0xOBRlzH6kvCcUJSQYAbEZvCjpfo0YHrotvTk4zGkBtdgjDGD5fBG_3NPbj9dgj2qArTaE2
 C4BwQ9ZcHcKWRi.T.JyRTrhL12lL1pmSXrgIeVTuSf 
X-Sonic-MF: <spacibba@aol.com>
Original-Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic304.consmr.mail.bf2.yahoo.com with HTTP; Sat, 12 Jun 2021 18:39:51 +0000
Original-Received: by kubenode551.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP
 Server) with ESMTPA ID 85a988c4f5fd16f27a999e722b2998c7; 
 Sat, 12 Jun 2021 18:39:49 +0000 (UTC)
Content-Disposition: inline
In-Reply-To: <17a0163ce60.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org>
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.128.32; envelope-from=spacibba@aol.com;
 helo=sonic304-9.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." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:270780
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/270780>

On Sat, Jun 12, 2021 at 11:02:36AM -0700, Daniel Colascione wrote:
>
>
>On June 12, 2021 10:25:19 AM Stefan Monnier <monnier@iro.umontreal.ca> 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.
>
Yes of course. Once we have the internal infrastructure the parsers
should be modules that autocompile during the installation (like
vterm). 

If we make a simple infrastructure, those modules won't even require any
lisp code, just some instructions to download and compile the shared
object somewhere with a proper name?