From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-tree-sitter and Emacs Date: Thu, 02 Apr 2020 15:48:03 -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> <83d08pyc8f.fsf@gnu.org> <83a73tyako.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="83158"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mwd@md5i.com, stephen_leake@stephe-leake.org, Michael Welsh Duggan , 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 21:48:41 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 1jK5pQ-000LWh-PO for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 21:48:40 +0200 Original-Received: from localhost ([::1]:46726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK5pP-0007bY-SY for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 15:48:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38996) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK5ow-00079w-5K for emacs-devel@gnu.org; Thu, 02 Apr 2020 15:48:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK5ov-0006Dp-1m for emacs-devel@gnu.org; Thu, 02 Apr 2020 15:48:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64222) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jK5ot-0006Co-Nl; Thu, 02 Apr 2020 15:48:07 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9CFEF44FBC6; Thu, 2 Apr 2020 15:48:06 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1B57E44FBC3; Thu, 2 Apr 2020 15:48:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1585856885; bh=Cgwn0sqpcErDDCyv+Cs/EDma4GAldAsRf9k2T97JI3o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OzwYsSjLYSWfQ9pV/Iw8BkOPtbtqBoD6n5eRhG5E0+5xMdNK4yc7CrWyHP54Ijf0E SwCzdxismct3He1mcIg+5xhX45ZyHpC8LkIJb/SfNzO+phNt74WssDSOSJu7g9VD7d BXnGuWb3Cg/ZAW4GODiNC2lRUlqCmnkyb/RMpBjzySZIulLs9nBAHKO9mRhRWEKzmD BQlfktuwrv1JJFZAIIdNDG5GYCMALKzqF3vffbRNo00pHeWddOaLme+Z4oDsaYZedn 6cSY4OxWdpmC6KLec385ahhJMc+NQBqhsQP5i4ZbMDOaDG/eh0gm9YKYKqaX1L3QxP Byu9LK0caTvPg== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C57121206E3; Thu, 2 Apr 2020 15:48:04 -0400 (EDT) In-Reply-To: <83a73tyako.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Apr 2020 22:03:19 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:246291 Archived-At: > outermost function or class that affects the displayed text. > IOW, start from window-start, then go back until you find the top-level > syntactic construct; then parse from there. I'm looking forward to your proof-of-concept implementation of "go back until you find the top-level syntactic construct". In the mean time, I'll be happy to wait the 0.2s tree-sitter takes for the initial full parse. Stefan PS: AFAIK, "find the top-level syntactic construct" is a big part of what CC-mode works so hard on. It's *hard* to do if you want it to work reliably (like users expect nowadays).