From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Lower-level change hook immune to with-silent-modifications Date: Fri, 17 Jun 2022 18:10:46 +0800 Message-ID: <87v8sz7g7t.fsf@localhost> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <871qvorqvv.fsf@localhost> <5D6F74DB-79C2-4D7E-B830-B529C3A5CD16@gmail.com> <83sfo3q2nw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35972"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 12:12:22 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 1o28xh-0009Et-VR for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 12:12:21 +0200 Original-Received: from localhost ([::1]:39176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o28xg-0005ld-Ef for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 06:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o28vB-0004vV-GC for emacs-devel@gnu.org; Fri, 17 Jun 2022 06:09:45 -0400 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:40664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o28v7-00085C-6B; Fri, 17 Jun 2022 06:09:45 -0400 Original-Received: by mail-pl1-x62f.google.com with SMTP id k7so3489678plg.7; Fri, 17 Jun 2022 03:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=zSvpzIyLQfEkpMOBMMsfJ3tDNJFnhO2Gg62TIaPlImY=; b=WM0Wsl3+5d5ehib06qHTF1mwRabOqD4vj5PO2NRLjdxIVhC9dpi15m9krRhJQgRonD t6dMvUdzJJiNV1/iObmuZutWoFdpvMs6lCM1dEXsQQlyt175wA2srI+IMWm3sNiShLoj /4hn3kMY5Ivdn7kpHM0jBCePkbDOTKU7YoorM/a1w8SJeOQLJ71UF34w5mFGVdjgskrd 5GrmjUaxUtbOBDRufhQwEXj7TJFEEY0kKhPrKaELkuS3ZuBzks+6O7zd4jNR2Dg/sOTT HmiA+zsyyJo5A9tRUvC7jzMYrCFDaFfRK/IrZzbb5WtB7OwBmw6H1cq+rVDHlhf7ZNaM ObHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=zSvpzIyLQfEkpMOBMMsfJ3tDNJFnhO2Gg62TIaPlImY=; b=I1vCKHoJL2lew7GFPGABXPsa94PUyMaFHVZ0BNtJlPUxEGmUl5+9TNkwrK1cLwVj1c xpX3j9bTct2iS1fhobrkfhK3ueTkVT0bQkX+r9gPmsMj2gYyjnq4T0yB/EQ7lrYAUQ1J M04kAwndG5lv1HDgIphNU5tqtaPJSlXPLWzfEarUULoRZTWkFck0a5RSqM9VLzkC0J9v 63QEzTjS5BzGeVKFzmHt9MfPSH/fj9oDpQm6NMpvnh+jvcRKBFzZuv8OP31CTAgJc3Op n54LgEqlGQjjsLhURIJhGN4LMQ1q2K+lxPQY7LnJ6Cez5E822r2Jd0RV2AlgpALnI3rB wUDQ== X-Gm-Message-State: AJIora+Di3jCTOwquMSwV2CNwYHdrLVOAonjgdMpUgRU5fGyJ2b5DeNs 2oG+cOlgTbT7HVC5hkNNZRTpsuFV6tyMMy8G X-Google-Smtp-Source: AGRyM1s/YGIGh+kHR3RhVO70eaDCmKAl7nCvqRwgh4AAYT9tYhC04HBspUizrstFNPOLO/5DNGSCPg== X-Received: by 2002:a17:90a:df91:b0:1e3:4dc8:46e7 with SMTP id p17-20020a17090adf9100b001e34dc846e7mr20641844pjv.106.1655460578806; Fri, 17 Jun 2022 03:09:38 -0700 (PDT) Original-Received: from localhost ([66.154.105.4]) by smtp.gmail.com with ESMTPSA id bj2-20020a056a00318200b0051c77027d7fsm3231801pfb.218.2022.06.17.03.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 03:09:38 -0700 (PDT) In-Reply-To: <83sfo3q2nw.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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:291283 Archived-At: Eli Zaretskii writes: >> As I just argued in bug#51766, I don't think it makes sense to try to >> have such "a lower-level after-change-functions that is immune to >> with-silent-modifications". > > I tend to agree. We can discuss the specific needs that triggered > that request, but by and large, we have a good reason to have > inhibit-modification-hooks that affects any Lisp program that wants to > know about buffer modifications. That's the difference between the > Lisp level and the lower-level code in C, which "knows everything", > including when it isn't safe to use some data or some objects. Now I am wondering why tree-sitter should be any different. Apparently the existing after-change-functions functionality was not sufficient for tree-sitter. Probably because of issues similar to bug#51766. Can more fine-grained modification info be exposed to Elisp? Best, Ihor