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#56210: 29.0.50; Keyboard macros do not trigger after-change-functions Date: Mon, 27 Jun 2022 20:17:32 +0300 Message-ID: <83zghy6n6b.fsf@gnu.org> References: <8735ftklkr.fsf@gnus.org> <83pmiwa7y3.fsf@gnu.org> <83fsjralpq.fsf@gnu.org> <70bed502-1c51-8cd6-68b1-16c4e3c410e0@rhansen.org> <831qva82sz.fsf@gnu.org> <327ead91-4b3f-6177-b3a1-4f1db57c3e85@rhansen.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18552"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56210@debbugs.gnu.org, larsi@gnus.org To: Richard Hansen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 19:22:18 2022 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 1o5sRE-0004bi-3o for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 19:22:16 +0200 Original-Received: from localhost ([::1]:59134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5sRC-0007MJ-Vs for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 13:22:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5sN8-0001KG-Fn for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 13:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5sN8-0006U3-7k for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 13:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5sN8-0000qZ-09 for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 13:18: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, 27 Jun 2022 17:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56210 X-GNU-PR-Package: emacs Original-Received: via spool by 56210-submit@debbugs.gnu.org id=B56210.16563502603227 (code B ref 56210); Mon, 27 Jun 2022 17:18:01 +0000 Original-Received: (at 56210) by debbugs.gnu.org; 27 Jun 2022 17:17:40 +0000 Original-Received: from localhost ([127.0.0.1]:53163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5sMm-0000pz-J7 for submit@debbugs.gnu.org; Mon, 27 Jun 2022 13:17:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5sMj-0000pl-EC for 56210@debbugs.gnu.org; Mon, 27 Jun 2022 13:17:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5sMd-0006Fp-Mk; Mon, 27 Jun 2022 13:17:31 -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=4ad3knh22VECgt1yyxaw1WYHOFeHm3PmATlyyvXxP9g=; b=MnyGuimLGNtb gS0XOznsBh7TuMJway9YCHSCBQSER7h3UayG797ALWOoGae5KHZ2RItMM32d+s1Q9dVLmuZ3cfxBo NdH7UCKFedWdd3zqOmBpYJQNVsNRHmrCQVN15m+hbvuECVTdOFk0nojGHgfgcHTr3UR6rNcxcInX8 xp/MvYn7C76Pf+jtaXqpyusG35G96/ZB+USihmcBBT4QZjtpFlddkxU3NdLRY+A3aIl8NMlmbk35R ZA8r7yM9mKc3appopwAsGlKT4/sGZZ9eY1LAxuRlwW1W4+T4k63ne/4EDezuGi2/NLaqAKGpUW6ab w0Jf43X7NWTjYoYPOBe2Hg==; Original-Received: from [87.69.77.57] (port=1771 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5sMc-0007We-Cr; Mon, 27 Jun 2022 13:17:31 -0400 In-Reply-To: <327ead91-4b3f-6177-b3a1-4f1db57c3e85@rhansen.org> (message from Richard Hansen on Mon, 27 Jun 2022 13:07:44 -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" Xref: news.gmane.io gmane.emacs.bugs:235488 Archived-At: > Date: Mon, 27 Jun 2022 13:07:44 -0400 > Cc: larsi@gnus.org, 56210@debbugs.gnu.org > From: Richard Hansen > > > Your test calls with-current-buffer-window, which calls > > temp-buffer-window-setup, which inhibits modification hooks: > > Yup, that's it! If I set `inhibit-modification-hooks' back to nil then it works. Thank you. > > I thought I had a `(should (null inhibit-modification-hooks))` at some point in the past to rule that out, but I must not have had that inside the `with-current-buffer-window'. > > Perhaps the documentation should be updated to indicate that the modification hooks are inhibited? I can cook up a patch. Is it really a good idea? In general, all the 'with-SOMETHING' macros are likely to inhibit modification hooks, since they erase the temporary buffers high and low. We'd need to stick these factoids in umpteen APIs, and we'll still forget some. E.g., in this case, even if temp-buffer-window-setup was documented to inhibit modification hooks. how would you know it is relevant to your case -- it is not explicitly called anywhere. I think the rule of thumb should be to assume that any temporary buffer has these kinds of hooks disabled, and if one needs them enabled, one should enable them explicitly.