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: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Mon, 30 Mar 2020 13:14:02 -0400 Message-ID: <2E218879-0F24-4A20-B210-263C8D0BEEA4@gmail.com> References: <83o8sf3r7i.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_89CAF04E-69CA-47C1-90D9-3E2A76A1B990" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="102325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, Andrea Corallo To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 30 19:16:24 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 1jIy1Q-000QWS-1r for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 19:16:24 +0200 Original-Received: from localhost ([::1]:53520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIy1P-0007NG-2h for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 13:16:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58684) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIxzE-0004E0-Mc for emacs-devel@gnu.org; Mon, 30 Mar 2020 13:14:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIxzC-0001ID-He for emacs-devel@gnu.org; Mon, 30 Mar 2020 13:14:08 -0400 Original-Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:44250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIxzB-0001Fj-0k; Mon, 30 Mar 2020 13:14:05 -0400 Original-Received: by mail-qk1-x735.google.com with SMTP id j4so19786036qkc.11; Mon, 30 Mar 2020 10:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=kNaSImh5y8j2DT3NRiPOE1fUiOC3XJBu17f7GAYYHk8=; b=FIdFUGs0I7e+BTBwZeE161cvT3bwgbs2qqIKahnLQWQ/fsIvTqW29aLKpiWwuOxo6r 6dLp1v95WCc/+oPgQImW0MOTN8p4mhKDuJ7x1odxBniifIbU+NR+MJD5sSiwSsatlrR+ O4PN2bJBQypt6z7+CLpDNqUO4nafyDhKSx6aJ3R/wKJSFIvlvPdQDuHairUwR5KmaPUf eiwPtFIiqNIZRytv6aa40gLmLoEQ7jQ1mzsCnlZgY8aFDFGA8LU7xXTiz+eZ/2W2+/fQ q6kz5g2BxtYOARAd8SHu1OP7Nh+YKx+DERi1YcDK0S6PURf46gOriq0qIRIhAefP5npN wcTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=kNaSImh5y8j2DT3NRiPOE1fUiOC3XJBu17f7GAYYHk8=; b=JKDXhE1mHkvSJGE6ueoRv62y4oLnij1XFOxZHruFFYvvyMGwEyWzhhqUO2zmhUvptU c7+anH6D3rFFeBKrOJpq+UHxcBCHOmBtrFQ8nw+EsWx3UF+XQjloyn/Vl8yVSQtA4IC0 zpHIPG5LALAmckbgouH3F6qm+X1Kxe+hphDMXyoiYQZOX/Me4vkIY6+nz7kCRFITSQMz n81eGJzR4qN9ax0c699aMuANsPghWMmFqiy4UOb9Vmhy1Q5lNWS94jVWUHA+7A5DQU2N kKWe7DDtaZxR87ZVOZsHI9W1fJs9s2qk995yXImtA1T+pIjZo8149qGs/gN5KKK4zsVm FzqA== X-Gm-Message-State: ANhLgQ22TRd55vs1DfddA8wx51Pyg7CK3NIGZ0h2bLlhlcqIQMUp8oM5 8DVLwJziQ22BmOjFNV4TTdg= X-Google-Smtp-Source: ADFU+vuqk53y0VRoTfl9vDSl9T/OxBAXYgeO42SxgL/LmUcCXiLCzfv8/5aK+lov7OJuQoU4+YMg6g== X-Received: by 2002:a37:a755:: with SMTP id q82mr1069709qke.390.1585588444420; Mon, 30 Mar 2020 10:14:04 -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 i186sm11053658qke.5.2020.03.30.10.14.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2020 10:14:03 -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::735 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:246037 Archived-At: --Apple-Mail=_89CAF04E-69CA-47C1-90D9-3E2A76A1B990 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 30, 2020, at 11:06 AM, Stefan Monnier = wrote: >=20 > If they needed to be informed of the change but > `inhibit-modification-hooks` prevented it, it's a bug. > Please report it. >=20 Do you mean it=E2=80=99s a bug in eglot/lsp-mode or it=E2=80=99s a bug = in inhibit-modification-hooks (or the code who set it to t)? > Why not simply pass to tree-sitter the chunk that jit-lock is about to > fontify? Incremental parsing seems to be the preferred way to use = tree-sitter=E2=80=94maintaining a syntax tree on the fly and later query = for information from it. Yuan= --Apple-Mail=_89CAF04E-69CA-47C1-90D9-3E2A76A1B990 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On = Mar 30, 2020, at 11:06 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

If they = needed to be informed of the change but
`inhibit-modification-hooks` prevented it, it's a = bug.
Please report it.


Do you mean it=E2=80=99s a bug in = eglot/lsp-mode or it=E2=80=99s a bug in inhibit-modification-hooks (or = the code who set it to t)?


Why not simply pass to tree-sitter the chunk that jit-lock is = about to
fontify?

Incremental parsing seems to = be the preferred way to use tree-sitter=E2=80=94maintaining a syntax = tree on the fly and later query for information from = it.

Yuan
= --Apple-Mail=_89CAF04E-69CA-47C1-90D9-3E2A76A1B990--