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: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Sun, 29 Mar 2020 15:29:41 -0400 Message-ID: References: <83o8sf3r7i.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="84861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Stefan Monnier , Andrea Corallo To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 29 21:30:31 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 1jIddf-000Lym-6L for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Mar 2020 21:30:31 +0200 Original-Received: from localhost ([::1]:40884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIdde-0004bF-7x for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Mar 2020 15:30:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37003) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIdcz-00040r-O3 for emacs-devel@gnu.org; Sun, 29 Mar 2020 15:29:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIdcy-0004vh-RP for emacs-devel@gnu.org; Sun, 29 Mar 2020 15:29:49 -0400 Original-Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:41807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIdcu-0004pa-FK; Sun, 29 Mar 2020 15:29:44 -0400 Original-Received: by mail-qt1-x843.google.com with SMTP id i3so13325897qtv.8; Sun, 29 Mar 2020 12:29:44 -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=FpWmjAEHAhkH2Mw+XRDHUuBk5j9oGHs1SXB5z/+eoxw=; b=XYV5cKAgk4Rjiws2CHpcjfuqxoZVdHvy8yi9j+VgSLkZkCuBBCBj+gBhEFrixUad7n iEncW4QVyg3o1qV0f8hzSjL7MNgFv9fRa9LoEDy2V+WF8dGsfFxk0kk8Xk6telDsJP/W pfl6uUzs/Hd8dCshUUuuaTGelGADfdzfvcBa5cGe35Mjpz4or4b8x7H1JrbV+raH6GNV JV/Pp8lwso777GuDz23P3zB6G61VgvdcJW1RiesGAKf3s1mrymsRAPlO1Xw4QV/Evzvf NHMGNgMact07XuSAJf7Xy7sJpmyriK1geoYAvDaQaCUfswCIIKJ9Wls1r2b67iV5fn9U wGng== 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=FpWmjAEHAhkH2Mw+XRDHUuBk5j9oGHs1SXB5z/+eoxw=; b=HXzMXySenT+lOHYjfx4HAwuQA5aHY/JKguPVBhcv2BQCYNsQIiNoSxVzyK2TGrB/j+ hl/x85oM/vjCYWes1S6G5yBLxMiSqbYbvwE0QWRJ7Yu3eEvQiE4/8RL5+tTjdl8zo/Id NV6+IxQCpGMTQvEyaKhlMDWXAZG94OUCDuv0IpFXLIN/sqGAGVGSB2t8RNmdP01HfARg Or7OYIcO3sbxLFmaVTwqXjsiOjSSXQQJ9JJCneIq02fDLbvDPyLv0/lH2Q8ZH92Ub5To VdFFLfvB+wCBJyar0AURK2yZ1RYFqCV6UmRtVBsDjdTm8iS7bjKPAPgKUZ8Aobr3A2x4 2kfQ== X-Gm-Message-State: ANhLgQ14tt02tocnP8I0tcRa6ZkDqn7qu6yqSbq7GXw2Rimx9qFDzpqs CLhzgkSAlf2bkLTdkqjsOVcSw+DFISgjAe83 X-Google-Smtp-Source: ADFU+vvxsZcB92q3yL01ijgn1EqIRO6up8VlnB1ugUFuPMXqvezU83Jg1QmNpIJUMj42q4ABlGAIqA== X-Received: by 2002:ac8:23af:: with SMTP id q44mr8655649qtq.54.1585510183395; Sun, 29 Mar 2020 12:29:43 -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 y127sm8790977qkb.76.2020.03.29.12.29.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2020 12:29:42 -0700 (PDT) In-Reply-To: <83o8sf3r7i.fsf@gnu.org> 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::843 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:245976 Archived-At: A related question: is there a reliable way to be notified when buffer = text changes? Because AFAICT both tree-sitter and LSP needs to know = incremental changes. Both LSP packages (lsp-mode and eaglet) add hooks = to after-change-function. But their hook is not guaranteed to run = because of inhibit-modification-hooks. Undo seems to always know the = exact change, but it doesn=E2=80=99t seem to have a hook avaliable. Yuan=