From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Lower-level change hook immune to with-silent-modifications Date: Thu, 16 Jun 2022 19:25:33 -0700 Message-ID: <5D6F74DB-79C2-4D7E-B830-B529C3A5CD16@gmail.com> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <871qvorqvv.fsf@localhost> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 04:27:09 2022 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 1o21hU-00093C-JM for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 04:27:08 +0200 Original-Received: from localhost ([::1]:39886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o21hR-0001yV-FJ for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 22:27:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o21gh-0001EU-7H for emacs-devel@gnu.org; Thu, 16 Jun 2022 22:26:19 -0400 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:46805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o21gf-0002Rt-Qd for emacs-devel@gnu.org; Thu, 16 Jun 2022 22:26:18 -0400 Original-Received: by mail-pf1-x431.google.com with SMTP id y6so2991814pfr.13 for ; Thu, 16 Jun 2022 19:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iwKDElMefKNSmuyl9NcNMDJXkc6a1t7YODoWWyjJRNA=; b=O3BG9BQNbu6OHOyez2dw6CVmIEIeVmB0OMr2JDa18gDxUf8ww2QtRAUHg2/Ae8eTIo 8aKQjgbM5vtf+MvvrnNx+3ckZ9EOj3XUFF0mDMlV52vtTYHfIEUhHkm1MPsAtwsxDlby tBs6uSPoyeyxvXL3NKxYh9ulcmhqZnrHlJCailt0+FylyXTMg9D6+Pj2gFJPA7aBaYda gAvS/bCE07GPVeuEgKkNunVpFez5xvPBC/noLCg5wonkfcl0vp6NaSHunWUrTF7VSRf2 IIRZobvLp/yhKltNfysyAv6blGfmax3WL6w05MmZbeDh2HafVPg9IlKWwQUr+TgONFFu 7jOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iwKDElMefKNSmuyl9NcNMDJXkc6a1t7YODoWWyjJRNA=; b=1/igOcJ4+3WdCJj60jrMDxrk56txpCqK/0OMi6DOKELk331icetmFpnDq7dn5cM8NZ EV6FXvn5nVBWVlNh2GycqZuZMdLoLcNPrqWP4pR8Bra9mPfufXvOCXiKybxtrZDqyEPR uYtvP4ny8x+tRzLtbLkhijXFWVpK5oXooWgBK5Mf1ABXgdGni/mE0TJK5EJf75LKk6xb NOa5VLE8N+qPkyHMTZfn+YzGeDv/guI62duB5tzjDur9vVI2Bkwb//DoLL0pN0jeIbAi hU9tog3cPzFfcHUKJJMeOqY8RrjzTPfWcAMfywxPL5+2SZzLBRkGnnH74TcLYOm/m9cr f/kA== X-Gm-Message-State: AJIora+qXC5LcYf1hIZr80ka/ehGtr+YZ9HlkSnQKHVODyy/6Kh6UYFj lvel77B5YFT/2mS0j4vmFJY= X-Google-Smtp-Source: AGRyM1socxjxMs0IjPzSCkSGXmGbEVvw6sbzwQdk2/3+8VAp+WuWCGkneh/TGIJam5x++Vs+/yxrUw== X-Received: by 2002:aa7:8008:0:b0:51a:cae3:7563 with SMTP id j8-20020aa78008000000b0051acae37563mr7794183pfi.16.1655432776293; Thu, 16 Jun 2022 19:26:16 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id w26-20020a62c71a000000b0051bbd79fc9csm2428042pfg.57.2022.06.16.19.25.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2022 19:25:56 -0700 (PDT) In-Reply-To: <871qvorqvv.fsf@localhost> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=casouri@gmail.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:291263 Archived-At: >=20 > Would it be possible to expose ts_record_change to Elisp? >=20 > I am asking in the interest of Org mode parser that is also parsing = the > buffer AST and tracks buffer modifications. >=20 > The built-in after-change-functions are not reliable because they can = be > (and often are) easily suppressed by with-silent-modifications macro. > See bug#46982 and bug#51766. I think you probably want a separate hook just for this purpose, rather = than repurposing ts_record_change. We could have a lower-level = after-change-functions that is immune to with-silent-modifications. = Whether we should add such hook is probably another discussion. (So I = opened a new thread.) I think it will be handy, but I don=E2=80=99t know = that problem it might cause. Yuan=