From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66181: Subject: 29.1; Occur changes don't affect Dired buffer Date: Mon, 25 Sep 2023 16:29:34 +0300 Message-ID: <83y1gu1iv5.fsf@gnu.org> References: <83bkdq3e42.fsf@gnu.org> <837coe3aq3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66181@debbugs.gnu.org, kediez@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 15:31:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qklgC-0006za-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 15:31:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qklfz-0008BM-Ei; Mon, 25 Sep 2023 09:31:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qklfn-00084h-4b for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 09:30:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qklfm-000199-Or for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 09:30:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qklfy-0000yK-5y for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 09:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66181 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 66181-submit@debbugs.gnu.org id=B66181.16956486413705 (code B ref 66181); Mon, 25 Sep 2023 13:31:02 +0000 Original-Received: (at 66181) by debbugs.gnu.org; 25 Sep 2023 13:30:41 +0000 Original-Received: from localhost ([127.0.0.1]:44577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qklfU-0000xY-1c for submit@debbugs.gnu.org; Mon, 25 Sep 2023 09:30:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qklfN-0000xE-3x for 66181@debbugs.gnu.org; Mon, 25 Sep 2023 09:30:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qklf3-0000vU-77; Mon, 25 Sep 2023 09:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5HxHnYQxgWR1nIccynxq0ly4T6DFeKb+e+sWRlnFS8c=; b=arvki1W+3DjK e3ZGKOfpMGDi8ttIIcLVUmOV3AMdaSLZNiK9iK3rcwfaTbeYkw/3L8jvgaWPSe+g/ahlyNW5Om+Zj uNnD5pfvu1O8LUkrm4ezc1M0jKMostVhr4ovHg26iO6tHFcC5cgRqVWjDCMTis/j1W+5lbnZgkN7v Wb2MJvIbRqzIFNH7nuXIlUczMRqEiR1+ZItm69zQAjIozm86SqCHGdkMv7eLO6qSkoA8Euoh3KEc+ jDmzoV0TI7KRIYI4ebKCDXUXk+c2H6zYqTQQT+OMoKU1JMTm30koG8uMCDGiNteYtote2AVURsYGr 3DcUACuUMrel1G1gNk8XZQ==; In-Reply-To: (message from Stefan Monnier on Mon, 25 Sep 2023 09:07:42 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271335 Archived-At: > From: Stefan Monnier > Cc: kediez@gmail.com, 66181@debbugs.gnu.org > Date: Mon, 25 Sep 2023 09:07:42 -0400 > > > Stefan, do we have any safe means of running the hooks in this case? > > I thought about running the buffer-local values of before- and > > after-change-functions by hand from occur-after-change-function, > > skipping the t entry, but I'm not sure this is safe. It is certainly > > messy, so if there's a more elegant way, I'd like to know. > > Arguably, the `inhibit-modification-hooks` let-binding that surrounds > code run from within modification hooks should be buffer-local, which > would solve these problems, AFAIK. Not sure I understand: we let-bind inhibit-modification-hooks in C, via specbind, and that binds the global value, since inhibit-modification-hooks is not a per-buffer variable. Or am I missing something. Do you mean we should add a new specbind_local function that makes only a buffer-local let-binding?