From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-tree-sitter and Emacs Date: Fri, 03 Apr 2020 09:37:08 +0300 Message-ID: <837dyxxegb.fsf@gnu.org> References: <83a73tyako.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="113630"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mwd@md5i.com, stephen_leake@stephe-leake.org, mwd@cert.org, Emacs-devel@gnu.org To: =?utf-8?B?7KGw7ISx67mI?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 03 08:37:56 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 1jKFxk-000TMt-1V for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 08:37:56 +0200 Original-Received: from localhost ([::1]:50848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKFxj-0004zz-0w for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 02:37:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32813) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKFxG-0004a0-1k for Emacs-devel@gnu.org; Fri, 03 Apr 2020 02:37:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jKFxC-0001tF-TL; Fri, 03 Apr 2020 02:37:22 -0400 Original-Received: from [176.228.60.248] (port=1621 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jKFxC-0001Kp-7e; Fri, 03 Apr 2020 02:37:22 -0400 In-Reply-To: (message from =?utf-8?B?7KGw7ISx67mI?= on Fri, 3 Apr 2020 04:39:08 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:246304 Archived-At: > From: 조성빈 > Date: Fri, 3 Apr 2020 04:39:08 +0900 > Cc: Michael Welsh Duggan , mwd@md5i.com, > stephen_leake@stephe-leake.org, Emacs-devel@gnu.org > > > Yes, with one correction: ideally, it should be unnecessary to start > > from point-min (which could be a long way away). Most languages > > should do well enough with starting from the beginning of the > > outermost function or class that affects the displayed text. > > AFAIU, determining that starting point is a non-trivial task, and if Emacs wants to present the user an exact representation, the text from point-min is still needed: just a hypothetical case would be having a file with all code commented out. The decision whether there's a need to go to the beginning should be made by the parser, not by the infrastructure that invokes it. If the parser needs access to earlier parts of the buffer, it should do that; but the fontification infrastructure should not force it to do that.