From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: emacs-tree-sitter and Emacs Date: Thu, 02 Apr 2020 18:06:40 -0800 Message-ID: <865zehgw5r.fsf@stephe-leake.org> 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="25963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 03 04:07:20 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 1jKBjr-0006dS-LY for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 04:07:19 +0200 Original-Received: from localhost ([::1]:49304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKBjq-0002gk-ML for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 22:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59860) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKBjM-0002Fj-Gy for emacs-devel@gnu.org; Thu, 02 Apr 2020 22:06:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKBjL-0001Bb-4L for emacs-devel@gnu.org; Thu, 02 Apr 2020 22:06:48 -0400 Original-Received: from gateway24.websitewelcome.com ([192.185.50.93]:48901) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKBjK-00019u-UX for emacs-devel@gnu.org; Thu, 02 Apr 2020 22:06:47 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 85E5DBD5C for ; Thu, 2 Apr 2020 21:06:45 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id KBjJjvIYQAGTXKBjJjIiiZ; Thu, 02 Apr 2020 21:06:45 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding: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=tcm7KGZufcJXxX/bfrYecz+T0GGAFCxKIYAFGUysBjc=; b=O0ysyYUVs2z0FkAYnvVdAVhnV j3nmAqBXn7iNDSh02WJzHZm7B8fbTzn9eRnbbVUqUnZ20aVhNuyq09ZB6ut0DnivBaOAzuiQ08yRm yn3YKpU+7Q2ONEMCga+8yTzhqDil2Myb5qJcDP9nYtMqaAHY0hCuWRmBxsI+F4QchI+igeFT3cT0G a6dZOIfzjJ0yF46qShC33qWZ/vvlJI0ksSmqcr6TMlo3CT+B3kYe0QWh0HO0vaaPSsxCrtSbI58HD fwrGir0RdTAVVjj/UgH2yq0oAtEYzoGvPe9sJClXDkf6BA7vbJm2xgEMTQMEZniZ4pnr0JYD5yQPA 63fpITZiA==; Original-Received: from [76.77.182.20] (port=63747 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jKBjI-002pj0-U8 for emacs-devel@gnu.org; Thu, 02 Apr 2020 20:06:44 -0600 In-Reply-To: <83imihyl42.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Apr 2020 18:15:41 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1jKBjI-002pj0-U8 X-Source-Sender: (Takver4) [76.77.182.20]:63747 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.50.93 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:246295 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. Only because jit-lock-after-change on after-change-functions updates that knowledge, via the fontified text property. But that in turn assumes that the entire buffer has been fontified, which is typically not the case; I rarely scroll thru an entire file. Unless there is some other mechanism that maintains change locations? There is buffer-modified-p, but that's a single binary for the whole buffer. ada-mode has one; it also uses after-change-functions. > When fontification is invoked, it should start from that place. I think you mean "from the point of the first change" which means "from the first point where fontified is nil". But that's not what font-lock does; it starts from the current top of window if that's after the first non-fontified point. -- -- Stephe