From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: emacs-tree-sitter and Emacs Date: Thu, 02 Apr 2020 11:24:33 -0400 Message-ID: References: <83eeta3sa0.fsf@gnu.org> <86369ojbig.fsf@stephe-leake.org> <83lfnfz6jr.fsf@gnu.org> <864ku3htmb.fsf@stephe-leake.org> <83v9mix9vk.fsf@gnu.org> <87pncq55f8.fsf@md5i.com> <83imihyl42.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39862"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Welsh Duggan , stephen_leake@stephe-leake.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 02 17:25:29 2020 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 1jK1ii-000AAt-Ea for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 17:25:28 +0200 Original-Received: from localhost ([::1]:43336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK1ih-0005sS-Fw for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 11:25:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK1i0-0004sU-4V for emacs-devel@gnu.org; Thu, 02 Apr 2020 11:24:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK1hy-0006ny-6A for emacs-devel@gnu.org; Thu, 02 Apr 2020 11:24:43 -0400 Original-Received: from taper.sei.cmu.edu ([147.72.252.16]:43060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jK1hv-0006Vy-FJ; Thu, 02 Apr 2020 11:24:39 -0400 Original-Received: from delp.sei.cmu.edu (delp.sei.cmu.edu [10.64.21.31]) by taper.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 032FOYUd029471; Thu, 2 Apr 2020 11:24:34 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 taper.sei.cmu.edu 032FOYUd029471 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cert.org; s=yc2bmwvrj62m; t=1585841074; bh=R+g8H55oHOUXotrVFXk3XHicOB/HpXa/Sxq6VPysqX8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CI0BfNZwyTMFqYdAz9la7AwSPdqTYqgtiRoW8W8/LU5OFcFBASD9NjsLmGU559asp /ZAlb32wCroMFghhjSAEqehr5gCqg6pHl5jXI2vtTZEzMtkFCtHLRo780qhGi5vHiu flroICNorbTbCsCQLiZjFQwcbB4MYjCP4uUjt+QU= Original-Received: from lx-birch.ad.sei.cmu.edu (lx-birch.ad.sei.cmu.edu [10.64.53.120]) by delp.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 032FOXF2002706; Thu, 2 Apr 2020 11:24:33 -0400 Original-Received: from lx-birch.ad.sei.cmu.edu (localhost [127.0.0.1]) by lx-birch.ad.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 032FOX6m018747; Thu, 2 Apr 2020 11:24:33 -0400 Original-Received: (from mwd@localhost) by lx-birch.ad.sei.cmu.edu (8.14.7/8.14.7) id 032FOXRB018744; Thu, 2 Apr 2020 11:24:33 -0400 X-Authentication-Warning: lx-birch.ad.sei.cmu.edu: mwd set sender to mwd@cert.org using -f In-Reply-To: <83imihyl42.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 2 Apr 2020 18:15:41 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 147.72.252.16 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:246268 Archived-At: Eli Zaretskii writes: >> From: Michael Welsh Duggan >> Cc: Stephen Leake , emacs-devel@gnu.org >> Date: Thu, 02 Apr 2020 10:27:23 -0400 >> >> > But why do you need that initial full parse in the first place? Is >> > parsing parts of the buffer so much harder? >> >> I would think that you at least need to parse everything displayed and >> everything before what is displayed. (You need all prior context. What >> if someone opened a comment on line 1 and hasn't closed it, for >> example?) > > Each buffer always knows which part of it remains unchanged. When > fontification is invoked, it should start from that place. So there's > no need to parse _all_ prior context. Why not? Won't it miss that hypothetical opening comment delimiter, for example? And, if it's because we've already parsed it before, isn't that what we're talking about? The initial parse? Because after that, of course only changes are sent to the parser. -- Michael Welsh Duggan (mwd@cert.org)