From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: emacs-tree-sitter and Emacs Date: Thu, 2 Apr 2020 13:18:51 -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> <83h7y1yikx.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56889"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mwd@md5i.com, Eli Zaretskii , stephen_leake@stephe-leake.org, emacs-devel@gnu.org To: Michael Welsh Duggan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 02 19:21:36 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 1jK3X4-000Ei9-TI for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 19:21:34 +0200 Original-Received: from localhost ([::1]:45116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK3X4-0003io-00 for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 13:21:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45326) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK3UW-0001QK-RC for emacs-devel@gnu.org; Thu, 02 Apr 2020 13:18:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK3UV-0000x5-SN for emacs-devel@gnu.org; Thu, 02 Apr 2020 13:18:56 -0400 Original-Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]:40035) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK3UU-0000o0-8j; Thu, 02 Apr 2020 13:18:54 -0400 Original-Received: by mail-qv1-xf44.google.com with SMTP id bp12so2080731qvb.7; Thu, 02 Apr 2020 10:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wyGRaZ0JlvQFZjl+ZoAzBuFkXoi/pUx+u5HvshgU+5Y=; b=Z1Ix1NWkHfh0qwN65fA1eTOsALDbSCyak1oCNtNhnhrg+OomRww1+CyAfSF4cnGntz hxRCq2MuyZbVSqYB+so86ag+eazcqngR3+XJr4m8qXJT/gChIjydYUr7YLCn4wEL08Pa RR3/68D1hTdIUeE8tBzRYS4M3qhlsofMlW8g9WzPgM9grV75HnSl+liDFng2uYsmYGPf bHrf4+ONEOijnrwL6q6OO1tVnGgHeeFwubZLkt4nSAYx5ZxVZ86wvJBxKworYpStX5Di NXlL3/vGB1NyW3gJ1v2Gykq9a3rG9eo9+AvVxBPH5TMupQWrttLsjV+tdAqaHLXfYjYx SnfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wyGRaZ0JlvQFZjl+ZoAzBuFkXoi/pUx+u5HvshgU+5Y=; b=sKOsVPOuKSR+O7Yfr/nS51TwXof3kOIzdQc0hbKkbKZvNVSudO8oC9PvzW5PvbxjmS JP7d8jAdYloubAgzHk5GvtvBNqXdrGwLyKGYjoCclcjNUQR9z2SlcVkam7QV86RLp35a i3oIaT3DaF9eYznejnNZvCcyPKSwH4YkWczCqjsSZwZypGKWLDfwKQmH5qwhnZmsDgO+ zGN0f/xLb22Ec3siItF4ppVFjnwRRgJojubPGO68hHM4r9fxMQnI+O3Ximwj7nZ5OInP MZp82uhwLGeEw9TM2gPe3Jsy25OPZdOY8z9cSdxo15dJXsvalwrmCA7VYd3/4uHh0mBE D5BA== X-Gm-Message-State: AGi0PuY5v/cLBZ0HtAJZev1cFey8r2MhQMOWRTaMtVwC2+DGGw5PROwH kIC76odMYAAcEJBRghNBjd3snt0LeXDzwT2G X-Google-Smtp-Source: APiQypJdAhjBcO4W4rRyLUgAuWg6XlfVOZzn4IXoaCzE4jyO2fLKpqHsJYcdKWvEzHGhZt/ReaWGrQ== X-Received: by 2002:a05:6214:b0d:: with SMTP id u13mr4276399qvj.109.1585847933482; Thu, 02 Apr 2020 10:18:53 -0700 (PDT) Original-Received: from [192.168.1.5] (c-174-60-229-153.hsd1.pa.comcast.net. [174.60.229.153]) by smtp.gmail.com with ESMTPSA id q44sm4336980qtq.11.2020.04.02.10.18.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 10:18:53 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f44 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:246278 Archived-At: > 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?) I don't, however, see a reason you couldn't defer sending = the > rest until afterward, any more than you would have to if the file were > being typed in, one line at a time. Can we do something similar to fontified text property? I.e., only parse = the first screen full of text when a buffer is opened, and mark the rest = as unparsed with text property. Then when we need to access the parse = tree (for fortification, etc), send all unparsed text before some point = (e.g., last visible char in the window) to the parser. Yuan=