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: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Wed, 01 Apr 2020 18:29:18 -0400 Message-ID: References: <2E218879-0F24-4A20-B210-263C8D0BEEA4@gmail.com> <838sjh2red.fsf@gnu.org> <83369o3bvb.fsf@gnu.org> <83imik1qbq.fsf@gnu.org> <835zek1kpv.fsf@gnu.org> <83v9mkz5oo.fsf@gnu.org> <83pncsym6l.fsf@gnu.org> <4a9d6bb2-458d-89b0-5389-d1f883ef24a1@yandex.ru> <74f34b72-725d-2390-faea-c61daad43350@yandex.ru> <83eet7z4if.fsf@gnu.org> <838sjfyz6k.fsf@gnu.org> <7599f566-ab1d-0b79-063e-673b7fc39c8a@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29921"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , akrl@sdf.org, casouri@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 02 00:30:01 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 1jJls1-0007fU-Hh for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Apr 2020 00:30:01 +0200 Original-Received: from localhost ([::1]:38170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJls0-0003NB-G6 for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Apr 2020 18:30:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54498) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJlrW-0002xH-8k for emacs-devel@gnu.org; Wed, 01 Apr 2020 18:29:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJlrU-0003Nb-Jv for emacs-devel@gnu.org; Wed, 01 Apr 2020 18:29:29 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19753) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJlrS-0003IQ-Qw; Wed, 01 Apr 2020 18:29:26 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A518D814A1; Wed, 1 Apr 2020 18:29:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CF3D980C65; Wed, 1 Apr 2020 18:29:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1585780159; bh=iwzTZH/RS4oZNbvyhJ49nJt3lnZQ073ocgZpcj7xYMs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eLhXbfMNBAiURJMet94vqb6YfQjztUz5hWpwR6PmLz/bUgnGfBxUEtxGO9i3hEuqh 21ndkGHL8w1bqDNHi4SvPg6npcKZKt30+eSDXNDSUytdPCSlKwNWoSnbs/CDvY4y5f aLMPNLUoYvIb68dA6InTv0b4DnKFS1TQ3xYBuh6K+esQULPcpsc0JEHj7pupqMu1iH H1XK+2JUzDI2utbrrYexW+PjCTX6GJfo/OUAh4eJMClmRjSL7SVzmX5C846jHKP9vq lUqGsHho3xV1WKBynI8nq7rv6OtWpUjuTl+oH52aYjbZzlDdEoj36q43i1vWF308Mi uDHZGVReg9aVw== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 77C331206B5; Wed, 1 Apr 2020 18:29:19 -0400 (EDT) In-Reply-To: <7599f566-ab1d-0b79-063e-673b7fc39c8a@yandex.ru> (Dmitry Gutov's message of "Thu, 2 Apr 2020 00:48:20 +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:246225 Archived-At: > AFAIU CC Mode could actually eliminate it, but that would require > a significant rework of its internals. My experiments to make CC-mode use syntax-propertize-function suggest that it wouldn't require too much work, actually. For an outsider, it's difficult because it's hard to understand all the invariants/assumptions in the current design, but if Alan and I were to work together on it, it would be pretty easy. So far Alan has been opposed and there are several good reasons for that: - it's extra work. - it will inevitably introduce bugs. - while it will most likely be faster when opening the file, it will likely be slower in other cases (e.g. when modifying the buffer near point-min in one window while having point-max displayed in another). - syntax-propertize was introduced in Emacs-24 so it would require either dropping CC-mode's support for earlier Emacsen, or adding some compatibility layer (I think this compatibility layer would be easy to write but would likely not cover all cases). > I'm not saying that nobody should try to explore how to decrease the delay, > and what tradeoffs come with that. But for now, I think, we should encourage > our kind volunteers to just implement integration the way TreeSitter's > authors expect it. And try, on our side, to provide the best tools for > it. Then we can see how well it does or doesn't work, and what are the > biggest annoyances that the users have with it. +1 Stefan